diff --git a/agent/prompt/builder.py b/agent/prompt/builder.py index 5e492ef..b618f9d 100644 --- a/agent/prompt/builder.py +++ b/agent/prompt/builder.py @@ -214,6 +214,7 @@ def _build_tooling_section(tools: List[Any], language: str) -> List[str]: "- 在多步骤任务、敏感操作或用户要求时简要解释决策过程", "- 持续推进直到任务完成,完成后向用户报告结果。", "- 回复中涉及密钥、令牌等敏感信息必须脱敏。", + "- URL链接可直接以文本形式发送", "", ] diff --git a/agent/tools/web_search/web_search.py b/agent/tools/web_search/web_search.py index cb5d57c..2132a07 100644 --- a/agent/tools/web_search/web_search.py +++ b/agent/tools/web_search/web_search.py @@ -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",