-
Notifications
You must be signed in to change notification settings - Fork 1.2k
SocketTimeoutException with OpenAiService#createCompletion #5
Comments
There's no way to modify anything within |
I have the same problem. Is it possible to simply have a setTimeout() method somewhere in the api ? |
@TheoKanning Thank you for this toolkit. This is really useful. |
Just more info. After switching to text-davinci-002, it takes more time than the default timeout about 60% of the time. |
If certain engines are timing out regularly, then OpenAiService needs a timeout parameter. I also added a constructor that takes an OpenAiApi, and this will allow users to customize their api settings much more easily. If we need more parameters later, I might add a builder for OpenAiService. Based on feedback in #5
If certain engines are timing out regularly, then OpenAiService needs a timeout parameter. I also added a constructor that takes an OpenAiApi, and this will allow users to customize their api settings much more easily. If we need more parameters later, I might add a builder for OpenAiService. Based on feedback in #5
I ended up just importing the project as a gradle project into eclipse and set the dependency. I still think it'd be useful to have a parameter or to be able to access the api object directly to set it, but my problem is solved. Thank you again!
|
@gbolcer you beat me to it haha. I just added a timeout option to fix this. I also added much easier way to provide your own OpenAiApi in case you want to customize something else without copying the entire OpenAiService. Version 0.7.0 with the changes will be available very soon |
Thank you all for pointing this out to me! Version 0.7.0 is live with the new timeout parameter, marking as closed 👍 |
Again, kudos for the api. This is extremely useful. |
Randomly, unbeknownst to me, I get a SocketTimeoutExeption during some executions for createCompletion. I don't know how to increase the connection timeout for OpenAiService and was wondering if I could get some advice, thanks.
The text was updated successfully, but these errors were encountered: