Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StructuredAgent ¶
type StructuredAgent[O any] struct { Name string SystemInstructions string ModelID string Messages []*ai.Message Config models.ModelConfig // contains filtered or unexported fields }
func NewStructuredAgent ¶
func NewStructuredAgent[O any]( ctx context.Context, structuredAgentConfig agents.AgentConfig, modelConfig models.ModelConfig, opts ...StructuredAgentOption[O], ) (*StructuredAgent[O], error)
NewStructuredAgent creates a new StructuredAgent that generates structured data of type O.
func (*StructuredAgent[O]) GenerateStructuredData ¶
func (structuredAgent *StructuredAgent[O]) GenerateStructuredData(text string) (*O, error)
GenerateStructuredData generates structured data of type O based on the input text.
func (*StructuredAgent[O]) Kind ¶
func (agent *StructuredAgent[O]) Kind() agents.AgentKind
Kind returns the kind of the agent.
type StructuredAgentOption ¶
type StructuredAgentOption[O any] func(*StructuredAgent[O])
StructuredAgentOption defines a functional option for configuring StructuredAgent
func WithLogLevel ¶
func WithLogLevel[O any](level logger.LogLevel) StructuredAgentOption[O]
WithLogLevel sets the log level for the agent
func WithLogger ¶
func WithLogger[O any](log logger.Logger) StructuredAgentOption[O]
WithLogger sets a custom logger for the agent
func WithVerbose ¶
func WithVerbose[O any](verbose bool) StructuredAgentOption[O]
WithVerbose enables verbose logging (INFO level) with agent name prefix
Click to show internal directories.
Click to hide internal directories.