MCPcopy
hub / github.com/HKUDS/LightRAG / __call__

Method __call__

lightrag/api/lightrag_server.py:431–440  ·  view source on GitHub ↗
(self, scope, receive, send)

Source from the content-addressed store, hash-verified

429 self.app = app
430
431 async def __call__(self, scope, receive, send):
432 if scope.get("type") in ("http", "websocket"):
433 root_path = scope.get("root_path", "")
434 path = scope.get("path", "")
435 if root_path and not path.startswith(root_path):
436 scope = {**scope, "path": root_path + path}
437 raw_path = scope.get("raw_path")
438 if isinstance(raw_path, (bytes, bytearray)):
439 scope["raw_path"] = root_path.encode("ascii") + bytes(raw_path)
440 await self.app(scope, receive, send)
441
442
443def _clean_workspace_value(value: Any) -> str | None:

Callers

nothing calls this directly

Calls 3

bytesFunction · 0.85
getMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected