phidata
phidata copied to clipboard
Assistant max function calling
Is there a way to max out the phidata python assistant on how many steps it can take? I am trying to control for infinite loops.
I found this but not exactly sure how to use it in Python Assistant: venv\Lib\site-packages\phi\assistant\assistant.py
# -*- Assistant Tools
# A list of tools provided to the LLM.
# Tools are functions the model may generate JSON inputs for.
# If you provide a dict, it is not called by the model.
tools: Optional[List[Union[Tool, ToolRegistry, Callable, Dict, Function]]] = None
# Allow the assistant to use tools
use_tools: bool = False
# Show tool calls in LLM messages.
show_tool_calls: bool = False
# Maximum number of tool calls allowed.
tool_call_limit: Optional[int] = None
@jacobweiss2305 setting Assistant(..., tool_call_limit=5)
, after the tool_call_limit
is reached it will deactivate the function calls
We currently set it to 20, but imo that number is bit high, somewhere around 7-10 is a good number