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

fix: react_agent.py needs tavily_search_api_key #189

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

MichaelClifford
Copy link
Contributor

What does this PR do?

This PR adds provider_data={"tavily_search_api_key": os.getenv("TAVILY_SEARCH_API_KEY")} to the client definition in examples/agents/react_agent.py. Without it, users can get the following error if they have not previously added the provider data to their server:

llama_stack_client.BadRequestError: Error code: 400 - {'detail': 'Invalid value: Pass Search provider\'s API Key in the header X-LlamaStack-Provider-Data as { "tavily_search_api_key": <your api key>}'}

Feature/Issue validation/testing/test plan

  • Test A
    I started a fresh Llama Stack server and ran examples/agents/react_agent.py as is, and I received the error above.

  • Test B
    I started a fresh Llama Stack server and ran examples/agents/react_agent.py with the changes in this PR and the example ran as expected.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Thanks for contributing 🎉!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 27, 2025
@ashwinb ashwinb merged commit 2b11d27 into meta-llama:main Feb 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants