Update planner.py

pull/998/head
2829798842 2025-05-28 20:01:53 +08:00 committed by GitHub
parent 5be6221a3c
commit 325c5de5e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

View File

@ -98,6 +98,15 @@ class ActionPlanner:
action = "no_reply" # 默认动作 action = "no_reply" # 默认动作
reasoning = "规划器初始化默认" reasoning = "规划器初始化默认"
action_data = {} action_data = {}
# 初始化所有可能用到的变量避免UnboundLocalError
observed_messages = []
observed_messages_str = ""
current_mind = ""
cycle_info = ""
self_info = ""
is_group_chat = True # 默认为群聊
prompt = "未生成prompt" # 初始化prompt变量
try: try:
# 获取观察信息 # 获取观察信息