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

Calls to ChatGPT may benefit from a timeout #88

Open
hedleyroos opened this issue Oct 17, 2023 · 0 comments
Open

Calls to ChatGPT may benefit from a timeout #88

hedleyroos opened this issue Oct 17, 2023 · 0 comments

Comments

@hedleyroos
Copy link

Calls like https://github.com/minimaxir/simpleaichat/blob/main/simpleaichat/chatgpt.py#L311 may cause us to wait very long for a response. Things go wrong with networks and OpenAI, and the call will only be terminated when the TCP timeout limit is reached and the socket destroyed.

The code already retrieves the OpenAI API key from an env var, so perhaps the same approach can be used for timeouts?

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