Documentation
¶
Index ¶
- Constants
- type DeleteTool
- func (t *DeleteTool) BackfillInput(_ context.Context, input map[string]any) map[string]any
- func (t *DeleteTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
- func (t *DeleteTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
- func (t *DeleteTool) Definition() tool.Definition
- func (t *DeleteTool) Description(_ context.Context) (string, error)
- func (t *DeleteTool) FormatResult(data any) string
- func (t *DeleteTool) IsConcurrencySafe(_ map[string]any) bool
- func (t *DeleteTool) IsEnabled() bool
- func (t *DeleteTool) IsReadOnly(_ map[string]any) bool
- func (t *DeleteTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)
- type IngestTool
- func (t *IngestTool) BackfillInput(_ context.Context, input map[string]any) map[string]any
- func (t *IngestTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
- func (t *IngestTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
- func (t *IngestTool) Definition() tool.Definition
- func (t *IngestTool) Description(_ context.Context) (string, error)
- func (t *IngestTool) FormatResult(data any) string
- func (t *IngestTool) IsConcurrencySafe(_ map[string]any) bool
- func (t *IngestTool) IsEnabled() bool
- func (t *IngestTool) IsReadOnly(_ map[string]any) bool
- func (t *IngestTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)
- type SearchTool
- func (t *SearchTool) BackfillInput(_ context.Context, input map[string]any) map[string]any
- func (t *SearchTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
- func (t *SearchTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
- func (t *SearchTool) Definition() tool.Definition
- func (t *SearchTool) Description(_ context.Context) (string, error)
- func (t *SearchTool) FormatResult(data any) string
- func (t *SearchTool) IsConcurrencySafe(_ map[string]any) bool
- func (t *SearchTool) IsEnabled() bool
- func (t *SearchTool) IsReadOnly(_ map[string]any) bool
- func (t *SearchTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)
Constants ¶
View Source
const ( ToolSearchName = "rag_search" ToolIngestName = "rag_ingest" ToolDeleteName = "rag_delete" SearchHint = "" /* 129-byte string literal not displayed */ IngestHint = "Ingest a text document into a named corpus for later semantic search. Returns the number of indexed chunks." DeleteHint = "Delete an entire corpus, or a single file's chunks within a corpus." DefaultTopK = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteTool ¶ added in v1.1.0
type DeleteTool struct {
// contains filtered or unexported fields
}
DeleteTool implements the rag_delete tool.
func NewDeleteTool ¶ added in v1.1.0
func NewDeleteTool(svc *rag.Service) *DeleteTool
NewDeleteTool creates a new rag_delete tool backed by the given RAG service.
func (*DeleteTool) BackfillInput ¶ added in v1.1.0
func (*DeleteTool) Call ¶ added in v1.1.0
func (t *DeleteTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
func (*DeleteTool) CheckPermissions ¶ added in v1.1.0
func (t *DeleteTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
func (*DeleteTool) Definition ¶ added in v1.1.0
func (t *DeleteTool) Definition() tool.Definition
func (*DeleteTool) Description ¶ added in v1.1.0
func (t *DeleteTool) Description(_ context.Context) (string, error)
func (*DeleteTool) FormatResult ¶ added in v1.1.0
func (t *DeleteTool) FormatResult(data any) string
func (*DeleteTool) IsConcurrencySafe ¶ added in v1.1.0
func (t *DeleteTool) IsConcurrencySafe(_ map[string]any) bool
func (*DeleteTool) IsEnabled ¶ added in v1.1.0
func (t *DeleteTool) IsEnabled() bool
func (*DeleteTool) IsReadOnly ¶ added in v1.1.0
func (t *DeleteTool) IsReadOnly(_ map[string]any) bool
func (*DeleteTool) ValidateInput ¶ added in v1.1.0
type IngestTool ¶
type IngestTool struct {
// contains filtered or unexported fields
}
IngestTool implements the rag_ingest tool.
func NewIngestTool ¶
func NewIngestTool(svc *rag.Service) *IngestTool
NewIngestTool creates a new rag_ingest tool backed by the given RAG service.
func (*IngestTool) BackfillInput ¶
func (*IngestTool) Call ¶
func (t *IngestTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
func (*IngestTool) CheckPermissions ¶
func (t *IngestTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
func (*IngestTool) Definition ¶
func (t *IngestTool) Definition() tool.Definition
func (*IngestTool) Description ¶
func (t *IngestTool) Description(_ context.Context) (string, error)
func (*IngestTool) FormatResult ¶
func (t *IngestTool) FormatResult(data any) string
func (*IngestTool) IsConcurrencySafe ¶
func (t *IngestTool) IsConcurrencySafe(_ map[string]any) bool
func (*IngestTool) IsEnabled ¶
func (t *IngestTool) IsEnabled() bool
func (*IngestTool) IsReadOnly ¶
func (t *IngestTool) IsReadOnly(_ map[string]any) bool
func (*IngestTool) ValidateInput ¶
type SearchTool ¶
type SearchTool struct {
// contains filtered or unexported fields
}
SearchTool implements the rag_search tool.
func NewSearchTool ¶
func NewSearchTool(svc *rag.Service) *SearchTool
NewSearchTool creates a new rag_search tool backed by the given RAG service.
func (*SearchTool) BackfillInput ¶
func (*SearchTool) Call ¶
func (t *SearchTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
func (*SearchTool) CheckPermissions ¶
func (t *SearchTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
func (*SearchTool) Definition ¶
func (t *SearchTool) Definition() tool.Definition
func (*SearchTool) Description ¶
func (t *SearchTool) Description(_ context.Context) (string, error)
func (*SearchTool) FormatResult ¶
func (t *SearchTool) FormatResult(data any) string
func (*SearchTool) IsConcurrencySafe ¶
func (t *SearchTool) IsConcurrencySafe(_ map[string]any) bool
func (*SearchTool) IsEnabled ¶
func (t *SearchTool) IsEnabled() bool
func (*SearchTool) IsReadOnly ¶
func (t *SearchTool) IsReadOnly(_ map[string]any) bool
func (*SearchTool) ValidateInput ¶
Click to show internal directories.
Click to hide internal directories.