Open Sahme115 opened 2 months ago
Hello @Sahme115 !
Can you please share your Assistant config? I am not able to replicate your error using the following script:
from phi.assistant import Assistant
from phi.tools.exa import ExaTools
assistant = Assistant(
tools=[ExaTools(include_domains=["cnbc.com", "reuters.com", "bloomberg.com"])], show_tool_calls=True
)
assistant.print_response("Search for AAPL news", debug_mode=True, markdown=True)
assistant.print_response("Search for TSLA news", debug_mode=True, markdown=True)
assistant.print_response("Search for VOO news", debug_mode=True, markdown=True)
assistant.print_response("Search for VGT news", debug_mode=True, markdown=True)
assistant.print_response("Search for GOOG news", debug_mode=True, markdown=True)
i was observing this error also in different cookbook examples also, for example in sql-rag.
error code: 400 - {'error': {'message': "an assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. the following tool_call_id did not have response messages:
When using the example from cookbook of exa tools after 4 to 5 queries it gives the error which i have stated above, I have tried tavily, duckduckgo and exa same error every time after 4 to 5 queries if the app is running continuously.
When i restart the app it works fine,
Please provide the solution with exa 🙏