Documentation
¶
Overview ¶
Package recipe also provides declarative provider configuration. This file implements YAML-based provider definitions compatible with eyrie.
Package recipe implements a YAML-based guided workflow system. Recipes are declarative multi-step tasks with parameters, extensions, and activities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultProviderConfigDirs ¶
func DefaultProviderConfigDirs() []string
DefaultProviderConfigDirs returns standard directories for provider configs.
Types ¶
type Author ¶
type Author struct {
Contact string `yaml:"contact"`
}
Author identifies the recipe creator.
type ModelDef ¶
type ModelDef struct {
ID string `yaml:"id"`
DisplayName string `yaml:"display_name"`
MaxTokens int `yaml:"max_tokens"`
InputPrice float64 `yaml:"input_price"`
OutputPrice float64 `yaml:"output_price"`
}
ModelDef defines a model available from a provider.
type Parameter ¶
type Parameter struct {
Key string `yaml:"key"`
InputType string `yaml:"input_type"`
Requirement string `yaml:"requirement"`
Description string `yaml:"description"`
Default string `yaml:"default"`
Value string `yaml:"value"`
}
Parameter is a configurable input to a recipe.
type ProviderConfig ¶
type ProviderConfig struct {
Name string `yaml:"name"`
DisplayName string `yaml:"display_name"`
BaseURL string `yaml:"base_url"`
AuthType string `yaml:"auth_type"` // "api_key", "oauth", "none"
AuthHeader string `yaml:"auth_header"`
AuthPrefix string `yaml:"auth_prefix"`
EnvKey string `yaml:"env_key"`
Models []ModelDef `yaml:"models"`
Format string `yaml:"format"` // "openai", "anthropic", "google"
Headers map[string]string `yaml:"headers"`
}
ProviderConfig defines an LLM provider declaratively via YAML.
func LoadProviderConfigs ¶
func LoadProviderConfigs(dir string) ([]ProviderConfig, error)
LoadProviderConfigs reads all YAML provider definitions from a directory.
func (*ProviderConfig) Validate ¶
func (pc *ProviderConfig) Validate() error
Validate checks a provider config for completeness.
type Recipe ¶
type Recipe struct {
Version string `yaml:"version"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Author Author `yaml:"author"`
Instructions string `yaml:"instructions"`
Parameters []Parameter `yaml:"parameters"`
Extensions []Extension `yaml:"extensions"`
Activities []string `yaml:"activities"`
Prompt string `yaml:"prompt"`
SubRecipes []string `yaml:"sub_recipes"`
}
Recipe is the top-level YAML recipe definition.
func LoadRecipe ¶
LoadRecipe reads and parses a YAML recipe file.
func LoadRecipesFromDir ¶
LoadRecipesFromDir loads all .yaml/.yml recipes from a directory.
func (*Recipe) RenderPrompt ¶
RenderPrompt applies parameter values to the recipe prompt template.