Documentation
¶
Index ¶
- Variables
- func DummyTool() tool.BaseTool
- func GetTools(ctx context.Context, ragAgentConfig *RagAgentConfig) ([]tool.BaseTool, error)
- func LogCallback(config *LogCallbackConfig) callbacks.Handler
- func NewDDGSearch(ctx context.Context, config *duckduckgo.Config) (tn tool.BaseTool, err error)
- func NewGitCloneFile(ctx context.Context) (tn tool.BaseTool, err error)
- func NewOpenFileTool(ctx context.Context) (tn tool.BaseTool, err error)
- type LogCallbackConfig
- type RAGAgent
- type RagAgentConfig
- type RagAgentFactory
Constants ¶
This section is empty.
Variables ¶
View Source
var ModuleAgentFactory = fx.Module("agent-factory", fx.Provide( NewRAGAgentFactory, ), )
ModuleAgentFactory is a fx module for the agent factory.
Functions ¶
func LogCallback ¶
func LogCallback(config *LogCallbackConfig) callbacks.Handler
LogCallback is a callback that logs the input and output of the component.
func NewDDGSearch ¶
NewDDGSearch returns a new DDGSearch tool
func NewGitCloneFile ¶
NewGitCloneFile returns a new GitCloneFile tool
Types ¶
type LogCallbackConfig ¶
LogCallbackConfig is the configuration for the log callback.
type RAGAgent ¶
type RAGAgent struct {
// contains filtered or unexported fields
}
RAGAgent is a RAG agent that uses a chat model to generate a response to a user message.
type RagAgentConfig ¶
RagAgentConfig is the configuration for a RAG agent.
type RagAgentFactory ¶
type RagAgentFactory func(ctx context.Context, config *RagAgentConfig) (*RAGAgent, error)
RagAgentFactory is a factory for a RAG agent.
func NewRAGAgentFactory ¶
func NewRAGAgentFactory(logger *slog.Logger, mem *mem.SimpleMemory, retrieverFactory milvus.MilvusRetrieverFactory, chatTemplate prompt.ChatTemplate, model model.ToolCallingChatModel) RagAgentFactory
NewRAGAgentFactory creates a new RAG agent factory.
Click to show internal directories.
Click to hide internal directories.