MCPcopy
hub / github.com/AstrBotDevs/AstrBot / _run_json

Function _run_json

astrbot/dashboard/api/knowledge_bases.py:78–85  ·  view source on GitHub ↗
(
    request: Request,
    operation: Callable[[dict[str, Any]], Any],
    *,
    prefix: str,
)

Source from the content-addressed store, hash-verified

76
77
78async def _run_json(
79 request: Request,
80 operation: Callable[[dict[str, Any]], Any],
81 *,
82 prefix: str,
83):
84 body = await _json_or_empty(request)
85 return await _run(lambda: operation(body), prefix=prefix)
86
87
88@router.get("/knowledge-bases")

Callers 8

dashboard_create_kbFunction · 0.70
dashboard_update_kbFunction · 0.70
dashboard_delete_kbFunction · 0.70
dashboard_delete_chunkFunction · 0.70
dashboard_retrieveFunction · 0.70

Calls 3

operationFunction · 0.85
_json_or_emptyFunction · 0.70
_runFunction · 0.70

Tested by

no test coverage detected