-
Notifications
You must be signed in to change notification settings - Fork 109
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
Setting timeouts #6
Comments
I'm glad you're using this project. I have added a parameter requestTimeout with a default value of 10 seconds. When constructing an OpenAI, you can set this parameter according to your needs. @Test
void testOpenAICall() {
OpenAI llm = OpenAI.builder()
.maxTokens(16)
.requestTimeout(15)
.build()
.init();
assertThat(llm.call("Say foo:")).isEqualTo("\n\nFoo!");
} If you still need environment variables, we can continue the discussion. |
Hey @HamaWhiteGG thank you! I have a workaround exactly this :) with this config, I do not need any additional environment variable. |
Thanks again! |
Hey.. thanks for writing this library. It works perfect for my usecase. however I use gpt-4 for my queries and 99% of my requests timeout, because the requests take a bit longer than 10 secs. There doesn't seem to be a way to increase the timeout. An environment variable to setup this param would be perfect.
Thank you.
The text was updated successfully, but these errors were encountered: