Continue completion response
Is there a way to continue a completion response if the reason is length? I get a
java.net.SocketTimeoutException: timeout
at io.reactivex.internal.util.ExceptionHelper.wrapOrThrow(ExceptionHelper.java:45)
at io.reactivex.internal.observers.BlockingMultiObserver.blockingGet(BlockingMultiObserver.java:90)
at io.reactivex.Single.blockingGet(Single.java:2002)
at com.theokanning.openai.OpenAiService.createCompletion(OpenAiService.java:91)
when I set maxTokens>500
Have you tried to provide a timeout parameter when creating the service?
var service = new OpenAiService(apiToken, API_SOCKET_TIMEOUT);
@ffritsche I think ferreirarod has the right solution here, have you tried increasing the timeout to 30 seconds?
Hey thanks that helps. But is there a way to continue the results like in the playground?
It does allow two arguments token and timeout
On Mon, Jan 16, 2023, 4:05 PM kazihar Cannei @.***> wrote:
Have you tried to provide a timeout parameter when creating the service?
var service = new OpenAiService(apiToken, API_SOCKET_TIMEOUT);
OpenAiService constructor doesn't allow two arguments, it allows apiToken only, how can i tweak it?
— Reply to this email directly, view it on GitHub https://github.com/TheoKanning/openai-java/issues/49#issuecomment-1383874149, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5FTG32FHGHHGVVVDQBAZ7DWSUTPRANCNFSM6AAAAAATEKSLBY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Moving this to https://github.com/TheoKanning/openai-java/issues/75