Commit 43131dc
Changed files (1)
src
llm
src/llm/tools.py
@@ -49,7 +49,7 @@ def add_tools(params: dict) -> dict:
tools = []
if GPT.PRIMARY_SEARCH_ENGINE == "google" and TOKEN.GOOGLE_SEARCH_API_KEY and TOKEN.GOOGLE_SEARCH_CX:
tools = [ONLINE_SEARCH]
- system_prompt = f"你是一个具备网络访问能力的智能助手. 在需要时可以访问互联网进行相关搜索获取信息以确保用户得到最新、准确的帮助。当前时间是{nowdt(TZ):%Y-%m-%d %H:%M:%S} ({TZ})。"
+ system_prompt = f"你是一个具备网络访问能力的智能助手. 在需要时可以访问互联网进行相关搜索获取信息以确保用户得到最新、准确的帮助。当前时间是{nowdt(TZ):%Y-%m-%d}"
params["messages"] = modify_prompts(params["messages"], system_prompt, method="overwrite")
if tools:
@@ -95,7 +95,6 @@ async def merge_tools_response(config: dict, **kwargs) -> tuple[dict, dict]:
tool_completions = {
"model": GPT.TOOLS_MODEL,
"messages": copy.deepcopy(config["completions"]["messages"]),
- "extra_body": {"thinking": {"type": "disabled"}},
}
tool_completions = add_tools(tool_completions)
tool_client = {k: v for k, v in config["client"].items() if k != "http_client"} | {"base_url": GPT.TOOLS_BASE_URL, "api_key": GPT.TOOLS_API_KEY}