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

Function _required_text

astrbot/dashboard/api/tools.py:48–52  ·  view source on GitHub ↗
(value: object, name: str)

Source from the content-addressed store, hash-verified

46
47
48def _required_text(value: object, name: str) -> str:
49 text = str(value or "").strip()
50 if not text:
51 raise ApiError(f"Missing key: {name}")
52 return text
53
54
55def _model_dict(payload: McpServerRequest | McpServerByNameRequest) -> dict[str, Any]:

Callers 4

_server_name_from_bodyFunction · 0.70
toggle_dashboard_toolFunction · 0.70

Calls 1

ApiErrorClass · 0.90

Tested by

no test coverage detected