Skip to content

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

Closed
mmende wants to merge 1 commit into64bit:mainfrom
mmende:fix-duplicate-streaming-arguments
Closed

Fixed duplicated arguments in tool-call-stream example#329
mmende wants to merge 1 commit into64bit:mainfrom
mmende:fix-duplicate-streaming-arguments

Conversation

@mmende
Copy link
Copy Markdown

@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
Copy Markdown

b0xtch commented Feb 18, 2025

Yeah noticed that same with groq mistral model as well

@64bit
Copy link
Copy Markdown
Owner

64bit commented Nov 21, 2025

Thanks, The example was updated hence closing this

@64bit 64bit closed this Nov 21, 2025
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.

3 participants