diff --git a/astrbot/core/pipeline/process_stage/method/llm_request.py b/astrbot/core/pipeline/process_stage/method/llm_request.py index d168d1fb..e8246805 100644 --- a/astrbot/core/pipeline/process_stage/method/llm_request.py +++ b/astrbot/core/pipeline/process_stage/method/llm_request.py @@ -150,8 +150,9 @@ class LLMRequestSubStage(Stage): # text completion if llm_response.result_chain: event.set_result( - MessageEventResult(chain=llm_response.result_chain.chain) - .set_result_content_type(ResultContentType.LLM_RESULT) + MessageEventResult( + chain=llm_response.result_chain.chain + ).set_result_content_type(ResultContentType.LLM_RESULT) ) else: event.set_result( diff --git a/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_server.py b/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_server.py index dcd160d2..a219e249 100644 --- a/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_server.py +++ b/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_server.py @@ -96,7 +96,9 @@ class QQOfficialWebhook: return {"opcode": 12} async def start_polling(self): - logger.info(f"将在 {self.callback_server_host}:{self.port} 端口启动 QQ 官方机器人 webhook 适配器。") + logger.info( + f"将在 {self.callback_server_host}:{self.port} 端口启动 QQ 官方机器人 webhook 适配器。" + ) await self.server.run_task( host=self.callback_server_host, port=self.port, diff --git a/astrbot/core/platform/sources/wecom/wecom_adapter.py b/astrbot/core/platform/sources/wecom/wecom_adapter.py index 4237c2eb..cef83b03 100644 --- a/astrbot/core/platform/sources/wecom/wecom_adapter.py +++ b/astrbot/core/platform/sources/wecom/wecom_adapter.py @@ -87,7 +87,9 @@ class WecomServer: return "success" async def start_polling(self): - logger.info(f"将在 {self.callback_server_host}:{self.port} 端口启动 企业微信 适配器。") + logger.info( + f"将在 {self.callback_server_host}:{self.port} 端口启动 企业微信 适配器。" + ) await self.server.run_task( host=self.callback_server_host, port=self.port, diff --git a/astrbot/core/star/register/star_handler.py b/astrbot/core/star/register/star_handler.py index 39e50c63..0b9f7ad0 100644 --- a/astrbot/core/star/register/star_handler.py +++ b/astrbot/core/star/register/star_handler.py @@ -358,7 +358,9 @@ def register_llm_tool(name: str = None): } ) md = get_handler_or_create(awaitable, EventType.OnCallingFuncToolEvent) - llm_tools.add_func(llm_tool_name, args, docstring.description.strip(), md.handler) + llm_tools.add_func( + llm_tool_name, args, docstring.description.strip(), md.handler + ) return awaitable return decorator diff --git a/astrbot/dashboard/server.py b/astrbot/dashboard/server.py index c836ea57..072ded4a 100644 --- a/astrbot/dashboard/server.py +++ b/astrbot/dashboard/server.py @@ -151,7 +151,9 @@ class AstrBotDashboard: display += " ➜ 默认用户名和密码: astrbot\n ✨✨✨\n" if not ip_addr: - display += "可在 data/cmd_config.json 中配置 dashboard.host 以便远程访问。\n" + display += ( + "可在 data/cmd_config.json 中配置 dashboard.host 以便远程访问。\n" + ) logger.info(display)