fix:意外启动s4u
This commit is contained in:
@@ -21,9 +21,8 @@ from src.plugin_system.base.component_types import ActionInfo, ChatMode
|
||||
from src.plugin_system.apis import generator_api, send_api, message_api
|
||||
from src.chat.willing.willing_manager import get_willing_manager
|
||||
from src.chat.mai_thinking.mai_think import mai_thinking_manager
|
||||
from maim_message.message_base import GroupInfo,UserInfo
|
||||
|
||||
ENABLE_THINKING = False
|
||||
from maim_message.message_base import GroupInfo
|
||||
from src.mais4u.constant_s4u import ENABLE_THINKING
|
||||
|
||||
ERROR_LOOP_INFO = {
|
||||
"loop_plan_info": {
|
||||
@@ -296,7 +295,8 @@ class HeartFChatting:
|
||||
|
||||
logger.info(f"{self.log_prefix} 开始第{self._cycle_counter}次思考[模式:{self.loop_mode}]")
|
||||
|
||||
await self.send_typing()
|
||||
if ENABLE_THINKING:
|
||||
await self.send_typing()
|
||||
|
||||
async with global_prompt_manager.async_message_scope(self.chat_stream.context.get_template_name()):
|
||||
loop_start_time = time.time()
|
||||
@@ -366,11 +366,12 @@ class HeartFChatting:
|
||||
# 发送回复 (不再需要传入 chat)
|
||||
reply_text = await self._send_response(response_set, reply_to_str, loop_start_time,message_data)
|
||||
|
||||
await self.stop_typing()
|
||||
|
||||
|
||||
|
||||
|
||||
if ENABLE_THINKING:
|
||||
await self.stop_typing()
|
||||
await mai_thinking_manager.get_mai_think(self.stream_id).do_think_after_response(reply_text)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user