Closed Kyros5 closed 4 months ago
Make sure you are exporting the Tavily API key correctly
export TAVILY_API_KEY="tvly-***"
@Kyros5 ^
thank you for your response @ashpreetbedi
export
it doesn't work so i used set
but it still don't working
set TAVILY_API_KEY="tvly-**********"
@Kyros5 on windows I'd recommend using Powershell. Checkout how to set an environment variable here
$env:TAVILY_API_KEY ="tvly-" use this in WindowsPOWERSHELL!!! @Kyros5
@Kyros5 is this fixed?
@ashpreetbedi No, i don't know how.
@Kyros5 for now can you do TavilyTools(api_key=<api_key>)
just to test it works this way?
@Kyros5 shall we close this?
@ashpreetbedi yes i am installing wsl on windows
HTTPError: 422 Client Error: Unprocessable Entity for url: https://api.tavily.com/search
Traceback: File "C:\Users\LENOVO\Documents\Python\Test\source\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 584, in _run_script exec(code, module.dict) File "C:\Users\LENOVO\Documents\Python\Test\phidata\cookbook\llms\groq\research\app.py", line 79, in
main()
File "C:\Users\LENOVO\Documents\Python\Test\phidata\cookbook\llms\groq\research\app.py", line 58, in main
tavily_search_results = TavilyTools().web_search_using_tavily(report_topic)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\LENOVO\Documents\Python\Test\source\Lib\site-packages\phi\tools\tavily.py", line 55, in web_search_using_tavily
response = self.client.search(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\LENOVO\Documents\Python\Test\source\Lib\site-packages\tavily\tavily.py", line 48, in search
return self._search(query, search_depth=search_depth, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\LENOVO\Documents\Python\Test\source\Lib\site-packages\tavily\tavily.py", line 42, in _search
response.raise_for_status() # Raises a HTTPError if the HTTP request returned an unsuccessful status code
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\LENOVO\Documents\Python\Test\source\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)