From a156b1af14c2cf082889d2d6f9a3ceb5b2a3fdfc Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Wed, 26 Mar 2025 14:33:45 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=94=AF=E6=8C=81=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E6=8C=87=E4=BB=A4=E4=B8=8B=E8=BD=BD=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=20/plugin=20get?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/star/star_manager.py | 5 ++++- astrbot/dashboard/routes/conversation.py | 12 ------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/astrbot/core/star/star_manager.py b/astrbot/core/star/star_manager.py index c49027268..8a2bed689 100644 --- a/astrbot/core/star/star_manager.py +++ b/astrbot/core/star/star_manager.py @@ -332,7 +332,10 @@ class PluginManager: ) # 绑定 llm_tool handler for func_tool in llm_tools.func_list: - if func_tool.handler.__module__ == metadata.module_path: + if ( + func_tool.handler + and func_tool.handler.__module__ == metadata.module_path + ): func_tool.handler_module_path = metadata.module_path func_tool.handler = functools.partial( func_tool.handler, metadata.star_cls diff --git a/astrbot/dashboard/routes/conversation.py b/astrbot/dashboard/routes/conversation.py index a3c2db793..aa8b0af36 100644 --- a/astrbot/dashboard/routes/conversation.py +++ b/astrbot/dashboard/routes/conversation.py @@ -53,13 +53,6 @@ class ConversationRoute(Route): exclude_platforms.split(",") if exclude_platforms else [] ) - logger.info( - f"获取对话列表: page={page}, page_size={page_size}, " - f"platforms={platform_list}, message_types={message_type_list}, " - f"search={search_query}, exclude_ids={exclude_id_list}, " - f"exclude_platforms={exclude_platform_list}" - ) - # 限制页面大小,防止请求过大数据 if page < 1: page = 1 @@ -79,7 +72,6 @@ class ConversationRoute(Route): exclude_ids=exclude_id_list, exclude_platforms=exclude_platform_list, ) - logger.info(f"获取到 {len(conversations)} 条对话,总数: {total_count}") except Exception as e: logger.error(f"数据库查询出错: {str(e)}\n{traceback.format_exc()}") return Response().error(f"数据库查询出错: {str(e)}").__dict__ @@ -98,10 +90,6 @@ class ConversationRoute(Route): "total_pages": total_pages, }, } - - logger.info( - f"返回对话列表成功: {json.dumps(result, ensure_ascii=False)[:200]}..." - ) return Response().ok(result).__dict__ except Exception as e: