Merge branch 'dev' of https://github.com/MaiM-with-u/MaiBot into dev
This commit is contained in:
@@ -6,7 +6,6 @@ from .chat_stream import chat_manager
|
||||
from ..chat_module.only_process.only_message_process import MessageProcessor
|
||||
|
||||
from src.common.logger import get_module_logger, CHAT_STYLE_CONFIG, LogConfig
|
||||
from ..chat_module.think_flow_chat.think_flow_chat import ThinkFlowChat
|
||||
from ..chat_module.reasoning_chat.reasoning_chat import ReasoningChat
|
||||
from ..chat_module.heartFC_chat.heartFC_processor import HeartFC_Processor
|
||||
from ..utils.prompt_builder import Prompt, global_prompt_manager
|
||||
@@ -29,7 +28,6 @@ class ChatBot:
|
||||
self._started = False
|
||||
self.mood_manager = MoodManager.get_instance() # 获取情绪管理器单例
|
||||
self.mood_manager.start_mood_update() # 启动情绪更新
|
||||
self.think_flow_chat = ThinkFlowChat()
|
||||
self.reasoning_chat = ReasoningChat()
|
||||
self.heartFC_processor = HeartFC_Processor() # 新增
|
||||
|
||||
@@ -125,11 +123,9 @@ class ChatBot:
|
||||
else:
|
||||
if groupinfo.group_id in global_config.talk_allowed_groups:
|
||||
# logger.debug(f"开始群聊模式{str(message_data)[:50]}...")
|
||||
if global_config.response_mode == "heart_FC":
|
||||
if global_config.response_mode == "heart_flow":
|
||||
# logger.info(f"启动最新最好的思维流FC模式{str(message_data)[:50]}...")
|
||||
|
||||
await self.heartFC_processor.process_message(message_data)
|
||||
|
||||
elif global_config.response_mode == "reasoning":
|
||||
# logger.debug(f"开始推理模式{str(message_data)[:50]}...")
|
||||
await self.reasoning_chat.process_message(message_data)
|
||||
@@ -143,7 +139,7 @@ class ChatBot:
|
||||
# 私聊处理流程
|
||||
# await self._handle_private_chat(message)
|
||||
if global_config.response_mode == "heart_flow":
|
||||
await self.think_flow_chat.process_message(message_data)
|
||||
await self.heartFC_processor.process_message(message_data)
|
||||
elif global_config.response_mode == "reasoning":
|
||||
await self.reasoning_chat.process_message(message_data)
|
||||
else:
|
||||
@@ -151,7 +147,7 @@ class ChatBot:
|
||||
else: # 群聊处理
|
||||
if groupinfo.group_id in global_config.talk_allowed_groups:
|
||||
if global_config.response_mode == "heart_flow":
|
||||
await self.think_flow_chat.process_message(message_data)
|
||||
await self.heartFC_processor.process_message(message_data)
|
||||
elif global_config.response_mode == "reasoning":
|
||||
await self.reasoning_chat.process_message(message_data)
|
||||
else:
|
||||
|
||||
@@ -717,7 +717,7 @@ class PFChatting:
|
||||
)
|
||||
prompt += "观察到的最新聊天内容如下:\n---\n"
|
||||
prompt += context_text[:1500] # Limit context length
|
||||
prompt += "\n---\n"
|
||||
prompt += "\n---"
|
||||
else:
|
||||
prompt += "当前没有观察到新的聊天内容。\n"
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ pfchating有以下几个组成部分:
|
||||
5.planner怎么写?(好像可以先不加入这部分)
|
||||
|
||||
BUG:
|
||||
1.第一条激活消息没有被读取,进入pfc聊天委托时应该读取一下之前的上文
|
||||
1.第一条激活消息没有被读取,进入pfc聊天委托时应该读取一下之前的上文(fix)
|
||||
2.复读,可能是planner还未校准好
|
||||
3.planner还未个性化,需要加入bot个性信息,且获取的聊天内容有问题
|
||||
4.心流好像过短,而且有时候没有等待更新
|
||||
5.表情包有可能会发两次
|
||||
5.表情包有可能会发两次(fix)
|
||||
@@ -126,7 +126,7 @@ class RelationshipManager:
|
||||
if all_person[person_id] is not None:
|
||||
person_name = all_person[person_id]
|
||||
|
||||
print(f"将<{platform}:{user_id}:{nickname}:{cardname}>替换为{person_name}")
|
||||
# print(f"将<{platform}:{user_id}:{nickname}:{cardname}>替换为{person_name}")
|
||||
|
||||
result_text = result_text.replace(f"<{platform}:{user_id}:{nickname}:{cardname}>", person_name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user