Revert "removed get_knowledge_graph"

This commit is contained in:
Yannick Stephan
2025-02-20 14:29:36 +01:00
committed by GitHub
parent 0d4c580859
commit 439685e69c
11 changed files with 324 additions and 0 deletions

View File

@@ -1683,6 +1683,10 @@ def create_app(args):
raise HTTPException(status_code=500, detail=str(e))
# query all graph
@app.get("/graphs")
async def get_knowledge_graph(label: str):
return await rag.get_knowledge_graph(nodel_label=label, max_depth=100)
# Add Ollama API routes
ollama_api = OllamaAPI(rag, top_k=args.top_k)
app.include_router(ollama_api.router, prefix="/api")