Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix(onebot): use yarl to format url (#7589)
Junyan Qine3d7c7c6f961
diff --git a/api/core/tools/provider/builtin/onebot/tools/send_group_msg.py b/api/core/tools/provider/builtin/onebot/tools/send_group_msg.pyindex 802bb7b610c..2a1a9f86de5 100644--- a/api/core/tools/provider/builtin/onebot/tools/send_group_msg.py+++ b/api/core/tools/provider/builtin/onebot/tools/send_group_msg.py@@ -1,6 +1,7 @@from typing import Any, Unionimport requests+from yarl import URLfrom core.tools.entities.tool_entities import ToolInvokeMessagefrom core.tools.tool.builtin_tool import BuiltinTool@@ -29,9 +30,10 @@ class SendGroupMsg(BuiltinTool):auto_escape = tool_parameters.get('auto_escape', False)try:+ url = URL(self.runtime.credentials['ob11_http_url']) / 'send_group_msg'resp = requests.post(- f'{self.runtime.credentials['ob11_http_url']}/send_group_msg',+ url,json={'group_id': send_group_id,'message': message,diff --git a/api/core/tools/provider/builtin/onebot/tools/send_private_msg.py b/api/core/tools/provider/builtin/onebot/tools/send_private_msg.pyindex a11c7a46c02..8ef4d72ab63 100644--- a/api/core/tools/provider/builtin/onebot/tools/send_private_msg.py+++ b/api/core/tools/provider/builtin/onebot/tools/send_private_msg.py@@ -1,6 +1,7 @@from typing import Any, Unionimport requests+from yarl import URLfrom core.tools.entities.tool_entities import ToolInvokeMessagefrom core.tools.tool.builtin_tool import BuiltinTool@@ -29,8 +30,10 @@ class SendPrivateMsg(BuiltinTool):auto_escape = tool_parameters.get('auto_escape', False)try:+ url = URL(self.runtime.credentials['ob11_http_url']) / 'send_private_msg'+resp = requests.post(- f'{self.runtime.credentials['ob11_http_url']}/send_private_msg',+ url,json={'user_id': send_user_id,'message': message,