Hi,
I’ve been exploring the function calling capability of your API and have encountered an issue related to the models handling off non-function related messages. Specifcally the model attempts to call a non-existent function “setMessage” when responding to the user.
request
{
"model": "Meta-Llama-3.3-70B-Instruct",
"messages": [
{
"role": "system",
"content": "You are a friendly chatbot"
},
{
"role": "user",
"content": "Hi"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "setMessage",
"description": "Update the main message text on the chatbot page",
"strict": true,
"parameters": {
"type": "object",
"required": [],
"additionalProperties": false
}
}
}
],
"tool_choice": "auto",
"stream": false
}
response
{
"id": "5c4eb464-b058-4aae-8664-b848da2e73df",
"choices": [
{
"index": 0,
"finish_reason": "tool_calls",
"message": {
"role": "assistant",
"content": null,
"tool_call_id": null,
"tool_calls": [
{
"id": "call_45f8adced6834b429e",
"type": "function",
"function": {
"name": "setMessage",
"arguments": "{\"message\": \"Hello! How can I assist you today?\"}"
}
}
]
}
}
]
}
I would imagine this must be a bug as setMessage is not a function provided to the model.