INNER CODE UNIT · Python
build_turn_frame
iamlukethedev/Hermes3D · plugins/hermes3d-office-bridge/__init__.py:46
def build_turn_frame(
*,
profile: str,
text: str,
session_id: str = "",
platform: str = "",
at_ms: Optional[int] = None,
) -> dict:
"""Build the wire frame for one finished turn.
``profile`` is the agent identity: Hermes3D names each character after the
backend profile it represents, so the two line up without a lookup table.
"""
body = (text or "").strip()
if len(body) > MAX_TEXT_CHARS:
body = body[:MAX_TEXT_CHARS].rstrip() + "…"
return {
"v": FRAME_VERSION,