ai

Nim Sadeh 2024-01-01T20:47:37.988109Z

Anyone worked with the LangChain4J SDK, or other LangChain/Clojure work, and want to compare notes? I am using it fairly intensively these days

Rupert (Sevva/All Street) 2024-01-02T09:11:21.742579Z

How come you are using LangChain4J instead of just pure clojure? I feel like langchain makes sense as a DSL/Interface in less elegant languages - but clojure is really fluid for creating prompts and executing multi step agents in. e.g. prompt template and call can be done like this.

(-> "You are a . My Question is: "
    (str/replace #"" "What is the capital of france?") 
    (str/replace #"" "Helppful AI")
    (call-llm llm-credentials))
You can call LLMs with just REST (e.g. using Clojure HTTP or Martian Libraries) or a dedicated wrapper like https://github.com/wkok/openai-clojure/tree/main. There's also https://github.com/zmedelis/bosquet which provides tools for building Clojure AI agents.

Nim Sadeh 2024-01-02T13:18:01.263649Z

My prototype was in langchain python and I was trying to reduce the amount of work :) I think I just increased it tho

Rupert (Sevva/All Street) 2024-01-02T14:16:36.892629Z

If it's not a huge codebase - I'd be tempted to refactor/rewrite.

Daniel Slutsky 2024-01-01T20:50:30.906539Z

worth discussing at #clojurellm probably

Nim Sadeh 2024-01-01T20:50:45.217339Z

Ah that's probably the right one, thanks 🙂

🙏 1