mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Response + Function Calling on the same model call #180
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 @rsanchezmo on GitHub (Dec 5, 2024).
I was unable to get both a function call and an output on the same model inference (I used llama 3.1:8b). I mean, for a ReAct agent for example, you can ask first to do the THOUGHT process and choose the tools that help you achieve the plan (or the initial steps of it). Then You will feedback the model with the tool output as you did and let the model decide between giving a final answer or replaning (or moving to next step) and call to another set of tools until the agent completed the task.
Is incompatible function calling + generation on the same step in Ollama? meaning thinking a bit then deciding what tools to use? It has demonstrated to be more performant... I saw this example on https://langchain-ai.github.io/langgraph/how-tos/tool-calling/#react-agent and makes me think this is possible and should be possible.
Thanks in advance!
@ParthSareen commented on GitHub (Dec 5, 2024):
Hey! Yeah we only support output at a time. You can still do the same prompt it just won't be outputted in the contents.