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.
func Creator ¶ added in v1.132.0
func Creator(ctx context.Context, toolset latest.Toolset, parentDir string, runConfig *config.RuntimeConfig, _ string) (tools.ToolSet, error)
Creator builds this toolset from its YAML declaration. It matches teamloader.ToolsetCreator so it can be registered directly:
teamloader.NewToolsetRegistry(map[string]teamloader.ToolsetCreator{"rag": rag.Creator})
Types ¶
type EventCallback ¶
type EventCallback = ragtypes.EventCallback
EventCallback is called to forward RAG manager events during initialization.
type Option ¶ added in v1.134.0
type Option func(*ToolSet)
Option configures optional ToolSet behavior.
func WithIndexingTimeout ¶ added in v1.134.0
WithIndexingTimeout bounds a single Initialize call started by Start, independent of the caller's own (much shorter) start-wait budget. Zero (the default) means unbounded.
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 (*ToolSet) Instructions ¶ added in v1.60.0
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
Start initializes the RAG manager (indexes documents) and starts a file watcher for incremental updates.
Indexing is detached from the caller's cancellation, just like the file watcher: Start may run under a short-lived startup-probe context (the wait budget documented on tools.DefaultStartTimeout / TryStartWithTimeout), and a caller giving up on that budget must not abort in-flight work — TryStartWithTimeout already promises that an abandoned Start keeps running and is picked up by a later call once it completes. Indexing is instead bounded only by indexingTimeout (see WithIndexingTimeout; zero means unbounded) and by Stop.