thivy/azure-openai-js-stream

Add error handling when the `choices` array of ChatCompletion API response is null

ks6088ts opened this issue · 0 comments

Recently ChatCompletion API began to return null choices array, so the app sometimes crash when stream mode is enabled.
ref. https://github.com/thivy/azure-openai-js-stream/blob/master/app/api/azure-openai/sse-parser.ts#L52