Comments (3)
Hi @OumYacout can you share the entire Traceback logs?
from gpt-researcher.
INFO: Application startup complete.
INFO: 127.0.0.1:57139 - "GET / HTTP/1.1" 200 OK
INFO: 127.0.0.1:57139 - "GET /styles.css HTTP/1.1" 304 Not Modified
INFO: 127.0.0.1:57141 - "GET /scripts.js HTTP/1.1" 304 Not Modified
INFO: 127.0.0.1:57140 - "GET /financeAgentAvatar.png HTTP/1.1" 304 Not Modified
INFO: 127.0.0.1:57143 - "GET /computerScienceAgentAvatar.png HTTP/1.1" 304 Not Modified
INFO: 127.0.0.1:57142 - "GET /travelAgentAvatar.png HTTP/1.1" 304 Not Modified
INFO: 127.0.0.1:57144 - "GET /academicResearchAgentAvatar.png HTTP/1.1" 304 Not Modified
INFO: 127.0.0.1:57144 - "GET /mathAgentAvatar.png HTTP/1.1" 304 Not Modified
INFO: 127.0.0.1:57144 - "GET /favicon.ico HTTP/1.1" 304 Not Modified
INFO: ('127.0.0.1', 57156) - "WebSocket /ws" [accepted]
INFO: connection open
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 254, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fastapi/applications.py", line 289, in call
await super().call(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/middleware/errors.py", line 149, in call
await self.app(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in call
raise e
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in call
await self.app(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/routing.py", line 341, in handle
await self.app(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/routing.py", line 82, in app
await func(session)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fastapi/routing.py", line 324, in app
await dependant.call(values)
File "/Users/mac/Downloads/gpt-researcher-master/main.py", line 50, in websocket_endpoint
await manager.start_streaming(task, report_type, agent, websocket)
File "/Users/mac/Downloads/gpt-researcher-master/agent/run.py", line 38, in start_streaming
report, path = await run_agent(task, report_type, agent, websocket)
File "/Users/mac/Downloads/gpt-researcher-master/agent/run.py", line 50, in run_agent
await assistant.conduct_research()
File "/Users/mac/Downloads/gpt-researcher-master/agent/research_agent.py", line 136, in conduct_research
search_queries = await self.create_search_queries()
File "/Users/mac/Downloads/gpt-researcher-master/agent/research_agent.py", line 88, in create_search_queries
result = await self.call_agent(prompts.generate_search_queries_prompt(self.question))
File "/Users/mac/Downloads/gpt-researcher-master/agent/research_agent.py", line 75, in call_agent
answer = create_chat_completion(
File "/Users/mac/Downloads/gpt-researcher-master/agent/llm_utils.py", line 48, in create_chat_completion
response = send_chat_completion_request(
File "/Users/mac/Downloads/gpt-researcher-master/agent/llm_utils.py", line 69, in send_chat_completion_request
result = openai.ChatCompletion.create(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/openai/api_resources/chat_completion.py", line 25, in create
return super().create(*args, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/openai/api_requestor.py", line 298, in request
resp, got_stream = self._interpret_response(result, stream)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/openai/api_requestor.py", line 700, in _interpret_response
self._interpret_response_line(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/openai/api_requestor.py", line 763, in _interpret_response_line
raise self.handle_error_response(
openai.error.AuthenticationError: Incorrect API key provided: {sk-4e2S*************************************vsj}. You can find your API key at https://platform.openai.com/account/api-keys.
ERROR: closing handshake failed
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websockets/legacy/server.py", line 248, in handler
await self.close()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 766, in close
await self.write_close_frame(Close(code, reason))
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 1232, in write_close_frame
await self.write_frame(True, OP_CLOSE, data, _state=State.CLOSING)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 1205, in write_frame
await self.drain()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 1194, in drain
await self.ensure_open()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 935, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1000 (OK); no close frame received
INFO: connection closed
from gpt-researcher.
II do the following and it is working now:
- I create the api key using organisation role
- In gpt-researcher/config/config.py, I substitute "gpt-4" with "gpt-3.5-turbo-16k"
- In gpt-researcher/agent/research_agent.py , I substitute "return json.loads(result)" with " return result".
from gpt-researcher.
Related Issues (20)
- Grtting error message on model gpt-4o HOT 3
- More flexible similarity distance handling HOT 1
- Support disabling of API response streaming via config HOT 2
- Multiagent Issue
- Changing the model from gpt-4o to gpt-3.5 turbo ? HOT 1
- Different provider for FAST and SMART LLMs HOT 2
- The UI of GPT Researcher! HOT 6
- Chinese character not display HOT 1
- Crashes instead of displaying "Could not find any answers for this topic" when it wasn't able to find any relavant information. HOT 6
- No module named 'gpt_researcher.retrievers.custom' HOT 3
- ImportError: cannot import name 'GPTResearcher' from 'gpt_researcher' (unknown location) HOT 7
- Research topic string needs to be sanitized before using it as filename HOT 5
- Code halts if OpenAI rate limit is reached. openai.RateLimitError: Error code: 429 HOT 3
- How can I adjust each part of the output to have as much text as possible? HOT 1
- Is Anthropic / Claude use broken at the moment? -- NOW WITH FIX IN REPLIES HOT 3
- AttributeError: 'list' object has no attribute 'dict' -- NOW WITH FIX HOT 2
- Uvicorn loads but application stalls at "connection open" HOT 3
- [Feature Request] Integrate Wiseflow for Dynamic Knowledge Management
- References from previous report included in current report? HOT 4
- Support for different Embeddings other than OpenAI HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt-researcher.