[GH-ISSUE #6205] Llama 3.1 does not support tool support #3876

Closed
opened 2026-04-12 14:42:48 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @VistritPandey on GitHub (Aug 6, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6205

What is the issue?

On the ollama website, it says that llama 3.1 supports tool calling. But when I am using the curl command, I am getting:

{"error":{"message":"llama3.1 does not support tools","type":"api_error","param":null,"code":null}}

Here is the code that I used:

curl http://localhost:11434/api/chat -d '{
  "model": "llama3.1",
  "messages": [
    {
      "role": "user",
      "content": "What is the weather today in Paris?"
    }
  ],
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_current_weather",
        "description": "Get the current weather for a location",
        "parameters": {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "The location to get the weather for, e.g. San Francisco, CA"
            },
            "format": {
              "type": "string",
              "description": "The format to return the weather in, e.g. 'celsius' or 'fahrenheit'",
              "enum": ["celsius", "fahrenheit"]
            }
          },
          "required": ["location", "format"]
        }
      }
    }
  ]
}'

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.3.3

Originally created by @VistritPandey on GitHub (Aug 6, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6205 ### What is the issue? On the ollama website, it says that llama 3.1 supports tool calling. But when I am using the curl command, I am getting: ``` {"error":{"message":"llama3.1 does not support tools","type":"api_error","param":null,"code":null}} ``` Here is the code that I used: ``` curl http://localhost:11434/api/chat -d '{ "model": "llama3.1", "messages": [ { "role": "user", "content": "What is the weather today in Paris?" } ], "stream": false, "tools": [ { "type": "function", "function": { "name": "get_current_weather", "description": "Get the current weather for a location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The location to get the weather for, e.g. San Francisco, CA" }, "format": { "type": "string", "description": "The format to return the weather in, e.g. 'celsius' or 'fahrenheit'", "enum": ["celsius", "fahrenheit"] } }, "required": ["location", "format"] } } } ] }' ``` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.3.3
GiteaMirror added the bug label 2026-04-12 14:42:48 -05:00
Author
Owner

@rick-github commented on GitHub (Aug 6, 2024):

llama3.1 was initially made available with a template that didn't support tools. That has been fixed, if you re-pull the model then tool calls should work.

<!-- gh-comment-id:2271732235 --> @rick-github commented on GitHub (Aug 6, 2024): llama3.1 was initially made available with a template that didn't support tools. That has been fixed, if you re-pull the model then tool calls should work.
Author
Owner

@jmorganca commented on GitHub (Aug 6, 2024):

Thanks @rick-github ! As @rick-github mentioned please repull the model: ollama pull llama3.1 and it should work 😊

<!-- gh-comment-id:2271792943 --> @jmorganca commented on GitHub (Aug 6, 2024): Thanks @rick-github ! As @rick-github mentioned please repull the model: `ollama pull llama3.1` and it should work 😊
Author
Owner

@VistritPandey commented on GitHub (Aug 6, 2024):

thanks! that worked!

<!-- gh-comment-id:2271920332 --> @VistritPandey commented on GitHub (Aug 6, 2024): thanks! that worked!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3876