MCPcopy Create free account
hub / github.com/coderabbit214/document-ai / ChatCompletionRequest

Struct ChatCompletionRequest

pkg/openai/chat.go:24–37  ·  view source on GitHub ↗

ChatCompletionRequest represents a request structure for chat completion API.

Source from the content-addressed store, hash-verified

22
23// ChatCompletionRequest represents a request structure for chat completion API.
24type 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.
40type ChatCompletionMessage struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected