Fix to accept both tool format chat/completion and responses
#11
by
blancsw
- opened
Fix Apertus jinja template to accept both tool call format (chat/completion and responses)
Chat Completions API
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Determine weather in my location",
"strict": true,
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
},
},
"additionalProperties": false,
"required": [
"location",
"unit"
]
}
}
}
Responses API
{
"type": "function",
"name": "get_weather",
"description": "Determine weather in my location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
},
},
"additionalProperties": false,
"required": [
"location",
"unit"
]
}
}
See also this discussion on vLLM support: https://huggingface.co/swiss-ai/Apertus-8B-Instruct-2509/discussions/18