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

Default to the retriever set in config rather than just tavily #1019

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

winsonluk
Copy link
Contributor

@winsonluk winsonluk commented Dec 14, 2024

-        retriever_env = os.environ.get("RETRIEVER", "tavily")
+        retriever_env = os.environ.get("RETRIEVER", config.get("RETRIEVER", "tavily"))

Right now if the retriever isn't set in the headers, it defaults to the environment variable RETRIEVER. If that's not set, it defaults to Tavily.

The problem with this is even if the retriever is set in the config, it's completely ignored.

I had no RETRIEVER environment variable set, but I had retriever set in my configs to Bing, Google, etc., and was wondering why I was blowing past all my Tavily API limits...

The current workaround is to manually set the retriever in the headers rather than the config.

@winsonluk
Copy link
Contributor Author

@assafelovic another one :)

would appreciate a deployment of a new version when you get a chance, cheers!

Copy link
Owner

@assafelovic assafelovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point, thank you!

@assafelovic assafelovic merged commit ff96e42 into assafelovic:master Dec 14, 2024
@assafelovic
Copy link
Owner

@winsonluk just release a new version both in github repo and PIP package. Thank you for all your efforts, I honestly would love and appreciate additional PRs, the more the better! This is an open source project dedicated to democratizing agentic research, so it relies on improvements like yours. Thank you!

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

Successfully merging this pull request may close these issues.

2 participants