Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after 4 to 5 queries input #1080

Open
Sahme115 opened this issue Jul 31, 2024 · 2 comments
Open

Error after 4 to 5 queries input #1080

Sahme115 opened this issue Jul 31, 2024 · 2 comments

Comments

@Sahme115
Copy link

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 🙏

@ysolanky
Copy link
Contributor

ysolanky commented Aug 2, 2024

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)

@alexytiger
Copy link

i was observing this error also in different cookbook examples also, for example in sql-rag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants