Documentation
¶
Overview ¶
Package templates provides template loading and rendering for conversations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureTemplatesDir ¶
EnsureTemplatesDir creates the templates directory if it doesn't exist
func GetTemplatesDir ¶
GetTemplatesDir returns the default templates directory path
Types ¶
type Message ¶
type Message struct {
Role string `yaml:"role"` // "user", "assistant", or "system"
Content string `yaml:"content"` // Message text
}
Message represents a template message
type Template ¶
type Template struct {
Name string `yaml:"name"` // Template name
Description string `yaml:"description"` // Human-readable description
SystemPrompt string `yaml:"system_prompt,omitempty"` // System prompt to use
InitialMessages []Message `yaml:"initial_messages,omitempty"` // Pre-populated messages
ToolsEnabled []string `yaml:"tools_enabled,omitempty"` // Tools to enable (empty = all)
Model string `yaml:"model,omitempty"` // Preferred model
MaxTokens int `yaml:"max_tokens,omitempty"` // Max tokens for responses
CreatedAt time.Time `yaml:"-"` // When template was created (not in YAML)
}
Template represents a session template loaded from YAML
func LoadTemplate ¶
LoadTemplate loads a single template from a file path
type ValidationError ¶
ValidationError represents a template validation error
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.