fix: send tool process url

This commit is contained in:
zhayujie
2026-03-06 12:22:22 +08:00
parent 1623deb3ee
commit 5b91fe04aa
2 changed files with 4 additions and 1 deletions

View File

@@ -214,6 +214,7 @@ def _build_tooling_section(tools: List[Any], language: str) -> List[str]:
"- 在多步骤任务、敏感操作或用户要求时简要解释决策过程",
"- 持续推进直到任务完成,完成后向用户报告结果。",
"- 回复中涉及密钥、令牌等敏感信息必须脱敏。",
"- URL链接可直接以文本形式发送",
"",
]

View File

@@ -13,6 +13,7 @@ import requests
from agent.tools.base_tool import BaseTool, ToolResult
from common.log import logger
from config import conf
# Default timeout for API requests (seconds)
@@ -225,7 +226,8 @@ class WebSearch(BaseTool):
:return: Formatted search results
"""
api_key = os.environ.get("LINKAI_API_KEY", "")
url = "https://api.link-ai.tech/v1/plugin/execute"
api_base = conf().get("linkai_api_base", "https://api.link-ai.tech")
url = f"{api_base.rstrip('/')}/v1/plugin/execute"
headers = {
"Content-Type": "application/json",