Open aryanshridhar opened 1 week ago
For anyone facing issue till this is fixed, can rely on FinishReason explicitly and return if present
response, err := stream.Recv()
isOver := response.Choices[0].FinishReason
if errors.Is(err, io.EOF) || len(isOver) > 0 {
return
}
To Reproduce When streamed chat completion with request having StreamOptions defined as -
breaks for last chunk-
Expected behavior The condition to his the EOF error and stop the streaming process.
Environment (please complete the following information):