Versions in this module Expand all Collapse all v0 v0.26.0 Jun 13, 2026 Changes in this version + const DefaultMaxIterations + const DefaultMaxRepeatedActions + const DefaultObservationPromptTemplate + const DefaultSystemPrompt + const DefaultThoughtPrompt + const MaxConsecutiveErrors + type ActionData struct + Response string + ToolCalls []*gollem.FunctionCall + Type ActionType + type ActionEvent struct + ActionType string + Iteration int + ToolNames []string + type ActionType string + const ActionTypeRespond + const ActionTypeToolCall + type FewShotExample struct + Action string + Answer string + Observation string + Question string + Thought string + type ObservationData struct + Error string + Success bool + ToolResults []ToolResult + type ObservationEvent struct + Iteration int + Success bool + type Option func(*Strategy) + func WithFewShotExamples(examples []FewShotExample) Option + func WithMaxIterations(max int) Option + func WithMaxRepeatedActions(max int) Option + func WithObservationPrompt(prompt string) Option + func WithSystemPrompt(prompt string) Option + func WithThoughtPrompt(prompt string) Option + type Strategy struct + func New(client gollem.LLMClient, options ...Option) *Strategy + func (s *Strategy) ExportTrace() *TraceExport + func (s *Strategy) ExportTraceJSON() ([]byte, error) + func (s *Strategy) Handle(ctx context.Context, state *gollem.StrategyState) ([]gollem.Input, *gollem.ExecuteResponse, error) + func (s *Strategy) Init(ctx context.Context, inputs []gollem.Input) error + func (s *Strategy) Tools(ctx context.Context) ([]gollem.Tool, error) + type TAOEntry struct + Action *ActionData + Iteration int + Observation *ObservationData + Thought *ThoughtData + Timestamp time.Time + type ThoughtData struct + Content string + Reasoning string + type ThoughtEvent struct + Content string + Iteration int + type ToolResult struct + Error string + Output string + Success bool + ToolName string + type TraceExport struct + Entries []TAOEntry + Metadata TraceMetadata + Summary TraceSummary + type TraceMetadata struct + CompletionType string + EndTime time.Time + StartTime time.Time + Strategy string + type TraceSummary struct + Duration time.Duration + SuccessRate float64 + ToolCallsCount int + TotalIterations int