Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingYAMLAPIKey = &yaml.TypeError{Errors: []string{"missing api key"}}
Functions ¶
This section is empty.
Types ¶
type ClientParameterLayer ¶ added in v0.1.4
type ClientParameterLayer struct {
*layers.ParameterLayerImpl `yaml:",inline"`
}
func NewClientParameterLayer ¶ added in v0.1.4
func NewClientParameterLayer(options ...layers.ParameterLayerOptions) (*ClientParameterLayer, error)
func (*ClientParameterLayer) ParseFlagsFromCobraCommand ¶ added in v0.1.7
func (cp *ClientParameterLayer) ParseFlagsFromCobraCommand( cmd *cobra.Command, ) (map[string]interface{}, error)
type ClientSettings ¶
type ClientSettings struct { APIKey *string `yaml:"api_key,omitempty" glazed.parameter:"openai-api-key"` Timeout *time.Duration `yaml:"timeout,omitempty" glazed.parameter:"openai-timeout"` Organization *string `yaml:"organization,omitempty" glazed.parameter:"openai-organization"` DefaultEngine *string `yaml:"default_engine,omitempty" glazed.parameter:"openai-default-engine"` UserAgent *string `yaml:"user_agent,omitempty" glazed.parameter:"openai-user-agent"` BaseURL *string `yaml:"base_url,omitempty" glazed.parameter:"openai-base-url"` HTTPClient *http.Client `yaml:"omitempty"` }
func NewClientSettings ¶
func NewClientSettings() *ClientSettings
func NewClientSettingsFromParameters ¶ added in v0.1.4
func NewClientSettingsFromParameters(ps map[string]interface{}) (*ClientSettings, error)
func (*ClientSettings) Clone ¶
func (c *ClientSettings) Clone() *ClientSettings
func (*ClientSettings) IsValid ¶
func (c *ClientSettings) IsValid() error
func (*ClientSettings) UnmarshalYAML ¶
func (c *ClientSettings) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML overrides YAML parsing to convert time.duration from int
Click to show internal directories.
Click to hide internal directories.