Code Monkey home page Code Monkey logo

Comments (3)

rotemweiss57 avatar rotemweiss57 commented on August 30, 2024

Hi @OumYacout can you share the entire Traceback logs?

from gpt-researcher.

OumYacout avatar OumYacout commented on August 30, 2024

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.

OumYacout avatar OumYacout commented on August 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.