-
Notifications
You must be signed in to change notification settings - Fork 12
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
HttpRequest Timeout #2
Comments
Hi @iprovalo thanks for raising this issue. I like adding this functionality. I have been thinking of a cleaner design to implement and came up with setting a request timeout when configuring the OpenAI openAI = OpenAI.newBuilder(System.getenv("OPENAI_API_KEY"))
.requestTimeout(Duration.ofSeconds(10))
.build(); This has been implemented as part of 28bb9c9 |
Thank you, @StefanBratanov, this is very helpful! I agree it cover most cases! However, if possible, a per-request flexibility could be very useful, for example, in my case, some request types may be systemically slower than the others, it would help to differentiate them. Thank you! |
I agree it would be very nice and flexible to modify the |
In the ChatClient (or any client) it would be nice to have a timeout for the HttpRequest:
The text was updated successfully, but these errors were encountered: