You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INFO: [11:03:05]
🔍 Running research for ...
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/admin/Github/gpt-researcher/gpt_researcher/retrievers/tavily/tavily_search.py", line 39, in get_api_key
api_key = os.environ["TAVILY_API_KEY"]
~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "<frozen os>", line 679, in __getitem__
KeyError: 'TAVILY_API_KEY'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 242, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send) # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/applications.py", line 113, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 152, in __call__
await self.app(scope, receive, send)
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 77, in __call__
await self.app(scope, receive, send)
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
raise exc
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
await app(scope, receive, sender)
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
await route.handle(scope, receive, send)
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/routing.py", line 362, in handle
await self.app(scope, receive, send)
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/routing.py", line 95, in app
await wrap_app_handling_exceptions(app, session)(scope, receive, send)
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
raise exc
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
await app(scope, receive, sender)
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/starlette/routing.py", line 93, in app
await func(session)
File "/home/admin/Github/gpt-researcher/venv/lib/python3.11/site-packages/fastapi/routing.py", line 383, in app
await dependant.call(**solved_result.values)
File "/home/admin/Github/gpt-researcher/backend/server/server.py", line 142, in websocket_endpoint
await handle_websocket_communication(websocket, manager)
File "/home/admin/Github/gpt-researcher/backend/server/server_utils.py", line 117, in handle_websocket_communication
await handle_start_command(websocket, data, manager)
File "/home/admin/Github/gpt-researcher/backend/server/server_utils.py", line 28, in handle_start_command
report = await manager.start_streaming(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/admin/Github/gpt-researcher/backend/server/websocket_manager.py", line 61, in start_streaming
report = await run_agent(task, report_type, report_source, source_urls, tone, websocket, headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/admin/Github/gpt-researcher/backend/server/websocket_manager.py", line 95, in run_agent
report = await researcher.run()
^^^^^^^^^^^^^^^^^^^^^^
File "/home/admin/Github/gpt-researcher/backend/report_type/basic_report/basic_report.py", line 41, in run
await researcher.conduct_research()
File "/home/admin/Github/gpt-researcher/gpt_researcher/master/agent/master.py", line 82, in conduct_research
self.context = await self.research_conductor.conduct_research()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/admin/Github/gpt-researcher/gpt_researcher/master/agent/researcher.py", line 73, in conduct_research
self.researcher.context = await self.__get_context_by_search(self.researcher.query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/admin/Github/gpt-researcher/gpt_researcher/master/agent/researcher.py", line 161, in __get_context_by_search
context = await asyncio.gather(
^^^^^^^^^^^^^^^^^^^^^
File "/home/admin/Github/gpt-researcher/gpt_researcher/master/agent/researcher.py", line 220, in __process_sub_query
scraped_data = await self.__scrape_data_by_query(sub_query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/admin/Github/gpt-researcher/gpt_researcher/master/agent/researcher.py", line 275, in __scrape_data_by_query
retriever = retriever_class(sub_query)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/admin/Github/gpt-researcher/gpt_researcher/retrievers/tavily/tavily_search.py", line 25, in __init__
self.api_key = self.get_api_key()
^^^^^^^^^^^^^^^^^^
File "/home/admin/Github/gpt-researcher/gpt_researcher/retrievers/tavily/tavily_search.py", line 41, in get_api_key
raise Exception(
Exception: Tavily API key not found. Please set the TAVILY_API_KEY environment variable.
INFO: connection closed
Describe the bug
This is the log:
To Reproduce
This is the
.env
:Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: