Revert "removed get_knowledge_graph"
This commit is contained in:
@@ -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")
|
||||
|
Reference in New Issue
Block a user