According to the documentation, I use VLLM to build a openai compatible server for qwen2.5-coder-7b-instruct.
That is my code
messages = [
{
"role": "user",
"content": "Calculate how many r's are in the word 'strawberry'"
}
]
# Define the tools
tools = [{
"type": "function",
"function": {
"name": "execute_python",
"description": "Execute python code in a Jupyter notebook cell and return result",
"parameters": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The python code to execute in a single cell"
}
},
"required": ["code"]
}
}
}]
# Generate text with OpenAI
response = client.chat.completions.create(
model="qwen2.5-7B-coder",
messages=messages,
tools=tools,
)
However, I got this:

The finish_reason is "stop" instead of "tool_calls", and the tool_calls is empty.
So I wonder whether qwen2.5-coder series support function calling?
According to the documentation, I use VLLM to build a openai compatible server for qwen2.5-coder-7b-instruct.
That is my code
However, I got this:

The finish_reason is "stop" instead of "tool_calls", and the tool_calls is empty.
So I wonder whether qwen2.5-coder series support function calling?