mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-03-18 04:25:14 +08:00
fix: send tool process url
This commit is contained in:
@@ -214,6 +214,7 @@ def _build_tooling_section(tools: List[Any], language: str) -> List[str]:
|
|||||||
"- 在多步骤任务、敏感操作或用户要求时简要解释决策过程",
|
"- 在多步骤任务、敏感操作或用户要求时简要解释决策过程",
|
||||||
"- 持续推进直到任务完成,完成后向用户报告结果。",
|
"- 持续推进直到任务完成,完成后向用户报告结果。",
|
||||||
"- 回复中涉及密钥、令牌等敏感信息必须脱敏。",
|
"- 回复中涉及密钥、令牌等敏感信息必须脱敏。",
|
||||||
|
"- URL链接可直接以文本形式发送",
|
||||||
"",
|
"",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import requests
|
|||||||
|
|
||||||
from agent.tools.base_tool import BaseTool, ToolResult
|
from agent.tools.base_tool import BaseTool, ToolResult
|
||||||
from common.log import logger
|
from common.log import logger
|
||||||
|
from config import conf
|
||||||
|
|
||||||
|
|
||||||
# Default timeout for API requests (seconds)
|
# Default timeout for API requests (seconds)
|
||||||
@@ -225,7 +226,8 @@ class WebSearch(BaseTool):
|
|||||||
:return: Formatted search results
|
:return: Formatted search results
|
||||||
"""
|
"""
|
||||||
api_key = os.environ.get("LINKAI_API_KEY", "")
|
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 = {
|
headers = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
Reference in New Issue
Block a user