Files
life-echo/api/app/agents/chat/agent_turn.py

16 lines
458 B
Python
Raw Normal View History

2026-03-20 17:25:42 +08:00
"""一轮 AI 对话输出:分段文案 + 是否整轮跳过 TTS如失败兜底"""
from __future__ import annotations
from dataclasses import dataclass
from typing import Any, List
2026-03-20 17:25:42 +08:00
@dataclass(frozen=True)
class AgentChatTurn:
"""与 WebSocket pipeline 对齐messages 为气泡分段skip_tts 为 True 时不合成语音。"""
messages: List[str]
skip_tts: bool = False
memory_retrieval_trace: dict[str, Any] | None = None