This commit is contained in:
朱潮 2026-01-08 22:28:10 +08:00
commit 5a4aee91ab

View File

@ -85,6 +85,8 @@ class AgentConfig:
robot_type = "deep_agent"
preamble_text, system_prompt = get_preamble_text(request.language, request.system_prompt)
enable_thinking = request.enable_thinking and "```guideline" in request.system_prompt
config = cls(
bot_id=request.bot_id,
api_key=api_key,
@ -96,7 +98,7 @@ class AgentConfig:
robot_type=robot_type,
user_identifier=request.user_identifier,
session_id=request.session_id,
enable_thinking=request.enable_thinking,
enable_thinking=enable_thinking,
project_dir=project_dir,
stream=request.stream,
tool_response=request.tool_response,
@ -121,10 +123,10 @@ class AgentConfig:
messages = []
language = request.language or bot_config.get("language", "zh")
preamble_text, system_prompt = get_preamble_text(language, bot_config.get("system_prompt"))
robot_type = bot_config.get("robot_type", "general_agent")
if robot_type == "catalog_agent":
robot_type = "deep_agent"
enable_thinking = request.enable_thinking and "```guideline" in bot_config.get("system_prompt")
config = cls(
bot_id=request.bot_id,
@ -137,7 +139,7 @@ class AgentConfig:
robot_type=robot_type,
user_identifier=request.user_identifier,
session_id=request.session_id,
enable_thinking=request.enable_thinking,
enable_thinking=enable_thinking,
project_dir=project_dir,
stream=request.stream,
tool_response=request.tool_response,