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

ChatLlm implementation that supports Langchain ChatModel #326

Merged
merged 13 commits into from
Feb 13, 2024

Conversation

mongodben
Copy link
Collaborator

@mongodben mongodben commented Feb 8, 2024

Jira: n/a

Changes

  • Add new ChatLlm constructor that supports the Langchain JS ChatModel
  • Test implementation with Azure OpenAI service + FakeLlm
  • Make tool calling optional for a ChatLlm
  • Document new functionality
  • Updated some scripts service imports b/c was getting some mongodb package version incompatibility issues.

Notes

  • This lets the chatbot server support all LLMs that Langchain supports
  • Working on this made me realize that our implementation of streaming is very based on the Azure OpenAI client's interface. We use few of the required fields. We should consider defining our own type for a streaming object that doesn't require all these unnecessary fields, but rather the subset that we do use.

@mongodben mongodben marked this pull request as ready for review February 13, 2024 20:14
Copy link
Collaborator

@cbush cbush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple things, looks good though!

@mongodben mongodben merged commit 1390217 into main Feb 13, 2024
1 check was pending
@mongodben mongodben deleted the langchain_chat_llm branch February 13, 2024 20:43
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