[GH-ISSUE #6929] support qwen2.5:72b-instruct function call #4386

Closed
opened 2026-04-12 15:19:41 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @chenfolingithub on GitHub (Sep 24, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6929

qwen2.5:72b-instruct now support function call

Returned its own unique data format, but currently ollama 0.3.11 does not correctly return formatted data for function calls

Originally created by @chenfolingithub on GitHub (Sep 24, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6929 qwen2.5:72b-instruct now support function call Returned its own unique data format, but currently ollama 0.3.11 does not correctly return formatted data for function calls
GiteaMirror added the feature request label 2026-04-12 15:19:41 -05:00
Author
Owner

@rick-github commented on GitHub (Sep 24, 2024):

Can you provide a program/script that demonstrates the problem?

A quick test using the raw API returned tool calls as expected. I used this payload:

{
  "model": "qwen2.5:72b-instruct-q4_K_M",
  "stream": false,
  "messages": [
    {
      "content": "What is the weather in Example State, zip 12345, in degrees Celsius?",
      "role": "user"
    }
  ],
  "tools": [
    {
      "function": {
        "description": "Use this tool to get the weather.",
        "name": "weather_lookup",
        "parameters": {
          "properties": {
            "temp_units": {
              "description": "What units to use for the temperature.",
              "enum": [
                "fahrenheit",
                "celsius",
                "kelvin"
              ],
              "type": "string"
            },
            "zip_codes": {
              "description": "An array of zip codes to get the weather for.",
              "items": {
                "description": " A 5 digit USA zipcode string",
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "zip_codes"
          ],
          "type": "object"
        }
      },
      "type": "function"
    }
  ]
}

and got the following consistent results:

$ for i in {1..120} ; do curl -s localhost:11434/api/chat -d "$(cat 6929.prompt)" | jq -c .message.tool_calls ; done | sort | uniq -c
     120 [{"function":{"name":"weather_lookup","arguments":{"temp_units":"celsius","zip_codes":["12345"]}}}]
$ curl -s localhost:11434/api/version
{"version":"0.3.11"}
<!-- gh-comment-id:2370484810 --> @rick-github commented on GitHub (Sep 24, 2024): Can you provide a program/script that demonstrates the problem? A quick test using the raw API returned tool calls as expected. I used this payload: ```json { "model": "qwen2.5:72b-instruct-q4_K_M", "stream": false, "messages": [ { "content": "What is the weather in Example State, zip 12345, in degrees Celsius?", "role": "user" } ], "tools": [ { "function": { "description": "Use this tool to get the weather.", "name": "weather_lookup", "parameters": { "properties": { "temp_units": { "description": "What units to use for the temperature.", "enum": [ "fahrenheit", "celsius", "kelvin" ], "type": "string" }, "zip_codes": { "description": "An array of zip codes to get the weather for.", "items": { "description": " A 5 digit USA zipcode string", "type": "string" }, "type": "array" } }, "required": [ "zip_codes" ], "type": "object" } }, "type": "function" } ] } ``` and got the following consistent results: ```console $ for i in {1..120} ; do curl -s localhost:11434/api/chat -d "$(cat 6929.prompt)" | jq -c .message.tool_calls ; done | sort | uniq -c 120 [{"function":{"name":"weather_lookup","arguments":{"temp_units":"celsius","zip_codes":["12345"]}}}] ``` ```console $ curl -s localhost:11434/api/version {"version":"0.3.11"} ```
Author
Owner

@dhiltgen commented on GitHub (Nov 6, 2024):

@chenfolingithub if you're still having trouble, please share an example so we can assist.

<!-- gh-comment-id:2458454858 --> @dhiltgen commented on GitHub (Nov 6, 2024): @chenfolingithub if you're still having trouble, please share an example so we can assist.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4386