[GH-ISSUE #7843] New Tool Calling issues. #51526

Closed
opened 2026-04-28 20:27:33 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @AssassinUKG on GitHub (Nov 26, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7843

What is the issue?

In my image below you can see me using the code functions provided by the ollama python examples on GitHub, specifically the chat.py example (added client for local ollama)

Sometimes the values are treated as strings and other times as integer, although the function definition is an int type.

def add_two_numbers(a: int, b: int) -> int:
  """
  Add two numbers

  Args:
    a (int): The first number
    b (int): The second number

  Returns:
    int: The sum of the two numbers
  """
  return a + b

image

How to resolve this as other tools will likely suffer the same issue.

OS

Windows

GPU

Nvidia

CPU

AMD

Ollama version

ollama version is 0.4.5

Originally created by @AssassinUKG on GitHub (Nov 26, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7843 ### What is the issue? In my image below you can see me using the code functions provided by the ollama python examples on GitHub, specifically the chat.py example (added client for local ollama) Sometimes the values are treated as strings and other times as integer, although the function definition is an int type. ```python def add_two_numbers(a: int, b: int) -> int: """ Add two numbers Args: a (int): The first number b (int): The second number Returns: int: The sum of the two numbers """ return a + b ``` ![image](https://github.com/user-attachments/assets/2e8e409f-76ec-4a91-a679-8d9b4bb70410) How to resolve this as other tools will likely suffer the same issue. ### OS Windows ### GPU Nvidia ### CPU AMD ### Ollama version ollama version is 0.4.5
GiteaMirror added the bug label 2026-04-28 20:27: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#51526