When using streaming API, the FinishReason in the response is not correctly set when the reason should be FinishReasonMaxTokens.
This happens because on the last response, the content is empty, which leads it to return early without recording the FinishReason.
|
if respCandidate.Content == nil { |