Completion API: add Store and Metadata parameters (#878)
This commit is contained in:
committed by
GitHub
parent
b162541513
commit
9fe2c6ce1f
5
chat.go
5
chat.go
@@ -255,6 +255,11 @@ type ChatCompletionRequest struct {
|
|||||||
StreamOptions *StreamOptions `json:"stream_options,omitempty"`
|
StreamOptions *StreamOptions `json:"stream_options,omitempty"`
|
||||||
// Disable the default behavior of parallel tool calls by setting it: false.
|
// Disable the default behavior of parallel tool calls by setting it: false.
|
||||||
ParallelToolCalls any `json:"parallel_tool_calls,omitempty"`
|
ParallelToolCalls any `json:"parallel_tool_calls,omitempty"`
|
||||||
|
// Store can be set to true to store the output of this completion request for use in distillations and evals.
|
||||||
|
// https://platform.openai.com/docs/api-reference/chat/create#chat-create-store
|
||||||
|
Store bool `json:"store,omitempty"`
|
||||||
|
// Metadata to store with the completion.
|
||||||
|
Metadata map[string]string `json:"metadata,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type StreamOptions struct {
|
type StreamOptions struct {
|
||||||
|
|||||||
@@ -241,18 +241,20 @@ type CompletionRequest struct {
|
|||||||
LogitBias map[string]int `json:"logit_bias,omitempty"`
|
LogitBias map[string]int `json:"logit_bias,omitempty"`
|
||||||
// Store can be set to true to store the output of this completion request for use in distillations and evals.
|
// Store can be set to true to store the output of this completion request for use in distillations and evals.
|
||||||
// https://platform.openai.com/docs/api-reference/chat/create#chat-create-store
|
// https://platform.openai.com/docs/api-reference/chat/create#chat-create-store
|
||||||
Store bool `json:"store,omitempty"`
|
Store bool `json:"store,omitempty"`
|
||||||
LogProbs int `json:"logprobs,omitempty"`
|
// Metadata to store with the completion.
|
||||||
MaxTokens int `json:"max_tokens,omitempty"`
|
Metadata map[string]string `json:"metadata,omitempty"`
|
||||||
N int `json:"n,omitempty"`
|
LogProbs int `json:"logprobs,omitempty"`
|
||||||
PresencePenalty float32 `json:"presence_penalty,omitempty"`
|
MaxTokens int `json:"max_tokens,omitempty"`
|
||||||
Seed *int `json:"seed,omitempty"`
|
N int `json:"n,omitempty"`
|
||||||
Stop []string `json:"stop,omitempty"`
|
PresencePenalty float32 `json:"presence_penalty,omitempty"`
|
||||||
Stream bool `json:"stream,omitempty"`
|
Seed *int `json:"seed,omitempty"`
|
||||||
Suffix string `json:"suffix,omitempty"`
|
Stop []string `json:"stop,omitempty"`
|
||||||
Temperature float32 `json:"temperature,omitempty"`
|
Stream bool `json:"stream,omitempty"`
|
||||||
TopP float32 `json:"top_p,omitempty"`
|
Suffix string `json:"suffix,omitempty"`
|
||||||
User string `json:"user,omitempty"`
|
Temperature float32 `json:"temperature,omitempty"`
|
||||||
|
TopP float32 `json:"top_p,omitempty"`
|
||||||
|
User string `json:"user,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CompletionChoice represents one of possible completions.
|
// CompletionChoice represents one of possible completions.
|
||||||
|
|||||||
Reference in New Issue
Block a user