Skip to content

ollama 0.2.7 function call error "llama3 does not support tools" #5793

@liseri

Description

@liseri

What is the issue?

ollama 0.2.7 function call error "llama3 does not support tools"

  1. install ollama 0.2.7 in docker
  2. ollama pull llama3
  3. curl
curl --location --request POST 'http://localhost:11434/v1/chat/completions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "messages": [
        {
            "content": "what'\''s the weather of beijing",
            "role": "user"
        }
    ],
    "model": "llama3",
    "n": 1,
    "temperature": 0.9,
    "tools": [
        {
            "type": "function",
            "function": {
                "name": "get_weather",
                "description": "get weather of location or city",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "query": {
                            "location": "location or city",
                            "type": "string"
                        }
                    },
                    "required": [
                        "query"
                    ]
                }
            }
        }
    ]
}'
  1. error
{
    "error": {
        "message": "llama3 does not support tools",
        "type": "api_error",
        "param": null,
        "code": null
    }
}

OS

Docker

GPU

Nvidia

CPU

Intel

Ollama version

0.2.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions