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

Function _model_dict

astrbot/dashboard/api/open_api.py:51–56  ·  view source on GitHub ↗
(payload)

Source from the content-addressed store, hash-verified

49
50
51def _model_dict(payload) -> dict[str, Any]:
52 if payload is None:
53 return {}
54 if hasattr(payload, "model_dump"):
55 return payload.model_dump(exclude_unset=True, exclude_none=False)
56 return payload if isinstance(payload, dict) else {}
57
58
59def _open_api_error(message: str) -> JSONResponse:

Callers 2

chatFunction · 0.70
send_im_messageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected