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

Support Mistral API #592

Open
bilgeyucel opened this issue Mar 18, 2024 · 2 comments
Open

Support Mistral API #592

bilgeyucel opened this issue Mar 18, 2024 · 2 comments
Labels
feature request Ideas to improve an integration integration:mistral

Comments

@bilgeyucel
Copy link
Contributor

Is your feature request related to a problem? Please describe.
We extend OpenAIChatGenerator for MistralChatGenerator. This works for chat completion but not for function calling. Mistral's function calling API is not the same as OpenAI's.
https://docs.mistral.ai/guides/function-calling/

Describe the solution you'd like
We need to support Mistral's own API in MistralChatGenerator

Describe alternatives you've considered
Not supporting function calling in Mistral

Additional context
With the current implementation, MistralChatGenerator states that a message is a function call but the content doesn't provide function name/argument, probably because we cannot map the response coming from Mistral to a ChatMessage object

{'replies': [ChatMessage(content='', role=<ChatRole.ASSISTANT: 'assistant'>, name=None, meta={'model': 'mistral-large-latest', 'index': 0, 'finish_reason': 'tool_calls', 'usage': {}})]}
@bilgeyucel bilgeyucel added feature request Ideas to improve an integration integration:mistral labels Mar 18, 2024
@anakin87
Copy link
Member

Related: we should probably also introduce a MistralGenerator which can play well with other components such as the AnswerBuilder

@AnushreeBannadabhavi
Copy link
Contributor

I can work on this if no one is working on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Ideas to improve an integration integration:mistral
Projects
None yet
Development

No branches or pull requests

3 participants