feat(affinity_flow_chatter): 增强动作思考过程在回复生成中的集成
添加了将动作思考过程集成到回复生成流程的功能: - 在 generator_api 中新增逻辑,将 action_data 中的 thinking 字段内容添加到 extra_info - 优化 plan_filter 中对 thinking 字段的处理逻辑,避免添加无意义的默认值 - 更新默认生成器提示词,移除冗余的关系信息块重复 - 在 planner 提示词中添加不对表情包消息回应的限制
This commit is contained in:
@@ -128,6 +128,13 @@ async def generate_reply(
|
||||
if not reply_reason and action_data:
|
||||
reply_reason = action_data.get("reason", "")
|
||||
|
||||
# 如果action_data中有thinking,添加到extra_info中
|
||||
if action_data and (thinking := action_data.get("thinking")):
|
||||
if extra_info:
|
||||
extra_info += f"\n\n思考过程:{thinking}"
|
||||
else:
|
||||
extra_info = f"思考过程:{thinking}"
|
||||
|
||||
# 调用回复器生成回复
|
||||
success, llm_response_dict, prompt, selected_expressions = await replyer.generate_reply_with_context(
|
||||
extra_info=extra_info,
|
||||
|
||||
Reference in New Issue
Block a user