(type: str = Query("nodes"), limit: int = Query(100))
| 206 | |
| 207 | @app.get("/data", response_model=Response) |
| 208 | async def query_all_nodes(type: str = Query("nodes"), limit: int = Query(100)): |
| 209 | if type == "nodes": |
| 210 | result = await rag.chunk_entity_relation_graph.get_all_nodes(limit=limit) |
| 211 | elif type == "edges": |
| 212 | result = await rag.chunk_entity_relation_graph.get_all_edges(limit=limit) |
| 213 | elif type == "statistics": |
| 214 | result = await rag.chunk_entity_relation_graph.get_statistics() |
| 215 | return Response(status="success", data=result) |
| 216 | |
| 217 | |
| 218 | @app.post("/insert", response_model=Response) |
nothing calls this directly
no test coverage detected