ChatCompletionRequest represents a request structure for chat completion API.
| 22 | |
| 23 | // ChatCompletionRequest represents a request structure for chat completion API. |
| 24 | type ChatCompletionRequest struct { |
| 25 | Model string `json:"model"` |
| 26 | Messages []ChatCompletionMessage `json:"messages"` |
| 27 | MaxTokens int `json:"max_tokens,omitempty"` |
| 28 | Temperature float32 `json:"temperature,omitempty"` |
| 29 | TopP float32 `json:"top_p,omitempty"` |
| 30 | N int `json:"n,omitempty"` |
| 31 | Stream bool `json:"stream,omitempty"` |
| 32 | Stop []string `json:"stop,omitempty"` |
| 33 | PresencePenalty float32 `json:"presence_penalty,omitempty"` |
| 34 | FrequencyPenalty float32 `json:"frequency_penalty,omitempty"` |
| 35 | LogitBias map[string]int `json:"logit_bias,omitempty"` |
| 36 | User string `json:"user,omitempty"` |
| 37 | } |
| 38 | |
| 39 | // ChatCompletionMessage represents a message structure for chat completion API. |
| 40 | type ChatCompletionMessage struct { |
nothing calls this directly
no outgoing calls
no test coverage detected