From c6a63ed19aeb0e91facc5409c5a08612db550fb2 Mon Sep 17 00:00:00 2001 From: Mike Chaykowsky Date: Tue, 16 Apr 2024 12:28:06 -0700 Subject: [PATCH] Add PromptFilterResult (#702) --- chat_stream.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/chat_stream.go b/chat_stream.go index 57cfa78..6ff7078 100644 --- a/chat_stream.go +++ b/chat_stream.go @@ -19,13 +19,19 @@ type ChatCompletionStreamChoice struct { ContentFilterResults ContentFilterResults `json:"content_filter_results,omitempty"` } +type PromptFilterResult struct { + Index int `json:"index"` + ContentFilterResults ContentFilterResults `json:"content_filter_results,omitempty"` +} + type ChatCompletionStreamResponse struct { - ID string `json:"id"` - Object string `json:"object"` - Created int64 `json:"created"` - Model string `json:"model"` - Choices []ChatCompletionStreamChoice `json:"choices"` - PromptAnnotations []PromptAnnotation `json:"prompt_annotations,omitempty"` + ID string `json:"id"` + Object string `json:"object"` + Created int64 `json:"created"` + Model string `json:"model"` + Choices []ChatCompletionStreamChoice `json:"choices"` + PromptAnnotations []PromptAnnotation `json:"prompt_annotations,omitempty"` + PromptFilterResults []PromptFilterResult `json:"prompt_filter_results,omitempty"` } // ChatCompletionStream