项目AI生成时不携带附件

This commit is contained in:
2026-06-04 17:48:37 +08:00
parent ca560e977b
commit fd9a259917
7 changed files with 112 additions and 24 deletions
@@ -68,7 +68,12 @@ async def _create_video_task(db: AsyncSession, task: ChatGenerationTask) -> dict
started = time.perf_counter()
async with provider_limit("ark_video_create", settings.ARK_VIDEO_CREATE_MAX_CONCURRENCY):
try:
provider_task_id = await submit_video_task(db, engine, task)
provider_task_id = await submit_video_task(
db,
engine,
task,
include_media_references=True,
)
response = {"task_id": provider_task_id}
await log_provider_call(
task,
@@ -107,7 +112,13 @@ async def _create_image_sync_task(db: AsyncSession, task: ChatGenerationTask) ->
started = time.perf_counter()
async with provider_limit("ark_image_sync_create", settings.ARK_IMAGE_CREATE_MAX_CONCURRENCY):
try:
result = await asyncio.to_thread(submit_image_task, db, engine, task)
result = await asyncio.to_thread(
submit_image_task,
db,
engine,
task,
include_media_references=True,
)
if result.get("error"):
raise RuntimeError(result.get("error"))
response_data = _try_json(result.get("response_data")) or result