Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Langchain experiment #3

Closed
wants to merge 2 commits into from

Conversation

marcnnn
Copy link
Contributor

@marcnnn marcnnn commented Jul 13, 2024

Some experiments with Langchain.

With a pachted Langchain version where:

field :receiver, :string

is added in LangChain.Message in message.ex

PR just to create visibility and a place to discuss.

@nileshtrivedi
Copy link
Owner

Amazing! 👍

I shared some notes on supporting langchain here. This is definitely on the right track. 👍 I am just waiting for langchain library v0.3.0 (which fixes tool calling for Gemini models) to be released before switching over to it.

@nileshtrivedi
Copy link
Owner

I have started merging langchain 0.3.0 in this commit.

I'm also simplifying things a bit by keeping thread.chat_history in chronological order so that it does not need to be reversed before sending to LLMChain. Ollama is now the default model and all scripts seem to be working fine.

Since I'm using the non-patched version of langchain, message "receiver" is no longer tracked in the thread. Instead of using a patched version, I am hoping that langchain can allow us to associate some arbitrary metadata per-message to support agent frameworks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants