Documentation
¶
Index ¶
- type RagAgent
- func (agent *RagAgent) AddTextChunksToStore(chunks []text.TextChunk) (int, error)
- func (agent *RagAgent) GetInfo() (agents.RagAgentInfo, error)
- func (agent *RagAgent) GetName() string
- func (agent *RagAgent) GetNumberOfDocuments() int
- func (agent *RagAgent) IsStoreInitialized() bool
- func (agent *RagAgent) Kind() agents.AgentKind
- func (agent *RagAgent) SearchSimilarities(query string) ([]string, error)
- type RagAgentOption
- type StoreConfig
- type TextChunk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RagAgent ¶
func NewRagAgent ¶
func NewRagAgent(ctx context.Context, ragAgentConfig agents.AgentConfig, storeConfig StoreConfig, opts ...RagAgentOption) (*RagAgent, error)
func (*RagAgent) AddTextChunksToStore ¶
func (*RagAgent) GetNumberOfDocuments ¶
getNumberOfDocuments returns the number of documents in the store
func (*RagAgent) IsStoreInitialized ¶
isStoreInitialized checks if the document store is initialized
type RagAgentOption ¶
type RagAgentOption func(*RagAgent)
AgentOption defines a functional option for configuring LocalAIAgent
func WithLogLevel ¶
func WithLogLevel(level logger.LogLevel) RagAgentOption
WithLogLevel sets the log level for the agent
func WithLogger ¶
func WithLogger(log logger.Logger) RagAgentOption
WithLogger sets a custom logger for the agent
func WithVerbose ¶
func WithVerbose(verbose bool) RagAgentOption
WithVerbose enables verbose logging (INFO level) with agent name prefix
type StoreConfig ¶
Click to show internal directories.
Click to hide internal directories.