From f3db0290aff65f7f0abb4fbca55b0cb96e896e91 Mon Sep 17 00:00:00 2001 From: zcr Date: Thu, 30 Apr 2026 17:25:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dagent=20=E4=B8=AD=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E6=B7=B7=E4=B9=B1=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=83=8C=E6=99=AF=E4=BF=A1=E6=81=AF=E6=9C=AA=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/deep_agent/agents/main_agent.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/server/deep_agent/agents/main_agent.py b/src/server/deep_agent/agents/main_agent.py index ff66f08..9fbad53 100755 --- a/src/server/deep_agent/agents/main_agent.py +++ b/src/server/deep_agent/agents/main_agent.py @@ -119,13 +119,19 @@ def user_role_prompt(request: ModelRequest) -> str: - Only when the backend use_report is truly set to True can you call the research-subagent. """ - backend_prompt = ( - f"Furniture design background settings selected by the current user:\n" + - f"{request.runtime.context.type}" + - f"{request.runtime.context.region}" + - f"{request.runtime.context.style}" + - f"CRITICAL: Do NOT ask the user for these settings again. Use the provided settings to generate your responses." - ) + backend_prompt = f"""Furniture design background settings selected by the current user:\n + {request.runtime.context.type} + {request.runtime.context.region} + {request.runtime.context.style} + 【Important instructions】 + - The above three settings** are only used for tasks related to furniture line drawing/picture generation**. + - When users require the generation of visual content such as line drafts, sketches, design drawings, renderings, etc., the design must be strictly based on the above three settings. + - When users request to generate text content such as reports, analyses, explanations, suggestions, summaries, etc., there is no need to deliberately emphasize or focus on these three settings. They can be described normally and professionally. + - If the user requires the generation of pictures and reports at the same time, please handle them separately: the picture part strictly follows the settings, and the report part is output normally. + + CRITICAL: + - Be sure to use the above settings when generating line drawings/images. + - Do not refer to these three settings repeatedly when generating reports or text-only answers.""" final_prompt = backend_prompt + SYSTEM_PROMPT_MAPPING[f'SYSTEM_BASE_PROMPT_en'] + report_status + SYSTEM_PROMPT_MAPPING[f"SYSTEM_RULES_PROMPT_en"]