1
This commit is contained in:
@@ -296,11 +296,14 @@ async def create_async_generation_task(db: AsyncSession, current_user: User, req
|
||||
record_id=task_id,
|
||||
gen_type="image",
|
||||
image_size=size,
|
||||
image_px=px,
|
||||
aspect_ratio=proportion,
|
||||
engine_id=engine.id,
|
||||
project_name="AI生成任务",
|
||||
description_prefix="AI创作-",
|
||||
owner_type=OWNER_CHAT_GENERATION_TASK,
|
||||
attempt_no=1,
|
||||
media_references=refs,
|
||||
)
|
||||
snapshot = _build_image_snapshot(engine, size, proportion, px)
|
||||
task = ChatGenerationTask(
|
||||
@@ -316,6 +319,7 @@ async def create_async_generation_task(db: AsyncSession, current_user: User, req
|
||||
pipeline_stage="queued",
|
||||
engine_id=engine.id,
|
||||
engine_snapshot_json=_json(snapshot),
|
||||
current_billing_attempt_no=1,
|
||||
media_references=_json(refs) if refs else None,
|
||||
credits_cost=round(media_billing.total_charged, 2),
|
||||
idempotency_key=req.idempotency_key,
|
||||
@@ -392,12 +396,15 @@ async def create_async_generation_task(db: AsyncSession, current_user: User, req
|
||||
gen_type="video",
|
||||
duration=duration,
|
||||
resolution=resolution,
|
||||
aspect_ratio=ratio,
|
||||
fps=24,
|
||||
engine_id=engine.id,
|
||||
input_video_duration=input_video_duration if input_video_duration > 0 else None,
|
||||
project_name="AI生成任务",
|
||||
description_prefix="AI创作-",
|
||||
owner_type=OWNER_CHAT_GENERATION_TASK,
|
||||
attempt_no=1,
|
||||
media_references=refs,
|
||||
)
|
||||
snapshot = _build_video_snapshot(engine, ratio, resolution, duration)
|
||||
task = ChatGenerationTask(
|
||||
@@ -416,6 +423,7 @@ async def create_async_generation_task(db: AsyncSession, current_user: User, req
|
||||
pipeline_stage="queued",
|
||||
engine_id=engine.id,
|
||||
engine_snapshot_json=_json(snapshot),
|
||||
current_billing_attempt_no=1,
|
||||
media_references=_json(refs) if refs else None,
|
||||
credits_cost=round(media_billing.total_charged, 2),
|
||||
idempotency_key=req.idempotency_key,
|
||||
|
||||
Reference in New Issue
Block a user