Open Morgan-6Freedom opened 1 year ago
Hi @Morgan-6Freedom, yes if you reached the rate limit then OpenAI would let you know with an error message. Could you drop a debug log into this line here to see if it is what OpenAI produces (in that case i cannot really do much) or a bug in the functionality?
Debug.Log(request.downloadHandler.text)
into this line
https://github.com/srcnalt/OpenAI-Unity/blob/fb8af0a6f6869081d8c4c2a6143d7152a2694d61/Runtime/OpenAIApi.cs#L116
Seems like Chat Completion receives results from OpenAI however Text Completion endpoint does not, I will have a look at it later in the evening.
On what I have tested. Text Completion works for ~1min and then constantly sends me empty arrays. But work again later.
This is what the debug log looks like :
Debug.LogError($"DispatchRequest {request.downloadHandler.text}");
This is what it should look like :
Hello.
I use CreateCompletionAsync to use the streaming mode while completing texts. However sometime the returned List is empty. Even if I try to resend the prompt.
Do you have an idea why ? Maybe I reached Rate Limit ? But there is no error.