refactor(chatter): 简化规划器提示词并优化 no_reply 条件
移除向规划器提供近期已执行动作的上下文。 该上下文可能对模型造成干扰或导致重复性回复,移除后可以简化提示词,并可能提高规划质量。 同时,为 no_reply 动作增加了一个新的触发条件,使其可以在认为对方还未说完话时使用,让对话节奏更自然。
This commit is contained in:
@@ -254,15 +254,7 @@ class ChatterPlanFilter:
|
||||
plan
|
||||
)
|
||||
|
||||
actions_before_now = await get_actions_by_timestamp_with_chat(
|
||||
chat_id=plan.chat_id,
|
||||
timestamp_start=time.time() - 3600,
|
||||
timestamp_end=time.time(),
|
||||
limit=5,
|
||||
)
|
||||
|
||||
actions_before_now_block = build_readable_actions(actions=actions_before_now)
|
||||
actions_before_now_block = f"你刚刚选择并执行过的action是:\n{actions_before_now_block}"
|
||||
actions_before_now_block = ""
|
||||
|
||||
self.last_obs_time_mark = time.time()
|
||||
|
||||
@@ -285,6 +277,7 @@ class ChatterPlanFilter:
|
||||
动作描述:不进行回复,等待合适的回复时机
|
||||
- 当你刚刚发送了消息,没有人回复时,选择no_reply
|
||||
- 当你一次发送了太多消息,为了避免打扰聊天节奏,选择no_reply
|
||||
- 在认为对方话没有讲完的时候选择这个
|
||||
{{
|
||||
"action": "no_reply",
|
||||
"reason":"不回复的原因"
|
||||
|
||||
Reference in New Issue
Block a user