素材云多模块API追加
This commit is contained in:
@@ -266,8 +266,11 @@ async def list_tasks(
|
||||
summary="获取AI生成历史日期分组",
|
||||
description=(
|
||||
"按生成完成日期倒序返回当前用户的AI生成历史记录。"
|
||||
"默认查询 chat_generation_tasks / ChatGenerationTask 新任务历史。"
|
||||
"当 history_source=generation_record 时,查询 generation_records / GenerationRecord 旧历史。"
|
||||
"默认查询 chat_generation_tasks / ChatGenerationTask 的 AI创作历史。"
|
||||
"history_source=chat_task 时查询 AI创作;"
|
||||
"history_source=hot_opening_replicate 时查询爆款开头复刻生成素材;"
|
||||
"history_source=shot_replicate 时查询拆镜复刻生成素材;"
|
||||
"history_source=generation_record 时查询 generation_records / GenerationRecord 旧项目生成历史。"
|
||||
"该接口只返回生成成功的任务,即 status=completed 且 generated_at 不为空的数据。"
|
||||
"必须通过 gen_type 区分图片和视频。"
|
||||
"分页对象是生成日期,不是单条记录。"
|
||||
@@ -309,10 +312,12 @@ async def list_history_grouped_days(
|
||||
history_source: str | None = Query(
|
||||
None,
|
||||
description=(
|
||||
"历史数据来源。默认不传或传 chat_task 查询 chat_generation_tasks / ChatGenerationTask;"
|
||||
"传 generation_record 查询 generation_records / GenerationRecord 旧历史数据"
|
||||
"历史数据来源。默认不传或传 chat_task 查询 AI创作;"
|
||||
"传 generation_record 查询旧项目生成;"
|
||||
"传 hot_opening_replicate 查询爆款开头复刻素材;"
|
||||
"传 shot_replicate 查询拆镜复刻素材"
|
||||
),
|
||||
examples=["generation_record"],
|
||||
examples=["shot_replicate"],
|
||||
),
|
||||
current_user: User = Depends(get_current_user),
|
||||
db: AsyncSession = Depends(get_db),
|
||||
@@ -333,8 +338,11 @@ async def list_history_grouped_days(
|
||||
summary="获取指定日期下的AI生成历史分页",
|
||||
description=(
|
||||
"获取某一个生成日期下的生成成功记录分页。"
|
||||
"默认查询 chat_generation_tasks / ChatGenerationTask 新任务历史。"
|
||||
"当 history_source=generation_record 时,查询 generation_records / GenerationRecord 旧历史。"
|
||||
"默认查询 chat_generation_tasks / ChatGenerationTask 的 AI创作历史。"
|
||||
"history_source=chat_task 时查询 AI创作;"
|
||||
"history_source=hot_opening_replicate 时查询爆款开头复刻生成素材;"
|
||||
"history_source=shot_replicate 时查询拆镜复刻生成素材;"
|
||||
"history_source=generation_record 时查询 generation_records / GenerationRecord 旧项目生成历史。"
|
||||
"该接口用于前端在历史分组列表中继续加载某一天的后续记录。"
|
||||
"例如 /history 接口中某一天 total=18,但 items 只返回前10条,"
|
||||
"则前端可以调用本接口 page=2&page_size=10 获取该日期下剩余记录。"
|
||||
@@ -380,10 +388,12 @@ async def list_history_day_items(
|
||||
history_source: str | None = Query(
|
||||
None,
|
||||
description=(
|
||||
"历史数据来源。默认不传或传 chat_task 查询 chat_generation_tasks / ChatGenerationTask;"
|
||||
"传 generation_record 查询 generation_records / GenerationRecord 旧历史数据"
|
||||
"历史数据来源。默认不传或传 chat_task 查询 AI创作;"
|
||||
"传 generation_record 查询旧项目生成;"
|
||||
"传 hot_opening_replicate 查询爆款开头复刻素材;"
|
||||
"传 shot_replicate 查询拆镜复刻素材"
|
||||
),
|
||||
examples=["generation_record"],
|
||||
examples=["hot_opening_replicate"],
|
||||
),
|
||||
current_user: User = Depends(get_current_user),
|
||||
db: AsyncSession = Depends(get_db),
|
||||
|
||||
Reference in New Issue
Block a user