报告模型升级

This commit is contained in:
zcr
2026-05-20 10:57:45 +08:00
parent f55522b135
commit 5f74ea93a5

View File

@@ -147,13 +147,16 @@ async def chat_stream(request: DeepAgentChatRequest):
"Please strictly follow the above settings in subsequent conversations。"
)
initial_messages.append(SystemMessage(content=system_prompt))
design_backend = f"""
<design_constraints>
Category: {cp.type or 'unspecified'}
region: {cp.region or 'unspecified'}
style: {cp.style or 'unspecified'}
</design_constraints>
"""
if cp.type or cp.region or cp.style:
design_backend = "<design_constraints>"
if cp.type:
design_backend += f"Category: {cp.type}"
if cp.region:
design_backend += f"region: {cp.region}"
if cp.style:
design_backend += f"style: {cp.style}"
design_backend += "</design_constraints>"
# 6. 分支处理
if is_branching:
@@ -372,22 +375,32 @@ async def get_chat_history(thread_id: str):
"""
### 获取项目设计历史记录
此接口用于拉取指定 `thread_id` 下的所有历史状态快照。它是实现 **“版本回溯”** 和 **“方案对比”** 的核心数据来源。
此接口用于拉取指定
`thread_id`
下的所有历史状态快照。它是实现 **“版本回溯” ** 和 **“方案对比” ** 的核心数据来源。
#### 1. 功能说明
* ** 快照列表 **: 返回该项目从启动至今的所有关键节点Checkpoints
* **版本定位**: 每个历史点都包含一个唯一的 `checkpoint_id`。
* **数据回溯**: 客户端获取此列表后,可以引导用户选择任意一个版本,并将其 `checkpoint_id` 传回 `/chat/stream` 接口以开启新的设计分支
* ** 版本定位 **: 每个历史点都包含一个唯一的
`checkpoint_id`
* ** 数据回溯 **: 客户端获取此列表后,可以引导用户选择任意一个版本,并将其
`checkpoint_id`
传回
` / chat / stream
` 接口以开启新的设计分支。
#### 2. 路径参数
* `thread_id`: 设计项目的唯一标识符(由 `/chat/stream` 首次调用时生成或指定)。
*`thread_id`: 设计项目的唯一标识符(由
` / chat / stream
` 首次调用时生成或指定)。
#### 3. 返回字段定义
*`thread_id`: 当前查询的项目ID。
*`history`: 历史记录数组,包含:
- `checkpoint_id`: 必填,回溯时使用的关键凭证。
- `last_message`: 该阶段的最后一条消息摘要(方便前端预览)。
- `node`: 产生该快照的节点名称(如 Designer, Visualizer
- `node`: 产生该快照的节点名称(如
Designer, Visualizer
- `timestamp`: 逻辑步骤序号。
#### 4. 响应示例