Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatCompletion ¶
type ChatCompletion struct { Object string `json:"object"` ID string `json:"id"` Model string `json:"model"` Created int64 `json:"created"` Choices []ChatCompletionChoice `json:"choices"` }
type ChatCompletionChoice ¶
type ChatCompletionChoice struct { Index int `json:"index"` Delta *ChatCompletionMessage `json:"delta,omitempty"` Message *ChatCompletionMessage `json:"message,omitempty"` FinishReason *CompletionReason `json:"finish_reason"` }
type ChatCompletionContent ¶
type ChatCompletionMessage ¶
type ChatCompletionMessage struct { Role MessageRole `json:"role,omitempty"` Content string `json:"content"` }
type ChatCompletionRequest ¶
type CompletionReason ¶
type CompletionReason string
var ( CompletionReasonStop CompletionReason = "stop" CompletionReasonLength CompletionReason = "length" CompletionReasonEOS CompletionReason = "eos_token" )
type MessageRole ¶
type MessageRole string
var ( MessageRoleSystem MessageRole = "system" MessageRoleUser MessageRole = "user" MessageRoleAssistant MessageRole = "assistant" )
Click to show internal directories.
Click to hide internal directories.