🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -23,11 +23,7 @@ class EmojiAction(BaseAction):
|
||||
action_parameters: dict[str:str] = {
|
||||
"description": "文字描述你想要发送的表情",
|
||||
}
|
||||
action_require: list[str] = [
|
||||
"你想要发送一个表情",
|
||||
"表达情绪时可以选择使用",
|
||||
"一般在你回复之后可以选择性使用"
|
||||
]
|
||||
action_require: list[str] = ["你想要发送一个表情", "表达情绪时可以选择使用", "一般在你回复之后可以选择性使用"]
|
||||
|
||||
associated_types: list[str] = ["emoji"]
|
||||
|
||||
@@ -108,7 +104,7 @@ class EmojiAction(BaseAction):
|
||||
# )
|
||||
# else:
|
||||
# anchor_message.update_chat_stream(self.chat_stream)
|
||||
|
||||
|
||||
logger.info(f"{self.log_prefix} 为了表情包创建占位符")
|
||||
anchor_message = await create_empty_anchor_message(
|
||||
self.chat_stream.platform, self.chat_stream.group_info, self.chat_stream
|
||||
|
||||
@@ -58,7 +58,6 @@ def init_prompt():
|
||||
""",
|
||||
"simple_planner_prompt",
|
||||
)
|
||||
|
||||
|
||||
Prompt(
|
||||
"""
|
||||
@@ -192,7 +191,6 @@ class ActionPlanner(BasePlanner):
|
||||
reasoning = f"LLM 请求失败,你的模型出现问题: {req_e}"
|
||||
action = "no_reply"
|
||||
|
||||
|
||||
if llm_content:
|
||||
try:
|
||||
fixed_json_string = repair_json(llm_content)
|
||||
@@ -233,9 +231,7 @@ class ActionPlanner(BasePlanner):
|
||||
reasoning = extracted_reasoning
|
||||
|
||||
except Exception as json_e:
|
||||
logger.warning(
|
||||
f"{self.log_prefix}解析LLM响应JSON失败 {json_e}. LLM原始输出: '{llm_content}'"
|
||||
)
|
||||
logger.warning(f"{self.log_prefix}解析LLM响应JSON失败 {json_e}. LLM原始输出: '{llm_content}'")
|
||||
traceback.print_exc()
|
||||
reasoning = f"解析LLM响应JSON失败: {json_e}. 将使用默认动作 'no_reply'."
|
||||
action = "no_reply"
|
||||
@@ -353,7 +349,7 @@ class ActionPlanner(BasePlanner):
|
||||
|
||||
# moderation_prompt_block = "请不要输出违法违规内容,不要输出色情,暴力,政治相关内容,如有敏感内容,请规避。"
|
||||
moderation_prompt_block = ""
|
||||
|
||||
|
||||
# 获取当前时间
|
||||
time_block = f"当前时间:{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user