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 ChatParameterLayer ¶
type ChatParameterLayer struct {
*layers.ParameterLayerImpl `yaml:",inline"`
}
func NewChatParameterLayer ¶
func NewChatParameterLayer(options ...layers.ParameterLayerOptions) (*ChatParameterLayer, error)
func (*ChatParameterLayer) ParseFlagsFromCobraCommand ¶ added in v0.2.22
func (d *ChatParameterLayer) ParseFlagsFromCobraCommand(cmd *cobra.Command) (map[string]interface{}, error)
type ChatSettings ¶
type ChatSettings struct { Engine *string `yaml:"engine,omitempty" glazed.parameter:"ai-engine"` MaxResponseTokens *int `yaml:"max_response_tokens,omitempty" glazed.parameter:"ai-max-response-tokens"` TopP *float64 `yaml:"top_p,omitempty" glazed.parameter:"ai-top-p"` Temperature *float64 `yaml:"temperature,omitempty" glazed.parameter:"ai-temperature"` Stop []string `yaml:"stop,omitempty" glazed.parameter:"ai-stop"` Stream bool `yaml:"stream,omitempty" glazed.parameter:"ai-stream"` }
func NewChatSettings ¶
func NewChatSettings() *ChatSettings
func NewChatSettingsFromParameters ¶
func NewChatSettingsFromParameters(ps map[string]interface{}) (*ChatSettings, error)
func (*ChatSettings) Clone ¶
func (s *ChatSettings) Clone() *ChatSettings
func (*ChatSettings) UpdateFromParsedLayer ¶
func (s *ChatSettings) UpdateFromParsedLayer(layer *layers.ParsedParameterLayer) error
type ClientParameterLayer ¶
type ClientParameterLayer struct {
*layers.ParameterLayerImpl `yaml:",inline"`
}
func NewClientParameterLayer ¶
func NewClientParameterLayer(options ...layers.ParameterLayerOptions) (*ClientParameterLayer, error)
func (*ClientParameterLayer) ParseFlagsFromCobraCommand ¶
func (cp *ClientParameterLayer) ParseFlagsFromCobraCommand( cmd *cobra.Command, ) (map[string]interface{}, error)
type ClientSettings ¶
type ClientSettings struct { Timeout *time.Duration `yaml:"timeout,omitempty"` TimeoutSeconds *int `yaml:"timeout_second,omitempty" glazed.parameter:"timeout"` Organization *string `yaml:"organization,omitempty" glazed.parameter:"organization"` UserAgent *string `yaml:"user_agent,omitempty" glazed.parameter:"user-agent"` HTTPClient *http.Client `yaml:"omitempty"` }
func NewClientSettings ¶
func NewClientSettings() *ClientSettings
func NewClientSettingsFromParameters ¶
func NewClientSettingsFromParameters(ps map[string]interface{}) (*ClientSettings, error)
func (*ClientSettings) Clone ¶
func (c *ClientSettings) Clone() *ClientSettings
func (*ClientSettings) UnmarshalYAML ¶
func (c *ClientSettings) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML overrides YAML parsing to convert time.duration from int
func (*ClientSettings) UpdateFromParameters ¶
func (cs *ClientSettings) UpdateFromParameters(parsedLayers *layers.ParsedParameterLayer) error
func (*ClientSettings) UpdateFromParsedLayer ¶
func (cs *ClientSettings) UpdateFromParsedLayer(layer *layers.ParsedParameterLayer) error
type StepSettings ¶
type StepSettings struct { Chat *ChatSettings `yaml:"chat,omitempty"` OpenAI *openai.Settings `yaml:"openai,omitempty"` Client *ClientSettings `yaml:"client,omitempty"` Claude *claude.Settings `yaml:"claude,omitempty"` }
func NewStepSettings ¶ added in v0.2.24
func NewStepSettings() *StepSettings
func NewStepSettingsFromYAML ¶
func NewStepSettingsFromYAML(s io.Reader) (*StepSettings, error)
func (*StepSettings) Clone ¶
func (s *StepSettings) Clone() *StepSettings
func (*StepSettings) UpdateFromParsedLayers ¶
func (s *StepSettings) UpdateFromParsedLayers(parsedLayers map[string]*layers.ParsedParameterLayer) error
Click to show internal directories.
Click to hide internal directories.