fix:全面移除reply_to,并且非必须

This commit is contained in:
SengokuCola
2025-08-11 20:25:13 +08:00
parent 5299a6e628
commit bad2be2bdc
8 changed files with 66 additions and 95 deletions

View File

@@ -74,7 +74,6 @@ async def generate_reply(
chat_stream: Optional[ChatStream] = None,
chat_id: Optional[str] = None,
action_data: Optional[Dict[str, Any]] = None,
reply_to: str = "",
reply_message: Optional[Dict[str, Any]] = None,
extra_info: str = "",
reply_reason: str = "",
@@ -92,8 +91,7 @@ async def generate_reply(
chat_stream: 聊天流对象(优先)
chat_id: 聊天ID备用
action_data: 动作数据向下兼容包含reply_to和extra_info
reply_to: 回复对象,格式为 "发送者:消息内容"
reply_message: 回复消息
reply_message: 回复的消息对象
extra_info: 额外信息,用于补充上下文
reply_reason: 回复原因
available_actions: 可用动作
@@ -109,6 +107,7 @@ async def generate_reply(
"""
try:
# 获取回复器
logger.debug("[GeneratorAPI] 开始生成回复")
replyer = get_replyer(
chat_stream, chat_id, request_type=request_type
)
@@ -116,11 +115,6 @@ async def generate_reply(
logger.error("[GeneratorAPI] 无法获取回复器")
return False, [], None
logger.debug("[GeneratorAPI] 开始生成回复")
if reply_to:
logger.warning("[GeneratorAPI] 在0.10.0, reply_to 参数已弃用,请使用 reply_message 参数")
if not extra_info and action_data:
extra_info = action_data.get("extra_info", "")