Merge branch 'main' into select-datastore-in-api-server

This commit is contained in:
zrguo
2025-02-13 20:03:38 +08:00
committed by GitHub
73 changed files with 6101 additions and 1322 deletions

View File

@@ -35,6 +35,7 @@ from .utils import (
logger,
set_logger,
)
from .types import KnowledgeGraph
config = configparser.ConfigParser()
config.read("config.ini", "utf-8")
@@ -145,12 +146,12 @@ STORAGES = {
"NetworkXStorage": ".kg.networkx_impl",
"JsonKVStorage": ".kg.json_kv_impl",
"NanoVectorDBStorage": ".kg.nano_vector_db_impl",
"JsonDocStatusStorage": ".kg.jsondocstatus_impl",
"JsonDocStatusStorage": ".kg.json_doc_status_impl",
"Neo4JStorage": ".kg.neo4j_impl",
"OracleKVStorage": ".kg.oracle_impl",
"OracleGraphStorage": ".kg.oracle_impl",
"OracleVectorDBStorage": ".kg.oracle_impl",
"MilvusVectorDBStorge": ".kg.milvus_impl",
"MilvusVectorDBStorage": ".kg.milvus_impl",
"MongoKVStorage": ".kg.mongo_impl",
"MongoDocStatusStorage": ".kg.mongo_impl",
"MongoGraphStorage": ".kg.mongo_impl",
@@ -546,7 +547,9 @@ class LightRAG:
text = await self.chunk_entity_relation_graph.get_all_labels()
return text
async def get_graps(self, nodel_label: str, max_depth: int):
async def get_knowledge_graph(
self, nodel_label: str, max_depth: int
) -> KnowledgeGraph:
return await self.chunk_entity_relation_graph.get_knowledge_graph(
node_label=nodel_label, max_depth=max_depth
)