MCPcopy Create free account
hub / github.com/NanGePlus/LightRAGTest / insert_endpoint

Function insert_endpoint

LightRAG/examples/lightrag_api_oracle_demo..py:219–225  ·  view source on GitHub ↗
(request: InsertRequest)

Source from the content-addressed store, hash-verified

217
218@app.post("/insert", response_model=Response)
219async def insert_endpoint(request: InsertRequest):
220 try:
221 loop = asyncio.get_event_loop()
222 await loop.run_in_executor(None, lambda: rag.insert(request.text))
223 return Response(status="success", message="Text inserted successfully")
224 except Exception as e:
225 raise HTTPException(status_code=500, detail=str(e))
226
227
228@app.post("/insert_file", response_model=Response)

Callers

nothing calls this directly

Calls 2

insertMethod · 0.80
ResponseClass · 0.70

Tested by

no test coverage detected