更新配置文件版本号

This commit is contained in:
SengokuCola
2025-07-05 23:19:36 +08:00
parent 2b28621f1d
commit e0ce27f745
4 changed files with 14 additions and 154 deletions

View File

@@ -206,127 +206,3 @@ class CoreActionsPlugin(BasePlugin):
# components.append((DeepReplyAction.get_action_info(), DeepReplyAction))
return components
# class DeepReplyAction(BaseAction):
# """回复动作 - 参与聊天回复"""
# # 激活设置
# focus_activation_type = ActionActivationType.ALWAYS
# normal_activation_type = ActionActivationType.NEVER
# mode_enable = ChatMode.FOCUS
# parallel_action = False
# # 动作基本信息
# action_name = "deep_reply"
# action_description = "参与聊天回复,关注某个话题,对聊天内容进行深度思考,给出回复"
# # 动作参数定义
# action_parameters = {
# "topic": "想要思考的话题"
# }
# # 动作使用场景
# action_require = ["有些问题需要深度思考", "某个问题可能涉及多个方面", "某个问题涉及专业领域或者需要专业知识","这个问题讨论的很激烈,需要深度思考"]
# # 关联类型
# associated_types = ["text"]
# async def execute(self) -> Tuple[bool, str]:
# """执行回复动作"""
# logger.info(f"{self.log_prefix} 决定深度思考")
# try:
# # 获取聊天观察
# chatting_observation = self._get_chatting_observation()
# if not chatting_observation:
# return False, "未找到聊天观察"
# talking_message_str = chatting_observation.talking_message_str
# # 处理回复目标
# chat_stream = self.api.get_service("chat_stream")
# anchor_message = await create_empty_anchor_message(chat_stream.platform, chat_stream.group_info, chat_stream)
# llm_model = self.api.get_available_models().replyer_1
# prompt = f"""
# {talking_message_str}
# 在上面的聊天中,你对{self.action_data.get("topic", "")}感兴趣,形成深刻观点,请你思考,总结成一份学术论文,APA标准格式
# """
# success, response, reasoning, model_name = await self.api.generate_with_model(prompt, llm_model)
# print(prompt)
# print(f"DeepReplyAction: {response}")
# # prompt = f"""
# # {talking_message_str}
# # 在上面的聊天中,你对{self.action_data.get("topic", "")}感兴趣,请你思考
# # """
# extra_info_block = self.action_data.get("extra_info_block", "")
# extra_info_block += response
# # extra_info_block += f"\n--------------------------------\n注意这是最重要的内容你现在可以用比较长的篇幅来表达你的观点不要只回复一个字或者几个字\n由于你进入了深度思考模式所以下方聊天记录的回复要求不再适用请你自由的表达不论字数长短限制\n\n--------------------------------\n注意你现在可以用比较长的篇幅来表达你的观点不要只回复一个字或者几个字\n由于你进入了深度思考模式所以下方聊天记录的回复要求不再适用请你自由的表达不论字数长短限制\n"
# # extra_info_block += f"\n--------------------------------\n注意优先关注这句你现在可以用比较长的篇幅来表达你的观点不要只回复一个字或者几个字\n由于你进入了深度思考模式所以下方聊天记录的回复要求不再适用请你自由的表达不论字数长短限制\n\n--------------------------------\n注意你现在可以用比较长的篇幅来表达你的观点不要只回复一个字或者几个字\n由于你进入了深度思考模式所以其他的回复要求不再适用请你自由的表达不论字数长短限制\n"
# self.action_data["extra_info_block"] = extra_info_block
# # 获取回复器服务
# # replyer = self.api.get_service("replyer")
# # if not replyer:
# # logger.error(f"{self.log_prefix} 未找到回复器服务")
# # return False, "回复器服务不可用"
# # await self.send_message_by_expressor(extra_info_block)
# await self.send_text(extra_info_block)
# # 执行回复
# # success, reply_set = await replyer.deal_reply(
# # cycle_timers=self.cycle_timers,
# # action_data=self.action_data,
# # anchor_message=anchor_message,
# # reasoning=self.reasoning,
# # thinking_id=self.thinking_id,
# # )
# # 构建回复文本
# reply_text = "self._build_reply_text(reply_set)"
# # 存储动作记录
# await self.api.store_action_info(
# action_build_into_prompt=False,
# action_prompt_display=reply_text,
# action_done=True,
# thinking_id=self.thinking_id,
# action_data=self.action_data,
# )
# # 重置NoReplyAction的连续计数器
# NoReplyAction.reset_consecutive_count()
# return success, reply_text
# except Exception as e:
# logger.error(f"{self.log_prefix} 回复动作执行失败: {e}")
# return False, f"回复失败: {str(e)}"
# def _get_chatting_observation(self) -> Optional[ChattingObservation]:
# """获取聊天观察对象"""
# observations = self.api.get_service("observations") or []
# for obs in observations:
# if isinstance(obs, ChattingObservation):
# return obs
# return None
# def _build_reply_text(self, reply_set) -> str:
# """构建回复文本"""
# reply_text = ""
# if reply_set:
# for reply in reply_set:
# data = reply[1]
# reply_text += data
# return reply_text