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

error making request: Post "https://api.openai.com/v1/chat/completions": context deadline exceeded (Client.Timeout exceeded while awaiting headers) #24

Open
steinathan opened this issue Apr 16, 2023 · 1 comment

Comments

@steinathan
Copy link

steinathan commented Apr 16, 2023

Having issue:

error making request: Post "https://api.openai.com/v1/chat/completions": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

any reason why? we may need to increase the default context timeout for longer delayed responses

@steinathan
Copy link
Author

steinathan commented Apr 16, 2023

Works so far

timeout := time.Minute * 3
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()

but im thinking the streaming API maybe better

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

1 participant