Documentation
¶
Index ¶
- Variables
- type CompressionPrompts
- type CompressorAgent
- func (c *CompressorAgent) CompressMessages(messages []*ai.Message) (agents.ChatResponse, error)
- func (c *CompressorAgent) CompressMessagesStream(messages []*ai.Message, callback func(agents.ChatResponse) error) (agents.ChatResponse, error)
- func (c *CompressorAgent) CompressText(text string) (agents.ChatResponse, error)
- func (c *CompressorAgent) CompressTextStream(text string, callback func(agents.ChatResponse) error) (agents.ChatResponse, error)
- func (c *CompressorAgent) GetCompressionPrompt() string
- func (c *CompressorAgent) GetInfo() (agents.AgentInfo, error)
- func (c *CompressorAgent) GetKind() agents.AgentKind
- func (c *CompressorAgent) GetName() string
- func (c *CompressorAgent) SetCompressionPrompt(prompt string)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultCompressionPrompts = CompressionPrompts{
Minimalist: `Summarize the conversation history concisely, preserving key facts, decisions, and context needed for continuation.`,
Structured: `Compress this conversation into a brief summary including:
- Main topics discussed
- Key decisions/conclusions
- Important context for next exchanges
Keep it under 200 words.
`,
UltraShort: `Summarize this conversation: extract key facts, decisions, and essential context only.`,
ContinuityFocus: `Create a compact summary of this conversation that preserves all information needed to continue the discussion naturally.`,
}
Functions ¶
This section is empty.
Types ¶
type CompressionPrompts ¶
type CompressorAgent ¶
type CompressorAgent struct {
// contains filtered or unexported fields
}
func NewCompressorAgent ¶
func NewCompressorAgent(ctx context.Context, agentConfig agents.AgentConfig, modelConfig models.ModelConfig) (*CompressorAgent, error)
func (*CompressorAgent) CompressMessages ¶
func (c *CompressorAgent) CompressMessages(messages []*ai.Message) (agents.ChatResponse, error)
CompressMessages compresses a list of messages into a summary
func (*CompressorAgent) CompressMessagesStream ¶
func (c *CompressorAgent) CompressMessagesStream(messages []*ai.Message, callback func(agents.ChatResponse) error) (agents.ChatResponse, error)
CompressMessagesStream compresses a list of messages into a summary using streaming
func (*CompressorAgent) CompressText ¶
func (c *CompressorAgent) CompressText(text string) (agents.ChatResponse, error)
func (*CompressorAgent) CompressTextStream ¶
func (c *CompressorAgent) CompressTextStream(text string, callback func(agents.ChatResponse) error) (agents.ChatResponse, error)
CompressTextStream compresses the given text using streaming
func (*CompressorAgent) GetCompressionPrompt ¶
func (c *CompressorAgent) GetCompressionPrompt() string
GetCompressionPrompt returns the current compression prompt
func (*CompressorAgent) GetKind ¶
func (c *CompressorAgent) GetKind() agents.AgentKind
func (*CompressorAgent) GetName ¶
func (c *CompressorAgent) GetName() string
func (*CompressorAgent) SetCompressionPrompt ¶
func (c *CompressorAgent) SetCompressionPrompt(prompt string)
SetCompressionPrompt sets a new compression prompt
Click to show internal directories.
Click to hide internal directories.