Documentation
¶
Index ¶
- Constants
- 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" 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." DefaultTopK = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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.