feat: 完成条件

This commit is contained in:
ccnetcore
2026-01-03 16:00:18 +08:00
parent a3259ad36f
commit 12878ba022
6 changed files with 95 additions and 44 deletions

View File

@@ -43,7 +43,7 @@ public class ImageGenerationJob : AsyncBackgroundJob<ImageGenerationJobArgs>, IT
// 构建 Gemini API 请求对象
var parts = new List<object>
{
new { role="user",text = task.Prompt }
new { text = task.Prompt }
};
// 添加参考图(如果有)
@@ -64,7 +64,7 @@ public class ImageGenerationJob : AsyncBackgroundJob<ImageGenerationJobArgs>, IT
{
contents = new[]
{
new { parts }
new { role = "user", parts }
}
};
@@ -77,9 +77,9 @@ public class ImageGenerationJob : AsyncBackgroundJob<ImageGenerationJobArgs>, IT
task.ModelId,
request,
task.UserId,
tokenId:task.TokenId);
tokenId: task.TokenId);
_logger.LogInformation("图片生成任务完成TaskId: {TaskId}", args.TaskId);
}
catch (Exception ex)