Files
spring-ai/models
Mark Pollack 8bfb25da86 Fix streaming function call for MiniMax chat model
Sometimes, the MiniMax stream mode function calls might get split,
resulting in an empty tool call ID. This indicates that the previous
call is not finished, which is an unusual API design.

The issue occurs when tool calls return in a format like:
[{"id":"1","function":{"name":"a"}},{"id":"","function":{"arguments":"[1]"}}]

These need to be merged into:
[{"id":"1","name":"a","arguments":"[1]"}]

This commit addresses the merging process to handle split function calls.

authored-by: mxsl-gr <mxsl-gr@users.noreply.github.com>
2024-09-17 14:56:23 -04:00
..