@shop-os/modelkit 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5640,8 +5640,10 @@ async function generateOmniVideo(req, ctx, createGenAIClient) {
|
|
|
5640
5640
|
const apiKey = googleKey(ctx);
|
|
5641
5641
|
const modelId = ctx.model.id;
|
|
5642
5642
|
const providerModelId = ctx.model.providerModelId;
|
|
5643
|
-
const duration = req.durationSeconds ?? 10;
|
|
5644
5643
|
const extend = req.taskType === "extend";
|
|
5644
|
+
const sourceSeconds = extend ? void 0 : req.sourceVideo?.durationSeconds;
|
|
5645
|
+
const editSeconds = sourceSeconds !== void 0 && Number.isFinite(sourceSeconds) && sourceSeconds > 0 ? sourceSeconds : void 0;
|
|
5646
|
+
const duration = req.durationSeconds ?? editSeconds ?? 10;
|
|
5645
5647
|
const previousId = extend ? req.previousInteractionId : void 0;
|
|
5646
5648
|
const chained = previousId !== void 0;
|
|
5647
5649
|
for (const field of [
|