Documentation
¶
Overview ¶
Package graphrag provides tools for interacting with GraphRAG knowledge graphs.
Index ¶
- type AddEntityTool
- func (t *AddEntityTool) Description() string
- func (t *AddEntityTool) Execute(ctx context.Context, args string) (string, error)
- func (t *AddEntityTool) Name() string
- func (t *AddEntityTool) Parameters() map[string]interfaces.ParameterSpec
- func (t *AddEntityTool) Run(ctx context.Context, input string) (string, error)
- type AddRelationshipTool
- func (t *AddRelationshipTool) Description() string
- func (t *AddRelationshipTool) Execute(ctx context.Context, args string) (string, error)
- func (t *AddRelationshipTool) Name() string
- func (t *AddRelationshipTool) Parameters() map[string]interfaces.ParameterSpec
- func (t *AddRelationshipTool) Run(ctx context.Context, input string) (string, error)
- type ExtractTool
- func (t *ExtractTool) Description() string
- func (t *ExtractTool) Execute(ctx context.Context, args string) (string, error)
- func (t *ExtractTool) Name() string
- func (t *ExtractTool) Parameters() map[string]interfaces.ParameterSpec
- func (t *ExtractTool) Run(ctx context.Context, input string) (string, error)
- type GetContextTool
- func (t *GetContextTool) Description() string
- func (t *GetContextTool) Execute(ctx context.Context, args string) (string, error)
- func (t *GetContextTool) Name() string
- func (t *GetContextTool) Parameters() map[string]interfaces.ParameterSpec
- func (t *GetContextTool) Run(ctx context.Context, input string) (string, error)
- type SearchTool
- func (t *SearchTool) Description() string
- func (t *SearchTool) Execute(ctx context.Context, args string) (string, error)
- func (t *SearchTool) Name() string
- func (t *SearchTool) Parameters() map[string]interfaces.ParameterSpec
- func (t *SearchTool) Run(ctx context.Context, input string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddEntityTool ¶
type AddEntityTool struct {
// contains filtered or unexported fields
}
AddEntityTool adds entities to the knowledge graph.
func NewAddEntityTool ¶
func NewAddEntityTool(store interfaces.GraphRAGStore) *AddEntityTool
NewAddEntityTool creates a new add entity tool.
func (*AddEntityTool) Description ¶
func (t *AddEntityTool) Description() string
Description returns the tool description.
func (*AddEntityTool) Parameters ¶
func (t *AddEntityTool) Parameters() map[string]interfaces.ParameterSpec
Parameters returns the tool parameters.
type AddRelationshipTool ¶
type AddRelationshipTool struct {
// contains filtered or unexported fields
}
AddRelationshipTool adds relationships between entities in the knowledge graph.
func NewAddRelationshipTool ¶
func NewAddRelationshipTool(store interfaces.GraphRAGStore) *AddRelationshipTool
NewAddRelationshipTool creates a new add relationship tool.
func (*AddRelationshipTool) Description ¶
func (t *AddRelationshipTool) Description() string
Description returns the tool description.
func (*AddRelationshipTool) Name ¶
func (t *AddRelationshipTool) Name() string
Name returns the tool name.
func (*AddRelationshipTool) Parameters ¶
func (t *AddRelationshipTool) Parameters() map[string]interfaces.ParameterSpec
Parameters returns the tool parameters.
type ExtractTool ¶
type ExtractTool struct {
// contains filtered or unexported fields
}
ExtractTool extracts entities and relationships from text using an LLM.
func NewExtractTool ¶
func NewExtractTool(store interfaces.GraphRAGStore, llm interfaces.LLM) *ExtractTool
NewExtractTool creates a new extract tool.
func (*ExtractTool) Description ¶
func (t *ExtractTool) Description() string
Description returns the tool description.
func (*ExtractTool) Parameters ¶
func (t *ExtractTool) Parameters() map[string]interfaces.ParameterSpec
Parameters returns the tool parameters.
type GetContextTool ¶
type GetContextTool struct {
// contains filtered or unexported fields
}
GetContextTool retrieves context around an entity via graph traversal.
func NewGetContextTool ¶
func NewGetContextTool(store interfaces.GraphRAGStore) *GetContextTool
NewGetContextTool creates a new get context tool.
func (*GetContextTool) Description ¶
func (t *GetContextTool) Description() string
Description returns the tool description.
func (*GetContextTool) Parameters ¶
func (t *GetContextTool) Parameters() map[string]interfaces.ParameterSpec
Parameters returns the tool parameters.
type SearchTool ¶
type SearchTool struct {
// contains filtered or unexported fields
}
SearchTool implements graph-based search in the knowledge graph.
func NewSearchTool ¶
func NewSearchTool(store interfaces.GraphRAGStore) *SearchTool
NewSearchTool creates a new search tool.
func (*SearchTool) Description ¶
func (t *SearchTool) Description() string
Description returns the tool description.
func (*SearchTool) Parameters ¶
func (t *SearchTool) Parameters() map[string]interfaces.ParameterSpec
Parameters returns the tool parameters.