Skip to content
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

CreateCompletionAsync sometime return an empty array #50

Open
Morgan-6Freedom opened this issue Apr 28, 2023 · 4 comments
Open

CreateCompletionAsync sometime return an empty array #50

Morgan-6Freedom opened this issue Apr 28, 2023 · 4 comments

Comments

@Morgan-6Freedom
Copy link

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.

image

Do you have an idea why ?
Maybe I reached Rate Limit ? But there is no error.

@srcnalt
Copy link
Owner

srcnalt commented Apr 28, 2023

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

@srcnalt
Copy link
Owner

srcnalt commented Apr 28, 2023

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.

@Morgan-6Freedom
Copy link
Author

On what I have tested. Text Completion works for ~1min and then constantly sends me empty arrays. But work again later.

@Morgan-6Freedom
Copy link
Author

Morgan-6Freedom commented Apr 28, 2023

This is what the debug log looks like :

Debug.LogError($"DispatchRequest {request.downloadHandler.text}");

image

This is what it should look like :

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants