Documentation
¶
Overview ¶
Package function provides function-based generators for Augustus.
These generators wrap user-provided functions that generate responses. Two variants are supported:
- Single: functions that return a single response regardless of n
- Multiple: functions that accept n and return n responses
This is designed for programmatic use, not CLI invocation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMultiple ¶
func NewMultiple(cfg registry.Config) (generators.Generator, error)
NewMultiple creates a new Multiple generator from configuration.
Types ¶
type Multiple ¶
type Multiple struct {
types.UsageCounter // embedded but never incremented: in-process function returns no token usage.
// contains filtered or unexported fields
}
Multiple is a generator that wraps a user-provided function for multiple responses. The function is called with the n parameter and should return n responses.
func (*Multiple) ClearHistory ¶
func (m *Multiple) ClearHistory()
ClearHistory is a no-op for function generators (stateless).
func (*Multiple) Description ¶
Description returns a human-readable description.
type MultipleFunc ¶
MultipleFunc is the signature for multiple-response generator functions. Takes a prompt string and count n, returns a slice of n strings.
type Single ¶
type Single struct {
types.UsageCounter // embedded but never incremented: in-process function returns no token usage.
// contains filtered or unexported fields
}
Single is a generator that wraps a user-provided function for single responses. The function is called once regardless of the n parameter.
func (*Single) ClearHistory ¶
func (s *Single) ClearHistory()
ClearHistory is a no-op for function generators (stateless).
func (*Single) Description ¶
Description returns a human-readable description.
type SingleFunc ¶
SingleFunc is the signature for single-response generator functions. Takes a prompt string and returns a slice of strings (typically with one element).