12 lines
547 B
Python
12 lines
547 B
Python
from typing import TypedDict, List, Dict, Optional
|
|
|
|
|
|
class QAState(TypedDict):
|
|
msg_time: str # 消息时间
|
|
chat_history: str # 历史聊天记录
|
|
current_qas: List[Dict] # 当前轮次生成的QA
|
|
is_valid: bool # 质检是否合格
|
|
retry_count: int # 重试次数
|
|
final_qas: List[Dict] # 最终通过的QA
|
|
error_message: Optional[str] # 错误信息
|
|
generation_reasoning: str # 生成过程的思考记录 |