Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alexanderradahl opened this issue Apr 11, 2024 · 8 comments
Open

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

alexanderradahl opened this issue Apr 11, 2024 · 8 comments

Comments

@alexanderradahl
Copy link

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?

@assafelovic
Copy link
Owner

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

@pratham-darooka
Copy link

@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.')

@assafelovic
Copy link
Owner

@proy9714 can you help?

@pratham-darooka
Copy link

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

@assafelovic
Copy link
Owner

That's probably it, thanks @pratham-darooka

@pax-k
Copy link

pax-k commented May 8, 2024

Closing is not a fix @assafelovic

@Readon
Copy link

Readon commented May 13, 2024

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
Copy link

Readon commented May 13, 2024

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

@assafelovic assafelovic reopened this May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants