1.新增视觉能力 2.新增对上次图片 或 上传图片 引用图片做编辑能力.

This commit is contained in:
zcr
2026-03-20 17:39:51 +08:00
parent 3c2b2d9f4a
commit 42f322ec34
3 changed files with 21 additions and 4 deletions

View File

@@ -39,6 +39,8 @@ async def chat_stream(request: DeepAgentChatRequest):
#### 2. 请求参数
* `message`: 用户的设计意图(如:'我想设计一个极简风格的橡木办公桌')。
* `quote_image_path`: 用户引用图片地址 如:'["fida-test/furniture/sketches/8a1804d1-5ac9-4d02-bf17-e65fa7272f65.png"]')。
* `input_image_paths`: 用户上传图片地址集合如:('["fida-test/furniture/sketches/8a1804d1-5ac9-4d02-bf17-e65fa7272f65.png"]')。
* `thread_id`: (可选) 现有项目的唯一标识。若不传,系统将自动分配并返回。
* `checkpoint_id`: (可选) 历史快照 ID。
* `config_params`: (可选) 对话配置参数
@@ -70,6 +72,20 @@ async def chat_stream(request: DeepAgentChatRequest):
"thread_id": "187e58af",
"checkpoint_id": "1f101aa2-8f24-6e2a-8001-2952c3a7447a"
}
用户上传:
{
"message": "合并两张图一边一半,左右拼",
"input_image_paths": [
"fida-test/furniture/sketches/218adbd2-c312-4298-9a82-5a92601ac9e2.png",
"fida-test/furniture/sketches/8a1804d1-5ac9-4d02-bf17-e65fa7272f65.png"
]
}
用户引用:
{
"message": "描述这张图",
"quote_image_path":"fida-test/furniture/sketches/218adbd2-c312-4298-9a82-5a92601ac9e2.png"
}
```
### 5. 响应流说明
@@ -140,8 +156,8 @@ async def chat_stream(request: DeepAgentChatRequest):
"current_image": ""
}
# 用户上传图片
if request.input_image_path:
for path in request.input_image_path:
if request.input_image_paths:
for path in request.input_image_paths:
bucket, object_name = path.split('/', 1)
image_url = get_presigned_url(oss_client=minio_client, bucket=bucket, object_name=object_name)
content.append({"type": "image_url", "image_url": {"url": image_url}})