Closed soderluk closed 6 months ago
@mattvr Updated, tested, and still an empty response. I debugged some more, and the chunks
is never filled, because frameEnd
already is -1
. We never get to the for-loop, where the error is thrown: for (const chunk of chunks)
. Also, it would be beneficial if the error that was returned from OpenAI would be shown, instead of "error found".
If your
OPENAI_API_KEY
exceeds the quota, you'll only get an empty response fromgpt
. The actual response from openai:This error should be handled, and a message should be shown to the user that their quota has been exceeded.
lib/ai.ts:258
is where the result is decoded into this message.