Skip to content

Commit

Permalink
add content filter results on completion output
Browse files Browse the repository at this point in the history
  • Loading branch information
juliomartinsdev committed Sep 27, 2024
1 parent 9cfe3cf commit 37540d2
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,19 +344,21 @@ type ChatCompletionChoice struct {
// function_call: The model decided to call a function
// content_filter: Omitted content due to a flag from our content filters
// null: API response still in progress or incomplete
FinishReason FinishReason `json:"finish_reason"`
LogProbs *LogProbs `json:"logprobs,omitempty"`
FinishReason FinishReason `json:"finish_reason"`
LogProbs *LogProbs `json:"logprobs,omitempty"`
ContentFilterResults ContentFilterResults `json:"content_filter_results,omitempty"`
}

// ChatCompletionResponse represents a response structure for chat completion API.
type ChatCompletionResponse struct {
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
Model string `json:"model"`
Choices []ChatCompletionChoice `json:"choices"`
Usage Usage `json:"usage"`
SystemFingerprint string `json:"system_fingerprint"`
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
Model string `json:"model"`
Choices []ChatCompletionChoice `json:"choices"`
Usage Usage `json:"usage"`
SystemFingerprint string `json:"system_fingerprint"`
PromptFilterResults []PromptFilterResult `json:"prompt_filter_results,omitempty"`

httpHeader
}
Expand Down

0 comments on commit 37540d2

Please sign in to comment.