根据会话mcp开关情况选择性传入 func_tool
修改import的位置 deleted: astrbot/core/star/session_tts_manager.py 复原被覆盖的修改
This commit is contained in:
@@ -101,7 +101,8 @@ class LLMRequestSubStage(Stage):
|
||||
if not event.message_str.startswith(self.provider_wake_prefix):
|
||||
return
|
||||
req.prompt = event.message_str[len(self.provider_wake_prefix) :]
|
||||
req.func_tool = self.ctx.plugin_manager.context.get_llm_tool_manager()
|
||||
if SessionServiceManager.should_process_mcp_request(event):
|
||||
req.func_tool = self.ctx.plugin_manager.context.get_llm_tool_manager()
|
||||
for comp in event.message_obj.message:
|
||||
if isinstance(comp, Image):
|
||||
image_path = await comp.convert_to_file_path()
|
||||
@@ -471,7 +472,7 @@ class LLMRequestSubStage(Stage):
|
||||
)
|
||||
)
|
||||
continue
|
||||
|
||||
|
||||
logger.info(
|
||||
f"从 MCP 服务 {func_tool.mcp_server_name} 调用工具函数:{func_tool.name},参数:{func_tool_args}"
|
||||
)
|
||||
|
||||
@@ -8,6 +8,7 @@ from astrbot.core.message.components import At, File, Image, Node, Plain, Record
|
||||
from astrbot.core.message.message_event_result import ResultContentType
|
||||
from astrbot.core.platform.astr_message_event import AstrMessageEvent
|
||||
from astrbot.core.platform.message_type import MessageType
|
||||
from astrbot.core.star.session_llm_manager import SessionServiceManager
|
||||
from astrbot.core.star.star import star_map
|
||||
from astrbot.core.star.star_handler import EventType, star_handlers_registry
|
||||
|
||||
@@ -177,9 +178,6 @@ class ResultDecorateStage(Stage):
|
||||
event.unified_msg_origin
|
||||
)
|
||||
|
||||
# 导入SessionServiceManager以检查会话级TTS开关
|
||||
from astrbot.core.star.session_llm_manager import SessionServiceManager
|
||||
|
||||
if (
|
||||
self.ctx.astrbot_config["provider_tts_settings"]["enable"]
|
||||
and result.is_llm_result()
|
||||
|
||||
@@ -85,7 +85,15 @@ const MainRoutes = {
|
||||
{
|
||||
name: 'Chat',
|
||||
path: '/chat',
|
||||
component: () => import('@/views/ChatPage.vue')
|
||||
component: () => import('@/views/ChatPage.vue'),
|
||||
children: [
|
||||
{
|
||||
path: ':conversationId',
|
||||
name: 'ChatDetail',
|
||||
component: () => import('@/views/ChatPage.vue'),
|
||||
props: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Settings',
|
||||
|
||||
Reference in New Issue
Block a user