Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HelpersParameterLayer ¶ added in v0.1.4
func HelpersParameterLayer() (layers.ParameterLayer, error)
Types ¶
type GeppettoCommand ¶
type GeppettoCommand struct { *glazedcmds.CommandDescription Factories map[string]interface{} `yaml:"__factories,omitempty"` Prompt string Messages []*geppetto_context.Message SystemPrompt string }
func NewGeppettoCommand ¶ added in v0.1.4
func NewGeppettoCommand( description *glazedcmds.CommandDescription, factories map[string]interface{}, options ...GeppettoCommandOption, ) (*GeppettoCommand, error)
func (*GeppettoCommand) Run ¶
func (g *GeppettoCommand) Run( ctx context.Context, parsedLayers map[string]*layers.ParsedParameterLayer, ps map[string]interface{}, gp middlewares.Processor, ) error
type GeppettoCommandDescription ¶
type GeppettoCommandDescription struct { Name string `yaml:"name"` Short string `yaml:"short"` Long string `yaml:"long,omitempty"` Flags []*parameters.ParameterDefinition `yaml:"flags,omitempty"` Arguments []*parameters.ParameterDefinition `yaml:"arguments,omitempty"` Layers []layers.ParameterLayer `yaml:"layers,omitempty"` // TODO(manuel, 2023-02-04) This now has a hack to switch the step type Step *steps.StepDescription `yaml:"step,omitempty"` Prompt string `yaml:"prompt,omitempty"` Messages []*geppetto_context.Message `yaml:"messages,omitempty"` SystemPrompt string `yaml:"system-prompt,omitempty"` }
type GeppettoCommandLoader ¶
type GeppettoCommandLoader struct { }
func (*GeppettoCommandLoader) LoadCommandAliasFromYAML ¶
func (g *GeppettoCommandLoader) LoadCommandAliasFromYAML(s io.Reader, options ...alias.Option) ([]*alias.CommandAlias, error)
func (*GeppettoCommandLoader) LoadCommandFromYAML ¶
func (g *GeppettoCommandLoader) LoadCommandFromYAML( s io.Reader, options ...glazedcmds.CommandDescriptionOption, ) ([]glazedcmds.Command, error)
type GeppettoCommandOption ¶ added in v0.2.0
type GeppettoCommandOption func(*GeppettoCommand)
func WithMessages ¶ added in v0.2.0
func WithMessages(messages []*geppetto_context.Message) GeppettoCommandOption
func WithPrompt ¶ added in v0.2.0
func WithPrompt(prompt string) GeppettoCommandOption
func WithSystemPrompt ¶ added in v0.2.0
func WithSystemPrompt(systemPrompt string) GeppettoCommandOption
Click to show internal directories.
Click to hide internal directories.