@blockrun/llm 3.2.0 → 3.2.1
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/dist/index.cjs +25 -4
- package/dist/index.d.cts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +25 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2623,17 +2623,38 @@ var VideoClient = class {
|
|
|
2623
2623
|
* @param content - The Seedance `content` array, e.g.
|
|
2624
2624
|
* `[{ type: "text", text: "a red apple spinning" }]` or a text item plus
|
|
2625
2625
|
* `{ type: "image_url", image_url: { url: "https://..." } }`.
|
|
2626
|
-
* @param options - `model`, `budgetMs`,
|
|
2627
|
-
* (`
|
|
2628
|
-
*
|
|
2626
|
+
* @param options - `model`, `budgetMs`, plus the same camelCase render options
|
|
2627
|
+
* as {@link generate} (`durationSeconds`, `aspectRatio`, `resolution`,
|
|
2628
|
+
* `generateAudio`, `seed`, `watermark`, `returnLastFrame`). These are mapped
|
|
2629
|
+
* to the gateway's snake_case fields for you. Any other keys you pass are
|
|
2630
|
+
* forwarded verbatim (use snake_case for those, since the gateway reads
|
|
2631
|
+
* snake_case only).
|
|
2629
2632
|
*/
|
|
2630
2633
|
async generateFromContent(content, options) {
|
|
2631
2634
|
if (!Array.isArray(content) || content.length === 0) {
|
|
2632
2635
|
throw new Error("content must be a non-empty array of Seedance content items.");
|
|
2633
2636
|
}
|
|
2634
|
-
const {
|
|
2637
|
+
const {
|
|
2638
|
+
model,
|
|
2639
|
+
budgetMs,
|
|
2640
|
+
durationSeconds,
|
|
2641
|
+
aspectRatio,
|
|
2642
|
+
resolution,
|
|
2643
|
+
generateAudio,
|
|
2644
|
+
seed,
|
|
2645
|
+
watermark,
|
|
2646
|
+
returnLastFrame,
|
|
2647
|
+
...extra
|
|
2648
|
+
} = options ?? {};
|
|
2635
2649
|
const body = { content, ...extra };
|
|
2636
2650
|
if (model !== void 0) body.model = model;
|
|
2651
|
+
if (durationSeconds !== void 0) body.duration_seconds = durationSeconds;
|
|
2652
|
+
if (aspectRatio !== void 0) body.aspect_ratio = aspectRatio;
|
|
2653
|
+
if (resolution !== void 0) body.resolution = resolution;
|
|
2654
|
+
if (generateAudio !== void 0) body.generate_audio = generateAudio;
|
|
2655
|
+
if (seed !== void 0) body.seed = seed;
|
|
2656
|
+
if (watermark !== void 0) body.watermark = watermark;
|
|
2657
|
+
if (returnLastFrame !== void 0) body.return_last_frame = returnLastFrame;
|
|
2637
2658
|
return this.submitAndPoll(body, budgetMs ?? DEFAULT_GENERATE_BUDGET_MS, "/v1/videos");
|
|
2638
2659
|
}
|
|
2639
2660
|
// --------------------------------------------------------------------
|
package/dist/index.d.cts
CHANGED
|
@@ -1715,13 +1715,23 @@ declare class VideoClient {
|
|
|
1715
1715
|
* @param content - The Seedance `content` array, e.g.
|
|
1716
1716
|
* `[{ type: "text", text: "a red apple spinning" }]` or a text item plus
|
|
1717
1717
|
* `{ type: "image_url", image_url: { url: "https://..." } }`.
|
|
1718
|
-
* @param options - `model`, `budgetMs`,
|
|
1719
|
-
* (`
|
|
1720
|
-
*
|
|
1718
|
+
* @param options - `model`, `budgetMs`, plus the same camelCase render options
|
|
1719
|
+
* as {@link generate} (`durationSeconds`, `aspectRatio`, `resolution`,
|
|
1720
|
+
* `generateAudio`, `seed`, `watermark`, `returnLastFrame`). These are mapped
|
|
1721
|
+
* to the gateway's snake_case fields for you. Any other keys you pass are
|
|
1722
|
+
* forwarded verbatim (use snake_case for those, since the gateway reads
|
|
1723
|
+
* snake_case only).
|
|
1721
1724
|
*/
|
|
1722
1725
|
generateFromContent(content: Array<Record<string, unknown>>, options?: {
|
|
1723
1726
|
model?: string;
|
|
1724
1727
|
budgetMs?: number;
|
|
1728
|
+
durationSeconds?: number;
|
|
1729
|
+
aspectRatio?: string;
|
|
1730
|
+
resolution?: string;
|
|
1731
|
+
generateAudio?: boolean;
|
|
1732
|
+
seed?: number;
|
|
1733
|
+
watermark?: boolean;
|
|
1734
|
+
returnLastFrame?: boolean;
|
|
1725
1735
|
} & Record<string, unknown>): Promise<VideoResponse>;
|
|
1726
1736
|
private submitAndPoll;
|
|
1727
1737
|
private absolute;
|
package/dist/index.d.ts
CHANGED
|
@@ -1715,13 +1715,23 @@ declare class VideoClient {
|
|
|
1715
1715
|
* @param content - The Seedance `content` array, e.g.
|
|
1716
1716
|
* `[{ type: "text", text: "a red apple spinning" }]` or a text item plus
|
|
1717
1717
|
* `{ type: "image_url", image_url: { url: "https://..." } }`.
|
|
1718
|
-
* @param options - `model`, `budgetMs`,
|
|
1719
|
-
* (`
|
|
1720
|
-
*
|
|
1718
|
+
* @param options - `model`, `budgetMs`, plus the same camelCase render options
|
|
1719
|
+
* as {@link generate} (`durationSeconds`, `aspectRatio`, `resolution`,
|
|
1720
|
+
* `generateAudio`, `seed`, `watermark`, `returnLastFrame`). These are mapped
|
|
1721
|
+
* to the gateway's snake_case fields for you. Any other keys you pass are
|
|
1722
|
+
* forwarded verbatim (use snake_case for those, since the gateway reads
|
|
1723
|
+
* snake_case only).
|
|
1721
1724
|
*/
|
|
1722
1725
|
generateFromContent(content: Array<Record<string, unknown>>, options?: {
|
|
1723
1726
|
model?: string;
|
|
1724
1727
|
budgetMs?: number;
|
|
1728
|
+
durationSeconds?: number;
|
|
1729
|
+
aspectRatio?: string;
|
|
1730
|
+
resolution?: string;
|
|
1731
|
+
generateAudio?: boolean;
|
|
1732
|
+
seed?: number;
|
|
1733
|
+
watermark?: boolean;
|
|
1734
|
+
returnLastFrame?: boolean;
|
|
1725
1735
|
} & Record<string, unknown>): Promise<VideoResponse>;
|
|
1726
1736
|
private submitAndPoll;
|
|
1727
1737
|
private absolute;
|
package/dist/index.js
CHANGED
|
@@ -2516,17 +2516,38 @@ var VideoClient = class {
|
|
|
2516
2516
|
* @param content - The Seedance `content` array, e.g.
|
|
2517
2517
|
* `[{ type: "text", text: "a red apple spinning" }]` or a text item plus
|
|
2518
2518
|
* `{ type: "image_url", image_url: { url: "https://..." } }`.
|
|
2519
|
-
* @param options - `model`, `budgetMs`,
|
|
2520
|
-
* (`
|
|
2521
|
-
*
|
|
2519
|
+
* @param options - `model`, `budgetMs`, plus the same camelCase render options
|
|
2520
|
+
* as {@link generate} (`durationSeconds`, `aspectRatio`, `resolution`,
|
|
2521
|
+
* `generateAudio`, `seed`, `watermark`, `returnLastFrame`). These are mapped
|
|
2522
|
+
* to the gateway's snake_case fields for you. Any other keys you pass are
|
|
2523
|
+
* forwarded verbatim (use snake_case for those, since the gateway reads
|
|
2524
|
+
* snake_case only).
|
|
2522
2525
|
*/
|
|
2523
2526
|
async generateFromContent(content, options) {
|
|
2524
2527
|
if (!Array.isArray(content) || content.length === 0) {
|
|
2525
2528
|
throw new Error("content must be a non-empty array of Seedance content items.");
|
|
2526
2529
|
}
|
|
2527
|
-
const {
|
|
2530
|
+
const {
|
|
2531
|
+
model,
|
|
2532
|
+
budgetMs,
|
|
2533
|
+
durationSeconds,
|
|
2534
|
+
aspectRatio,
|
|
2535
|
+
resolution,
|
|
2536
|
+
generateAudio,
|
|
2537
|
+
seed,
|
|
2538
|
+
watermark,
|
|
2539
|
+
returnLastFrame,
|
|
2540
|
+
...extra
|
|
2541
|
+
} = options ?? {};
|
|
2528
2542
|
const body = { content, ...extra };
|
|
2529
2543
|
if (model !== void 0) body.model = model;
|
|
2544
|
+
if (durationSeconds !== void 0) body.duration_seconds = durationSeconds;
|
|
2545
|
+
if (aspectRatio !== void 0) body.aspect_ratio = aspectRatio;
|
|
2546
|
+
if (resolution !== void 0) body.resolution = resolution;
|
|
2547
|
+
if (generateAudio !== void 0) body.generate_audio = generateAudio;
|
|
2548
|
+
if (seed !== void 0) body.seed = seed;
|
|
2549
|
+
if (watermark !== void 0) body.watermark = watermark;
|
|
2550
|
+
if (returnLastFrame !== void 0) body.return_last_frame = returnLastFrame;
|
|
2530
2551
|
return this.submitAndPoll(body, budgetMs ?? DEFAULT_GENERATE_BUDGET_MS, "/v1/videos");
|
|
2531
2552
|
}
|
|
2532
2553
|
// --------------------------------------------------------------------
|