Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Config Config
}
type Config ¶
type Config struct {
// ApiKey is the OpenAI API key.
ApiKey string `config:"openai.apikey"`
// OpenAI request configuration
RequestBase
}
type RequestBase ¶
type RequestBase struct {
Model string `json:"model" config:"openai.model"`
Temperature float64 `json:"temperature" config:"openai.temperature"`
MaxTokens int `json:"max_tokens" config:"openai.maxtokens"`
TopP float64 `json:"top_p" config:"openai.topp"`
FrequencyPenalty float64 `json:"frequency_penalty" config:"openai.frequencypenalty"`
PresencePenalty float64 `json:"presence_penalty" config:"openai.presencepenalty"`
}
RequestBase will be used in the request body.
Click to show internal directories.
Click to hide internal directories.