From 042d55cfd356b4197b14d0b9e46b6b4b152da64f Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Wed, 10 Jan 2024 13:57:49 +0800 Subject: [PATCH] fix: fix response choice json --- controller/relay.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/relay.go b/controller/relay.go index e81306d8..0ee75225 100644 --- a/controller/relay.go +++ b/controller/relay.go @@ -248,7 +248,7 @@ type ChatCompletionsStreamResponseChoice struct { Delta struct { Content string `json:"content"` } `json:"delta"` - FinishReason *string `json:"finish_reason"` + FinishReason *string `json:"finish_reason,omitempty"` } type ChatCompletionsStreamResponse struct {