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

Fixed duplicated arguments in tool-call-stream example #329

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mmende
Copy link

@mmende mmende commented Feb 4, 2025

When playing around with the tool-call-stream example in combination with mistral's API I encountered a strange bug where the arguments where duplicated (e.g. instead of { "city": "Berlin" } I would always get { "city": "Berlin" }{ "city": "Berlin" }).

This issue is caused by mistral's API streaming the arguments together with the tool call id and function name which in the example results in the ChatCompletionMessageToolCall being inserted including arguments and then the arguments would be concatenated to itself again.

The adjusted example in this PR fixes this issue.

@b0xtch
Copy link

b0xtch commented Feb 18, 2025

Yeah noticed that same with groq mistral model as well

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