@@ -209,51 +209,6 @@ async def get_graph_stats(
209209 raise HTTPException (status_code = 500 , detail = f"Failed to get stats: { str (e )} " )
210210
211211
212- # =============================================================================
213- # === 兼容性接口 (Deprecated/Compatibility) ===
214- # =============================================================================
215-
216-
217- @graph .get ("/lightrag/subgraph" )
218- async def get_lightrag_subgraph (
219- db_id : str = Query (..., description = "数据库ID" ),
220- node_label : str = Query (..., description = "节点标签或实体名称" ),
221- max_depth : int = Query (2 , description = "最大深度" , ge = 1 , le = 5 ),
222- max_nodes : int = Query (100 , description = "最大节点数" , ge = 1 , le = 1000 ),
223- current_user : User = Depends (get_admin_user ),
224- ):
225- """(Deprecated) Use /graph/subgraph instead"""
226- return await get_subgraph (
227- db_id = db_id , node_label = node_label , max_depth = max_depth , max_nodes = max_nodes , current_user = current_user
228- )
229-
230-
231- @graph .get ("/lightrag/databases" )
232- async def get_lightrag_databases (current_user : User = Depends (get_admin_user )):
233- """(Deprecated) Use /graph/list instead"""
234- try :
235- lightrag_databases = knowledge_base .get_lightrag_databases ()
236- return {"success" : True , "data" : {"databases" : lightrag_databases }}
237- except Exception as e :
238- raise HTTPException (status_code = 500 , detail = str (e ))
239-
240-
241- @graph .get ("/lightrag/labels" )
242- async def get_lightrag_labels (
243- db_id : str = Query (..., description = "数据库ID" ), current_user : User = Depends (get_admin_user )
244- ):
245- """(Deprecated) Use /graph/labels instead"""
246- return await get_graph_labels (db_id = db_id , current_user = current_user )
247-
248-
249- @graph .get ("/lightrag/stats" )
250- async def get_lightrag_stats (
251- db_id : str = Query (..., description = "数据库ID" ), current_user : User = Depends (get_admin_user )
252- ):
253- """(Deprecated) Use /graph/stats instead"""
254- return await get_graph_stats (db_id = db_id , current_user = current_user )
255-
256-
257212@graph .get ("/neo4j/nodes" )
258213async def get_neo4j_nodes (
259214 kgdb_name : str = Query (..., description = "知识图谱数据库名称" ),
0 commit comments