diff --git a/wavesrv/pkg/remote/openai/openai.go b/wavesrv/pkg/remote/openai/openai.go index 4b060d2d6..a8fb16542 100644 --- a/wavesrv/pkg/remote/openai/openai.go +++ b/wavesrv/pkg/remote/openai/openai.go @@ -190,7 +190,7 @@ func RunCompletionStream(ctx context.Context, opts *sstore.OpenAIOptsType, promp pk := packet.MakeOpenAIPacket() pk.Index = choice.Index pk.Text = choice.Delta.Content - pk.FinishReason = choice.FinishReason + pk.FinishReason = string(choice.FinishReason) rtn <- pk } } @@ -209,7 +209,7 @@ func marshalResponse(resp openaiapi.ChatCompletionResponse) []*packet.OpenAIPack choicePk := packet.MakeOpenAIPacket() choicePk.Index = choice.Index choicePk.Text = choice.Message.Content - choicePk.FinishReason = choice.FinishReason + choicePk.FinishReason = string(choice.FinishReason) rtn = append(rtn, choicePk) } return rtn