rag

package
v1.60.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToolSet added in v1.60.0

func CreateToolSet(ctx context.Context, toolset latest.Toolset, parentDir string, runConfig *config.RuntimeConfig) (tools.ToolSet, error)

CreateToolSet is used by the tools registry.

Types

type EventCallback

type EventCallback func(event ragtypes.Event)

EventCallback is called to forward RAG manager events during initialization.

type ToolSet added in v1.60.0

type ToolSet struct {
	// contains filtered or unexported fields
}

ToolSet provides document querying capabilities for a single RAG source.

func New added in v1.60.0

func New(manager *rag.Manager, toolName string) *ToolSet

New creates a new RAG toolset for a single RAG manager.

func (*ToolSet) Instructions added in v1.60.0

func (t *ToolSet) Instructions() string

func (*ToolSet) Name added in v1.60.0

func (t *ToolSet) Name() string

Name returns the tool name for this RAG source.

func (*ToolSet) SetEventCallback added in v1.60.0

func (t *ToolSet) SetEventCallback(cb EventCallback)

SetEventCallback sets a callback to receive RAG manager events during initialization. Must be called before Start().

func (*ToolSet) Start added in v1.60.0

func (t *ToolSet) Start(ctx context.Context) error

Start initializes the RAG manager (indexes documents) and starts a file watcher for incremental updates.

func (*ToolSet) Stop added in v1.60.0

func (t *ToolSet) Stop(_ context.Context) error

Stop closes the RAG manager and releases resources.

func (*ToolSet) Tools added in v1.60.0

func (t *ToolSet) Tools(context.Context) ([]tools.Tool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL