@@ -89,18 +89,18 @@ type ChatCompletionResponseFormat struct {
89
89
90
90
// ChatCompletionRequest represents a request structure for chat completion API.
91
91
type ChatCompletionRequest struct {
92
- Model string `json:"model"`
93
- Messages []ChatCompletionMessage `json:"messages"`
94
- MaxTokens int `json:"max_tokens,omitempty"`
95
- Temperature float32 `json:"temperature,omitempty"`
96
- TopP float32 `json:"top_p,omitempty"`
97
- N int `json:"n,omitempty"`
98
- Stream bool `json:"stream,omitempty"`
99
- Stop []string `json:"stop,omitempty"`
100
- PresencePenalty float32 `json:"presence_penalty,omitempty"`
101
- ResponseFormat ChatCompletionResponseFormat `json:"response_format,omitempty"`
102
- Seed * int `json:"seed,omitempty"`
103
- FrequencyPenalty float32 `json:"frequency_penalty,omitempty"`
92
+ Model string `json:"model"`
93
+ Messages []ChatCompletionMessage `json:"messages"`
94
+ MaxTokens int `json:"max_tokens,omitempty"`
95
+ Temperature float32 `json:"temperature,omitempty"`
96
+ TopP float32 `json:"top_p,omitempty"`
97
+ N int `json:"n,omitempty"`
98
+ Stream bool `json:"stream,omitempty"`
99
+ Stop []string `json:"stop,omitempty"`
100
+ PresencePenalty float32 `json:"presence_penalty,omitempty"`
101
+ ResponseFormat * ChatCompletionResponseFormat `json:"response_format,omitempty"`
102
+ Seed * int `json:"seed,omitempty"`
103
+ FrequencyPenalty float32 `json:"frequency_penalty,omitempty"`
104
104
// LogitBias is must be a token id string (specified by their token ID in the tokenizer), not a word string.
105
105
// incorrect: `"logit_bias":{"You": 6}`, correct: `"logit_bias":{"1639": 6}`
106
106
// refs: https://platform.openai.com/docs/api-reference/chat/create#chat/create-logit_bias
0 commit comments