SK issue with function calling when using Mistral-Small-24B-Instruct-2501 #11089
stiankraggerud
started this conversation in
General
Replies: 1 comment
-
@RogerBarreto do you know is this scenario supported? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am currently running the Mistral-Small-24B-Instruct-2501 model on an internal server using vLLM, and it operates as expected. To integrate function calling capabilities, I've developed a test application. Understanding that Mistral does not support automatic function calling, I've implemented a straightforward method to extract and execute the necessary function calls.
However, I've encountered an issue with the chat history structure generated by Semantic Kernel (SK). Specifically, the JSON data lacks the "type": "function" field that the Mistral model requires, leading to errors during execution. The expected structure, as outlined in the Mistral model documentation, includes this "type": "function" field.
In my attempts to resolve this, I've utilized the FunctionCallContent class in SK. Unfortunately, it doesn't seem to allow the addition of custom properties, such as "type": "function".
Here is a snippet of the code I've been working with:
Despite these efforts, the "type": "function" property is not included in the serialized JSON sent to the Mistral model.
Has anyone faced a similar issue or can provide guidance on how to include the "type": "function" field in the JSON structure generated by Semantic Kernel? Any insights or suggestions would be greatly appreciated.
This is the json data sent to the llm server:
This gives the following error from mistral:
Field required [type=missing, input_value={'id': 'chatcmpl-68b1c676... '{"location":"Oslo"}'}}, input_type=dict]
This is how the json should be:
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions