[GH-ISSUE #6221] Mistake tools calls +-every user prompt. #3887

Open
opened 2026-04-12 14:43:33 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @websharik on GitHub (Aug 7, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6221

What is the issue?

Model: llama3.1:8b

TOOLS:

[
  {
    "type": "function",
    "function": {
      "name": "base64DecodeTool",
      "description": "Tool to decode base64 string.",
      "parameters": {
        "type": "object",
        "properties": {
          "str": {
            "type": "string",
            "description": "string to be decoded"
          }
        },
        "required": [
          "str"
        ]
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "getAnimalNameRatingTool",
      "description": "Tool to get cat/dog name rating.",
      "parameters": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "name of the animal"
          }
        },
        "required": [
          "name"
        ]
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "toggleLightTool",
      "description": "Tool to on/off light",
      "parameters": {
        "type": "object",
        "properties": {
          "state": {
            "type": "boolean",
            "description": "state of light"
          }
        },
        "required": [
          "state"
        ]
      }
    }
  }
]

Dialogs examples:

[
  { "role": "user", "content": "Hey" },
  { "role": "assistant", "tool_calls": "..." },
  { "role": "tool", "content": "Rating of name \"cat\" is: 10" },
  { "role": "assistant", "content": "You asked about cat, and I got it's rating as 10! Would you like to know something else?" }
]
[
  { "role": "user", "content": "Hey" },
  { "role": "assistant", "tool_calls": "..." },
  { "role": "tool", "content": "Light now is off" },
  { "role": "assistant", "content": "Hello" }
]

OS

Docker

GPU

Nvidia

CPU

AMD

Ollama version

0.3.3

Originally created by @websharik on GitHub (Aug 7, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6221 ### What is the issue? Model: `llama3.1:8b` TOOLS: ```json [ { "type": "function", "function": { "name": "base64DecodeTool", "description": "Tool to decode base64 string.", "parameters": { "type": "object", "properties": { "str": { "type": "string", "description": "string to be decoded" } }, "required": [ "str" ] } } }, { "type": "function", "function": { "name": "getAnimalNameRatingTool", "description": "Tool to get cat/dog name rating.", "parameters": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the animal" } }, "required": [ "name" ] } } }, { "type": "function", "function": { "name": "toggleLightTool", "description": "Tool to on/off light", "parameters": { "type": "object", "properties": { "state": { "type": "boolean", "description": "state of light" } }, "required": [ "state" ] } } } ] ``` Dialogs examples: ```json [ { "role": "user", "content": "Hey" }, { "role": "assistant", "tool_calls": "..." }, { "role": "tool", "content": "Rating of name \"cat\" is: 10" }, { "role": "assistant", "content": "You asked about cat, and I got it's rating as 10! Would you like to know something else?" } ] ``` ```json [ { "role": "user", "content": "Hey" }, { "role": "assistant", "tool_calls": "..." }, { "role": "tool", "content": "Light now is off" }, { "role": "assistant", "content": "Hello" } ] ``` ### OS Docker ### GPU Nvidia ### CPU AMD ### Ollama version 0.3.3
GiteaMirror added the bug label 2026-04-12 14:43:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3887