mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
chat method is not able to identify add_two_numbers as tool #196
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @swapnilsingh on GitHub (Jan 4, 2025).
https://github.com/ollama/ollama-python/blob/ee349ecc6d05ea57c9e91bc9345e2db3bc79bb5b/examples/tools.py#L54
I am getting this error
NameError: name 'add_two_numbers' is not defined
@Gaurav4604 commented on GitHub (Jan 6, 2025):
can you show your code script that you're using?
You need to define the function that ollama-python is supposed to consider as a tool
@ParthSareen commented on GitHub (Jan 16, 2025):
@swapnilsingh any updates? Closing this out for now. Feel free to reopen
@20246688 commented on GitHub (Jan 20, 2025):
I found that the ollama-Python/examples/tools.py script cannot specify an IP address.