Skip to content

Commit c6a63ed

Browse files
authored
Add PromptFilterResult (#702)
1 parent a42f519 commit c6a63ed

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

chat_stream.go

+12-6
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,19 @@ type ChatCompletionStreamChoice struct {
1919
ContentFilterResults ContentFilterResults `json:"content_filter_results,omitempty"`
2020
}
2121

22+
type PromptFilterResult struct {
23+
Index int `json:"index"`
24+
ContentFilterResults ContentFilterResults `json:"content_filter_results,omitempty"`
25+
}
26+
2227
type ChatCompletionStreamResponse struct {
23-
ID string `json:"id"`
24-
Object string `json:"object"`
25-
Created int64 `json:"created"`
26-
Model string `json:"model"`
27-
Choices []ChatCompletionStreamChoice `json:"choices"`
28-
PromptAnnotations []PromptAnnotation `json:"prompt_annotations,omitempty"`
28+
ID string `json:"id"`
29+
Object string `json:"object"`
30+
Created int64 `json:"created"`
31+
Model string `json:"model"`
32+
Choices []ChatCompletionStreamChoice `json:"choices"`
33+
PromptAnnotations []PromptAnnotation `json:"prompt_annotations,omitempty"`
34+
PromptFilterResults []PromptFilterResult `json:"prompt_filter_results,omitempty"`
2935
}
3036

3137
// ChatCompletionStream

0 commit comments

Comments
 (0)