Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatCompletionChunkResponse ¶
type ChatCompletionChunkResponse struct {
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
Model string `json:"model"`
Choices []ChunkChoice `json:"choices"`
}
type ChatCompletionRequest ¶
type ChatCompletionRequest struct {
Model string `json:"model"`
Messages []ChatMessage `json:"messages"`
Temperature float32 `json:"temperature,omitempty"`
MaxTokens int `json:"max_tokens,omitempty"`
Stream bool `json:"stream,omitempty"`
ResponseFormat *ResponseFormat `json:"response_format,omitempty"`
}
type ChatCompletionResponse ¶
type ChatMessage ¶
type Choice ¶
type Choice struct {
Index int `json:"index"`
Message ChatMessage `json:"message"`
FinishReason string `json:"finish_reason"`
}
type ChunkChoice ¶
type ChunkChoice struct {
Index int `json:"index"`
Delta ChunkDelta `json:"delta"`
FinishReason *string `json:"finish_reason"`
}
type ChunkDelta ¶
type ChunkDelta struct {
Content string `json:"content,omitempty"`
}
type EmbeddingRequest ¶
type EmbeddingRequest struct {
Model string `json:"model"`
Input []string `json:"-"` // Handled by custom unmarshaler
}
func (*EmbeddingRequest) UnmarshalJSON ¶
func (r *EmbeddingRequest) UnmarshalJSON(data []byte) error
type EmbeddingResponse ¶
type ResponseFormat ¶
type ResponseFormat struct {
Type string `json:"type"` // e.g., "json_object"
}
type TargetJSONOutput ¶
Click to show internal directories.
Click to hide internal directories.