Documentation
¶
Index ¶
- func BuildCobraCommandWithGeppettoMiddlewares(cmd cmds.Command, options ...cli.CobraParserOption) (*cobra.Command, error)
- func CreateGeppettoLayers(stepSettings *settings.StepSettings, opts ...GeppettoLayerOption) ([]layers.ParameterLayer, error)
- func GetCobraCommandGeppettoMiddlewares(commandSettings *cli.GlazedCommandSettings, cmd *cobra.Command, args []string) ([]middlewares.Middleware, error)
- func LoadConfig() (*settings.StepSettings, error)
- func LoadConfigFromSettings(settings_ cli.GlazedCommandSettings) (*settings.StepSettings, error)
- func LoadFromYAML(b []byte) ([]cmds.Command, error)
- type GeppettoLayerOption
- type PinocchioCommand
- func (g *PinocchioCommand) CreateConversationManager(variables map[string]interface{}, options ...builder.ConversationManagerOption) (conversation.Manager, error)
- func (g *PinocchioCommand) RunIntoWriter(ctx context.Context, parsedLayers *layers.ParsedLayers, w io.Writer) error
- func (g *PinocchioCommand) RunWithOptions(ctx context.Context, options ...run.RunOption) ([]*conversation.Message, error)
- type PinocchioCommandDescription
- type PinocchioCommandLoader
- type PinocchioCommandOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGeppettoLayers ¶
func CreateGeppettoLayers(stepSettings *settings.StepSettings, opts ...GeppettoLayerOption) ([]layers.ParameterLayer, error)
func GetCobraCommandGeppettoMiddlewares ¶
func GetCobraCommandGeppettoMiddlewares( commandSettings *cli.GlazedCommandSettings, cmd *cobra.Command, args []string, ) ([]middlewares.Middleware, error)
func LoadConfig ¶
func LoadConfig() (*settings.StepSettings, error)
func LoadConfigFromSettings ¶
func LoadConfigFromSettings(settings_ cli.GlazedCommandSettings) (*settings.StepSettings, error)
LoadConfigFromSettings loads the geppetto step settings from the given profile and config file.
Types ¶
type GeppettoLayerOption ¶ added in v0.4.19
type GeppettoLayerOption func(*geppettoLayerOptions)
func WithHelpersLayer ¶ added in v0.4.19
func WithHelpersLayer() GeppettoLayerOption
type PinocchioCommand ¶ added in v0.4.17
type PinocchioCommand struct { *glazedcmds.CommandDescription `yaml:",inline"` Prompt string `yaml:"prompt,omitempty"` Messages []*conversation.Message `yaml:"messages,omitempty"` SystemPrompt string `yaml:"system-prompt,omitempty"` }
func NewPinocchioCommand ¶ added in v0.4.17
func NewPinocchioCommand( description *glazedcmds.CommandDescription, options ...PinocchioCommandOption, ) (*PinocchioCommand, error)
func (*PinocchioCommand) CreateConversationManager ¶ added in v0.4.17
func (g *PinocchioCommand) CreateConversationManager( variables map[string]interface{}, options ...builder.ConversationManagerOption, ) (conversation.Manager, error)
CreateConversationManager creates a new conversation manager with the given settings
func (*PinocchioCommand) RunIntoWriter ¶ added in v0.4.17
func (g *PinocchioCommand) RunIntoWriter( ctx context.Context, parsedLayers *layers.ParsedLayers, w io.Writer, ) error
RunIntoWriter runs the command and writes the output into the given writer.
func (*PinocchioCommand) RunWithOptions ¶ added in v0.4.17
func (g *PinocchioCommand) RunWithOptions(ctx context.Context, options ...run.RunOption) ([]*conversation.Message, error)
RunWithOptions executes the command with the given options
type PinocchioCommandDescription ¶ added in v0.4.17
type PinocchioCommandDescription 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"` Prompt string `yaml:"prompt,omitempty"` Messages []*conversation.Message `yaml:"messages,omitempty"` SystemPrompt string `yaml:"system-prompt,omitempty"` }
type PinocchioCommandLoader ¶ added in v0.4.17
type PinocchioCommandLoader struct { }
func (*PinocchioCommandLoader) IsFileSupported ¶ added in v0.4.17
func (g *PinocchioCommandLoader) IsFileSupported(f fs.FS, fileName string) bool
func (*PinocchioCommandLoader) LoadCommands ¶ added in v0.4.17
type PinocchioCommandOption ¶ added in v0.4.17
type PinocchioCommandOption func(*PinocchioCommand)
func WithMessages ¶
func WithMessages(messages []*conversation.Message) PinocchioCommandOption
func WithPrompt ¶
func WithPrompt(prompt string) PinocchioCommandOption
func WithSystemPrompt ¶
func WithSystemPrompt(systemPrompt string) PinocchioCommandOption
Click to show internal directories.
Click to hide internal directories.