Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatCompletionChoice ¶
type ChatCompletionChoice struct {
FinishedReason string `json:"finish_reason"`
Index int `json:"index"`
Message ChatCompletionMessage `json:"message"`
}
type ChatCompletionMessage ¶
type ChatCompletionParams ¶
type ChatCompletionParams struct {
Model string `json:"model"`
Messages []ChatCompletionMessage `json:"messages"`
}
type ChatCompletionResult ¶
type ChatCompletionResult struct {
Choices []ChatCompletionChoice `json:"choices"`
}
type Client ¶
type Client interface {
GenerateChatCompletion(ctx context.Context, params *ChatCompletionParams) (*ChatCompletionResult, error)
}
Client implements the OpenAI API client with minimal functionality
type ErrorResponse ¶
type ErrorResponse struct {
Error Error `json:"error"`
}
Click to show internal directories.
Click to hide internal directories.