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

panic: context deadline exceeded #2

Closed
Menziess opened this issue Mar 28, 2023 · 5 comments · Fixed by #3
Closed

panic: context deadline exceeded #2

Menziess opened this issue Mar 28, 2023 · 5 comments · Fixed by #3

Comments

@Menziess
Copy link

I'm receiving this error while ChatGPT is writing out the response in the terminal:

goroutine 1 [running]:
main.main()
	/home/<name>/go/pkg/mod/github.com/stillmatic/chat@v0.2.2/main.go:136 +0x1c5
@rfahmi
Copy link

rfahmi commented Mar 29, 2023

same here

@TechDufus
Copy link
Contributor

If you both (@rfahmi @Menziess) want to pull my forked branch and build / test locally to see if #3 resolves this for you, you can..

@Menziess
Copy link
Author

The issue seems to be resolved.

@stillmatic
Copy link
Owner

The original motivation was that the API server was quite unreliable and failing to connect; 20 seconds was probably too long (especially for long responses) but some window is helpful. It's probably better to cancel it based on when the first byte arrives to the stream (i.e. give 2 seconds for the API to respond, otherwise cancel). That was quite tricky to get right unfortunately.

It's removed now, thanks for the fix!

@TechDufus
Copy link
Contributor

Going to resurrect this....

panic: context deadline exceeded (Client.Timeout or context cancellation while reading body)

goroutine 1 [running]:
main.main()
        /home/techdufus/go/pkg/mod/github.com/stillmatic/chat@v0.2.3/main.go:133 +0x1c5

The chat session lasted much longer thanks to v0.2.3 but still isn't completely resolved it seems?

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

Successfully merging a pull request may close this issue.

4 participants