-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
mistral[minor]: integrating Mistral LLM with AgentExecutor #4845
mistral[minor]: integrating Mistral LLM with AgentExecutor #4845
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This is awesome! CC @bracesproul but looks good to me. |
f5cc134
to
5767a70
Compare
Thanks, I've added the |
@@ -183,9 +190,17 @@ function convertMessagesToMistralMessages( | |||
); | |||
}; | |||
|
|||
const getTools = (toolCalls: ToolCall[] | undefined): MistralAIToolCalls[] => | |||
toolCalls?.map((toolCall) => ({ | |||
id: "null", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be better to assign this a UUID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting. I guess not
Thank you! |
Enhancing LangChain.js with Mistral Model Compatibility
This PR aims to adjust the
ChatMistralAI
class to ensure its compatibility with thecreateOpenAIToolsAgent
interface, thereby enabling the use of Mistral models, specificallymistral-large-latest
andmistral-small-latest
, within the execution agent that utilizes tool calling in the manner of OpenAI. This modification aligns with the API specifications of Mistral for the mentioned models, making them compatible with the same implementations as those of recent OpenAI models, such asgpt-4-0125-preview
andgpt-3.5-turbo-0125
, as mentioned here: LangChain Agents Documentation.The extended compatibility allows for the seamless integration of Mistral's capabilities within agents, using the
createOpenAIToolsAgent
method to create an agent. This method supports tool calling in the OpenAI style, making Mistral models suitable for use in agent scenarios similarly to OpenAI's GPT-3.5 and GPT-4 models.References:
mistral-large-latest
: Mistral DocumentationCompatible Models with Tools:
open-mistral-7b (aka mistral-tiny-2312)open-mistral-8x7b (aka mistral-small-2312)mistral-medium-latest (aka mistral-medium-2312)Note: Models not listed as bold are not supported with tools implementation.