Versions in this module Expand all Collapse all v0 v0.1.13 Jul 15, 2025 Changes in this version + var DefaultKeywords = []string + type AgentFinalStreamHandler struct + KeywordDetected bool + Keywords []string + LastTokens string + PrintOutput bool + func NewFinalStreamHandler(keywords ...string) *AgentFinalStreamHandler + func (handler *AgentFinalStreamHandler) GetEgress() chan []byte + func (handler *AgentFinalStreamHandler) HandleStreamingFunc(_ context.Context, chunk []byte) + func (handler *AgentFinalStreamHandler) ReadFromEgress(ctx context.Context, callback func(ctx context.Context, chunk []byte)) + type CombiningHandler struct + Callbacks []Handler + func (l CombiningHandler) HandleAgentAction(ctx context.Context, action schema.AgentAction) + func (l CombiningHandler) HandleAgentFinish(ctx context.Context, finish schema.AgentFinish) + func (l CombiningHandler) HandleChainEnd(ctx context.Context, outputs map[string]any) + func (l CombiningHandler) HandleChainError(ctx context.Context, err error) + func (l CombiningHandler) HandleChainStart(ctx context.Context, inputs map[string]any) + func (l CombiningHandler) HandleLLMError(ctx context.Context, err error) + func (l CombiningHandler) HandleLLMGenerateContentEnd(ctx context.Context, res *llms.ContentResponse) + func (l CombiningHandler) HandleLLMGenerateContentStart(ctx context.Context, ms []llms.MessageContent) + func (l CombiningHandler) HandleLLMStart(ctx context.Context, prompts []string) + func (l CombiningHandler) HandleRetrieverEnd(ctx context.Context, query string, documents []schema.Document) + func (l CombiningHandler) HandleRetrieverStart(ctx context.Context, query string) + func (l CombiningHandler) HandleStreamingFunc(ctx context.Context, chunk []byte) + func (l CombiningHandler) HandleText(ctx context.Context, text string) + func (l CombiningHandler) HandleToolEnd(ctx context.Context, output string) + func (l CombiningHandler) HandleToolError(ctx context.Context, err error) + func (l CombiningHandler) HandleToolStart(ctx context.Context, input string) + type Handler interface + HandleAgentAction func(ctx context.Context, action schema.AgentAction) + HandleAgentFinish func(ctx context.Context, finish schema.AgentFinish) + HandleChainEnd func(ctx context.Context, outputs map[string]any) + HandleChainError func(ctx context.Context, err error) + HandleChainStart func(ctx context.Context, inputs map[string]any) + HandleLLMError func(ctx context.Context, err error) + HandleLLMGenerateContentEnd func(ctx context.Context, res *llms.ContentResponse) + HandleLLMGenerateContentStart func(ctx context.Context, ms []llms.MessageContent) + HandleLLMStart func(ctx context.Context, prompts []string) + HandleRetrieverEnd func(ctx context.Context, query string, documents []schema.Document) + HandleRetrieverStart func(ctx context.Context, query string) + HandleStreamingFunc func(ctx context.Context, chunk []byte) + HandleText func(ctx context.Context, text string) + HandleToolEnd func(ctx context.Context, output string) + HandleToolError func(ctx context.Context, err error) + HandleToolStart func(ctx context.Context, input string) + type HandlerHaver interface + GetCallbackHandler func() Handler + type LogHandler struct + func (l LogHandler) HandleAgentAction(_ context.Context, action schema.AgentAction) + func (l LogHandler) HandleAgentFinish(_ context.Context, finish schema.AgentFinish) + func (l LogHandler) HandleChainEnd(_ context.Context, outputs map[string]any) + func (l LogHandler) HandleChainError(_ context.Context, err error) + func (l LogHandler) HandleChainStart(_ context.Context, inputs map[string]any) + func (l LogHandler) HandleLLMError(_ context.Context, err error) + func (l LogHandler) HandleLLMGenerateContentEnd(_ context.Context, res *llms.ContentResponse) + func (l LogHandler) HandleLLMGenerateContentStart(_ context.Context, ms []llms.MessageContent) + func (l LogHandler) HandleLLMStart(_ context.Context, prompts []string) + func (l LogHandler) HandleRetrieverEnd(_ context.Context, query string, documents []schema.Document) + func (l LogHandler) HandleRetrieverStart(_ context.Context, query string) + func (l LogHandler) HandleStreamingFunc(_ context.Context, chunk []byte) + func (l LogHandler) HandleText(_ context.Context, text string) + func (l LogHandler) HandleToolEnd(_ context.Context, output string) + func (l LogHandler) HandleToolError(_ context.Context, err error) + func (l LogHandler) HandleToolStart(_ context.Context, input string) + type SimpleHandler struct + func (SimpleHandler) HandleAgentAction(context.Context, schema.AgentAction) + func (SimpleHandler) HandleAgentFinish(context.Context, schema.AgentFinish) + func (SimpleHandler) HandleChainEnd(context.Context, map[string]any) + func (SimpleHandler) HandleChainError(context.Context, error) + func (SimpleHandler) HandleChainStart(context.Context, map[string]any) + func (SimpleHandler) HandleLLMError(context.Context, error) + func (SimpleHandler) HandleLLMGenerateContentEnd(context.Context, *llms.ContentResponse) + func (SimpleHandler) HandleLLMGenerateContentStart(context.Context, []llms.MessageContent) + func (SimpleHandler) HandleLLMStart(context.Context, []string) + func (SimpleHandler) HandleRetrieverEnd(context.Context, string, []schema.Document) + func (SimpleHandler) HandleRetrieverStart(context.Context, string) + func (SimpleHandler) HandleStreamingFunc(context.Context, []byte) + func (SimpleHandler) HandleText(context.Context, string) + func (SimpleHandler) HandleToolEnd(context.Context, string) + func (SimpleHandler) HandleToolError(context.Context, error) + func (SimpleHandler) HandleToolStart(context.Context, string) + type StreamLogHandler struct + func (StreamLogHandler) HandleStreamingFunc(_ context.Context, chunk []byte)