gpt-researcher icon indicating copy to clipboard operation
gpt-researcher copied to clipboard

Doesn't seem to finish/write the length I want

Open alexanderradahl opened this issue 1 year ago • 8 comments
trafficstars

I've tried tweaking the config file to write content around 3k-4k words, but I can't get it to do longer than 1.5k words, and then it seems to stop in the middle of writing the content. It stops at a random paragraph without any conclusion or seeming to finish.

Checking the logs, it was still researching and looking for information. Is there some hard time limit built-in or a token setting I need to tweak to have it written for longer?

alexanderradahl avatar Apr 11 '24 09:04 alexanderradahl

@alexanderradahl can you please share your configs, the results, etc? Has the research finished and allows you to download pdf/docx?

assafelovic avatar Apr 11 '24 12:04 assafelovic

@alexanderradahl @assafelovic I ran into the same problem. The agent stopped but the output was partial. Here is part of the stack trace I got: File "/Users/prathamdarooka/Desktop/gpt-researcher/gpt_researcher/master/agent.py", line 74, in conduct_research await stream_output("logs", self.agent, self.websocket) File "/Users/prathamdarooka/Desktop/gpt-researcher/gpt_researcher/master/functions.py", line 270, in stream_output await websocket.send_json({"type": type, "output": output}) File "/Users/prathamdarooka/Desktop/gpt-researcher/.venv/lib/python3.12/site-packages/starlette/websockets.py", line 198, in send_json await self.send({"type": "websocket.send", "text": text}) File "/Users/prathamdarooka/Desktop/gpt-researcher/.venv/lib/python3.12/site-packages/starlette/websockets.py", line 112, in send raise RuntimeError('Cannot call "send" once a close message has been sent.')

pratham-darooka avatar Apr 16 '24 19:04 pratham-darooka

@proy9714 can you help?

assafelovic avatar Apr 17 '24 05:04 assafelovic

@assafelovic @proy9714 It is a very intermittent issue, perhaps due to the non-deterministic nature of the LLM.

pratham-darooka avatar Apr 17 '24 08:04 pratham-darooka

That's probably it, thanks @pratham-darooka

assafelovic avatar Apr 30 '24 14:04 assafelovic

Closing is not a fix @assafelovic

pax-k avatar May 08 '24 10:05 pax-k

I met this also while doing "Detailed" research. While gpt-researcher searching for subtopics. Here is the prompting of backend.

Subtopics: subtopics=[Subtopic(task='xxxxxx'), Subtopic(task='yyyyyy'), Subtopic(task='zzzzz')]           
INFO:     connection closed                                                                                                                                                                                     
INFO:     connection closed  

It seems that the connection of websocket have been closed. Is that possible because of a long idle time without activation?

Readon avatar May 13 '24 15:05 Readon

I have tested gpt-researcher with a smaller LLM which pass the generation.

Readon avatar May 13 '24 15:05 Readon

Closing because of staleness. Generally using different LLMs is your responsibility other than GPT which is heavily tested with this project.

assafelovic avatar Jun 12 '24 06:06 assafelovic