mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Model doesn't seem to include tool output in its response #178
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 @mjvmiller on GitHub (Dec 2, 2024).
Originally assigned to: @ParthSareen on GitHub.
This issue is built off of the code I detailed in #345. After running effectively the same code I included there (with the one alteration being requesting the model to perform "alfalfa" on 2 and 3, rather than 2 and 4), I follow python example on generating a response based on the outcome of the tool call as follows:
This prints the following:
This indicates that the tool was chosen and called successfully. For multiple attempts at making the same request this remained consistently true. However, when I then print
final_response.message.contentI find that the model either doesn't understand what "alfalfa" means (despite understanding it well enough to call the tool), or simply makes up its own meaning for it.@ParthSareen commented on GitHub (Dec 3, 2024):
So it truly depends on what your initial prompt is for the model, what your prompt is to get the final response, and the size of the model you're using.