Skip to content

Commit ff698dd

Browse files
committed
feat: sb商汤流式
1 parent e5e0a66 commit ff698dd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

chat_stream.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,18 @@ type ChatCompletionTokenLogprobTopLogprob struct {
3737
Logprob float64 `json:"logprob"`
3838
}
3939

40+
type MessageData struct {
41+
Role string `json:"role"`
42+
Content string `json:"content"`
43+
}
4044
type ChatCompletionStreamChoice struct {
4145
Index int `json:"index"`
4246
Delta ChatCompletionStreamChoiceDelta `json:"delta"`
4347
Logprobs *ChatCompletionStreamChoiceLogprobs `json:"logprobs,omitempty"`
4448
FinishReason FinishReason `json:"finish_reason"`
4549
ContentFilterResults ContentFilterResults `json:"content_filter_results,omitempty"`
4650
// sb sentence
47-
Message string `json:"message,omitempty"`
51+
Message MessageData `json:"message,omitempty"`
4852
}
4953

5054
type PromptFilterResult struct {

0 commit comments

Comments
 (0)