Documentation
¶
Index ¶
- type ContextBuilder
- type Loop
- func (l *Loop) ProcessDirect(ctx context.Context, content string) (string, error)
- func (l *Loop) ProcessForChannel(ctx context.Context, channel, chatID, senderID, content string) (string, error)
- func (l *Loop) RegisterDefaultTools(cfg *config.Config) error
- func (l *Loop) Run(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextBuilder ¶
type ContextBuilder struct {
// contains filtered or unexported fields
}
ContextBuilder builds LLM context
func NewContextBuilder ¶
func NewContextBuilder(workspacePath string) *ContextBuilder
NewContextBuilder creates a context builder
func (*ContextBuilder) BuildMessages ¶
func (c *ContextBuilder) BuildMessages(history []*session.Message, current string, media []string) []*schema.Message
BuildMessages constructs the full message list
func (*ContextBuilder) BuildSystemPrompt ¶
func (c *ContextBuilder) BuildSystemPrompt() string
BuildSystemPrompt assembles the system prompt
type Loop ¶
type Loop struct {
OnToolStart func(name, args string)
OnToolFinish func(name, result string, err error)
// contains filtered or unexported fields
}
Loop is the main agent processing loop
func (*Loop) ProcessDirect ¶
ProcessDirect processes a message directly (for CLI)
func (*Loop) ProcessForChannel ¶ added in v0.1.4
func (l *Loop) ProcessForChannel(ctx context.Context, channel, chatID, senderID, content string) (string, error)
ProcessForChannel processes a message directly for a given channel/session.
func (*Loop) RegisterDefaultTools ¶
RegisterDefaultTools registers all built-in tools
Click to show internal directories.
Click to hide internal directories.