falkor_graph_query_engine
autogen.agentchat.contrib.graph_rag.falkor_graph_query_engine.FalkorGraphQueryEngine
FalkorGraphQueryEngine
This is a wrapper for FalkorDB KnowledgeGraph.
Initialize a FalkorDB knowledge graph.
Please also refer to https://github.com/FalkorDB/GraphRAG-SDK/blob/main/graphrag_sdk/kg.py
TODO: Fix LLM API cost calculation for FalkorDB useages.
Name | Description |
---|---|
name | Type: str |
host | Type: str Default: ‘127.0.0.1’ |
port | Type: int Default: 6379 |
username | Type: str | None Default: None |
password | Type: str | None Default: None |
model | Type: ForwardRef(‘GenerativeModel’) | None Default: None |
ontology | Type: ForwardRef(‘Ontology’) | None Default: None |
Instance Methods
add_records
Name | Description |
---|---|
new_records | Type: list[Document] |
connect_db
Connect to an existing knowledge graph.
delete
Delete graph and its data from database.
init_db
Build the knowledge graph with input documents.
Parameters:Name | Description |
---|---|
input_doc | Type: list[Document] |
query
Query the knowledge graph with a question and optional message history.
Name | Description |
---|---|
question | a human input question. Type: str |
n_results | number of returned results. Type: int Default: 1 |
**kwargs | Type: Any |
Type | Description |
---|---|
GraphStoreQueryResult | FalkorGraphQueryResult |