openai-java icon indicating copy to clipboard operation
openai-java copied to clipboard

Consumed an empty ChatCompletionChunk

Open CmdSmith opened this issue 1 year ago • 0 comments

Consuming an empty ChatCompletionChunk seems to parse the abnormal data in the stream into normal data.

Response<ResponseBody> response:

Response{protocol=http/1.1, code=200, message=OK, url=http://xxxxx/v1/chat/completions}

response.body():

data: {"error":{"message":"That model is currently overloaded with other requests. You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID 978a9377b6e32fe77120273d6fd99f3f in your message.)","type":"server_error","param":null,"code":null}}

data: [DONE]

ChatCompletionChunk:

ChatCompletionChunk(id=null, object=null, created=0, model=null, choices=null)

CmdSmith avatar Jul 06 '23 10:07 CmdSmith