@ai-sdk/bytedance 2.0.53 → 2.0.55

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @ai-sdk/bytedance
2
2
 
3
+ ## 2.0.55
4
+
5
+ ### Patch Changes
6
+
7
+ - ede5b89: chore: migrate package builds from tsup to tsdown
8
+ - Updated dependencies [ede5b89]
9
+ - @ai-sdk/provider@4.0.20
10
+ - @ai-sdk/provider-utils@5.0.52
11
+
12
+ ## 2.0.54
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [c2511c1]
17
+ - @ai-sdk/provider-utils@5.0.51
18
+
3
19
  ## 2.0.53
4
20
 
5
21
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,141 +1,149 @@
1
- import { ProviderV4, Experimental_VideoModelV4, ImageModelV4, ImageModelV4CallOptions } from '@ai-sdk/provider';
2
- import { FetchFunction, Resolvable } from '@ai-sdk/provider-utils';
3
-
1
+ import { Experimental_VideoModelV4, ImageModelV4, ImageModelV4CallOptions, ProviderV4 } from "@ai-sdk/provider";
2
+ import { FetchFunction, Resolvable } from "@ai-sdk/provider-utils";
3
+ //#region src/bytedance-image-settings.d.ts
4
4
  type ByteDanceImageModelId = 'dola-seedream-5-0-pro-260628' | 'seedream-5-0-260128' | 'seedream-5-0-lite-260128' | 'seedream-4-5-251128' | 'seedream-4-0-250828' | (string & {});
5
-
5
+ //#endregion
6
+ //#region src/bytedance-video-settings.d.ts
6
7
  type ByteDanceVideoModelId = 'dreamina-seedance-2-0-fast-260128' | 'dreamina-seedance-2-0-260128' | 'seedance-1-5-pro-251215' | 'seedance-1-0-pro-250528' | 'seedance-1-0-pro-fast-251015' | 'seedance-1-0-lite-t2v-250428' | 'seedance-1-0-lite-i2v-250428' | (string & {});
7
-
8
+ //#endregion
9
+ //#region src/bytedance-provider.d.ts
8
10
  interface ByteDanceProviderSettings {
9
- /**
10
- * ByteDance Ark API key. Default value is taken from the `ARK_API_KEY`
11
- * environment variable.
12
- */
13
- apiKey?: string;
14
- /**
15
- * Base URL for the API calls.
16
- * Default: https://ark.ap-southeast.bytepluses.com/api/v3
17
- */
18
- baseURL?: string;
19
- /**
20
- * Custom headers to include in the requests.
21
- */
22
- headers?: Record<string, string>;
23
- /**
24
- * Custom fetch implementation. You can use it as a middleware to intercept
25
- * requests, or to provide a custom fetch implementation for e.g. testing.
26
- */
27
- fetch?: FetchFunction;
11
+ /**
12
+ * ByteDance Ark API key. Default value is taken from the `ARK_API_KEY`
13
+ * environment variable.
14
+ */
15
+ apiKey?: string;
16
+ /**
17
+ * Base URL for the API calls.
18
+ * Default: https://ark.ap-southeast.bytepluses.com/api/v3
19
+ */
20
+ baseURL?: string;
21
+ /**
22
+ * Custom headers to include in the requests.
23
+ */
24
+ headers?: Record<string, string>;
25
+ /**
26
+ * Custom fetch implementation. You can use it as a middleware to intercept
27
+ * requests, or to provide a custom fetch implementation for e.g. testing.
28
+ */
29
+ fetch?: FetchFunction;
28
30
  }
29
31
  interface ByteDanceProvider extends ProviderV4 {
30
- /**
31
- * Creates a model for video generation.
32
- */
33
- video(modelId: ByteDanceVideoModelId): Experimental_VideoModelV4;
34
- /**
35
- * Creates a model for video generation.
36
- */
37
- videoModel(modelId: ByteDanceVideoModelId): Experimental_VideoModelV4;
38
- /**
39
- * Creates a model for image generation.
40
- */
41
- image(modelId: ByteDanceImageModelId): ImageModelV4;
42
- /**
43
- * Creates a model for image generation.
44
- */
45
- imageModel(modelId: ByteDanceImageModelId): ImageModelV4;
32
+ /**
33
+ * Creates a model for video generation.
34
+ */
35
+ video(modelId: ByteDanceVideoModelId): Experimental_VideoModelV4;
36
+ /**
37
+ * Creates a model for video generation.
38
+ */
39
+ videoModel(modelId: ByteDanceVideoModelId): Experimental_VideoModelV4;
40
+ /**
41
+ * Creates a model for image generation.
42
+ */
43
+ image(modelId: ByteDanceImageModelId): ImageModelV4;
44
+ /**
45
+ * Creates a model for image generation.
46
+ */
47
+ imageModel(modelId: ByteDanceImageModelId): ImageModelV4;
46
48
  }
47
49
  /**
48
50
  * Create a ByteDance provider instance.
49
51
  */
50
- declare function createByteDance(options?: ByteDanceProviderSettings): ByteDanceProvider;
52
+ export declare function createByteDance(options?: ByteDanceProviderSettings): ByteDanceProvider;
51
53
  /**
52
54
  * Default ByteDance provider instance.
53
55
  */
54
- declare const byteDance: ByteDanceProvider;
55
-
56
+ export declare const byteDance: ByteDanceProvider;
57
+ //#endregion
58
+ //#region src/bytedance-config.d.ts
56
59
  interface ByteDanceConfig {
57
- provider: string;
58
- baseURL: string;
59
- headers: Resolvable<Record<string, string | undefined>>;
60
- fetch?: FetchFunction;
60
+ provider: string;
61
+ baseURL: string;
62
+ headers: Resolvable<Record<string, string | undefined>>;
63
+ fetch?: FetchFunction;
61
64
  }
62
-
65
+ //#endregion
66
+ //#region src/bytedance-image-model.d.ts
63
67
  interface ByteDanceImageModelConfig extends ByteDanceConfig {
64
- _internal?: {
65
- currentDate?: () => Date;
66
- };
68
+ _internal?: {
69
+ currentDate?: () => Date;
70
+ };
67
71
  }
68
- declare class ByteDanceImageModel implements ImageModelV4 {
69
- readonly modelId: ByteDanceImageModelId;
70
- private readonly config;
71
- readonly specificationVersion = "v4";
72
- readonly maxImagesPerCall = 1;
73
- get supportsFileInputs(): boolean | undefined;
74
- get supportsMaskInputs(): boolean | undefined;
75
- get provider(): string;
76
- constructor(modelId: ByteDanceImageModelId, config: ByteDanceImageModelConfig);
77
- doGenerate({ prompt, size, aspectRatio, seed, providerOptions, headers, abortSignal, files, mask, }: ImageModelV4CallOptions): Promise<Awaited<ReturnType<ImageModelV4['doGenerate']>>>;
72
+ export declare class ByteDanceImageModel implements ImageModelV4 {
73
+ readonly modelId: ByteDanceImageModelId;
74
+ private readonly config;
75
+ readonly specificationVersion = "v4";
76
+ readonly maxImagesPerCall = 1;
77
+ get supportsFileInputs(): boolean | undefined;
78
+ get supportsMaskInputs(): boolean | undefined;
79
+ get provider(): string;
80
+ constructor(modelId: ByteDanceImageModelId, config: ByteDanceImageModelConfig);
81
+ doGenerate({ prompt, size, aspectRatio, seed, providerOptions, headers, abortSignal, files, mask }: ImageModelV4CallOptions): Promise<Awaited<ReturnType<ImageModelV4['doGenerate']>>>;
78
82
  }
79
-
83
+ //#endregion
84
+ //#region src/bytedance-image-model-options.d.ts
80
85
  type ByteDanceImageModelOptions = {
81
- /**
82
- * Whether to add an "AI generated" watermark to the bottom-right corner of
83
- * the output image.
84
- */
85
- watermark?: boolean | null;
86
- /**
87
- * Format of the generated image file. Supported by `seedream-5-0` and
88
- * `dola-seedream-5-0-pro`; `seedream-4-5` / `seedream-4-0` always return
89
- * `jpeg`.
90
- */
91
- outputFormat?: 'png' | 'jpeg' | null;
92
- /**
93
- * A resolution level (e.g. `1K`, `2K`, `3K`, `4K`) as an alternative to
94
- * passing pixel dimensions via the top-level `size` parameter. When set, this
95
- * overrides the top-level `size`. Available levels vary by model.
96
- */
97
- size?: string | null;
98
- /**
99
- * Set to `'auto'` to generate a batch of related images (e.g. storyboards or
100
- * brand visuals). Defaults to `'disabled'` (single image).
101
- */
102
- sequentialImageGeneration?: 'auto' | 'disabled' | null;
103
- /**
104
- * Maximum number of images to generate when `sequentialImageGeneration` is
105
- * `'auto'`. The number of input reference images plus generated images must
106
- * not exceed the model's limit.
107
- */
108
- maxImages?: number | null;
109
- /**
110
- * Prompt optimization mode. `seedream-4-0` supports both `'standard'` and
111
- * `'fast'`; other models support `'standard'` only.
112
- */
113
- optimizePromptMode?: 'standard' | 'fast' | null;
114
- [key: string]: unknown;
86
+ /**
87
+ * Whether to add an "AI generated" watermark to the bottom-right corner of
88
+ * the output image.
89
+ */
90
+ watermark?: boolean | null;
91
+ /**
92
+ * Format of the generated image file. Supported by `seedream-5-0` and
93
+ * `dola-seedream-5-0-pro`; `seedream-4-5` / `seedream-4-0` always return
94
+ * `jpeg`.
95
+ */
96
+ outputFormat?: 'png' | 'jpeg' | null;
97
+ /**
98
+ * A resolution level (e.g. `1K`, `2K`, `3K`, `4K`) as an alternative to
99
+ * passing pixel dimensions via the top-level `size` parameter. When set, this
100
+ * overrides the top-level `size`. Available levels vary by model.
101
+ */
102
+ size?: string | null;
103
+ /**
104
+ * Set to `'auto'` to generate a batch of related images (e.g. storyboards or
105
+ * brand visuals). Defaults to `'disabled'` (single image).
106
+ */
107
+ sequentialImageGeneration?: 'auto' | 'disabled' | null;
108
+ /**
109
+ * Maximum number of images to generate when `sequentialImageGeneration` is
110
+ * `'auto'`. The number of input reference images plus generated images must
111
+ * not exceed the model's limit.
112
+ */
113
+ maxImages?: number | null;
114
+ /**
115
+ * Prompt optimization mode. `seedream-4-0` supports both `'standard'` and
116
+ * `'fast'`; other models support `'standard'` only.
117
+ */
118
+ optimizePromptMode?: 'standard' | 'fast' | null;
119
+ [key: string]: unknown;
115
120
  };
116
-
121
+ //#endregion
122
+ //#region src/bytedance-video-model-options.d.ts
117
123
  type ByteDanceVideoModelOptions = {
118
- watermark?: boolean | null;
119
- generateAudio?: boolean | null;
120
- cameraFixed?: boolean | null;
121
- returnLastFrame?: boolean | null;
122
- serviceTier?: 'default' | 'flex' | null;
123
- draft?: boolean | null;
124
- lastFrameImage?: string | null;
125
- referenceImages?: string[] | null;
126
- referenceVideos?: string[] | null;
127
- referenceAudio?: string[] | null;
128
- /**
129
- * @deprecated Ignored. Pass `poll: { intervalMs }` to `generateVideo` instead.
130
- */
131
- pollIntervalMs?: number | null;
132
- /**
133
- * @deprecated Ignored. Pass `poll: { timeoutMs }` to `generateVideo` instead.
134
- */
135
- pollTimeoutMs?: number | null;
136
- [key: string]: unknown;
124
+ watermark?: boolean | null;
125
+ generateAudio?: boolean | null;
126
+ cameraFixed?: boolean | null;
127
+ returnLastFrame?: boolean | null;
128
+ serviceTier?: 'default' | 'flex' | null;
129
+ draft?: boolean | null;
130
+ lastFrameImage?: string | null;
131
+ referenceImages?: string[] | null;
132
+ referenceVideos?: string[] | null;
133
+ referenceAudio?: string[] | null;
134
+ /**
135
+ * @deprecated Ignored. Pass `poll: { intervalMs }` to `generateVideo` instead.
136
+ */
137
+ pollIntervalMs?: number | null;
138
+ /**
139
+ * @deprecated Ignored. Pass `poll: { timeoutMs }` to `generateVideo` instead.
140
+ */
141
+ pollTimeoutMs?: number | null;
142
+ [key: string]: unknown;
137
143
  };
138
-
139
- declare const VERSION: string;
140
-
141
- export { ByteDanceImageModel, type ByteDanceImageModelId, type ByteDanceImageModelOptions, type ByteDanceProvider, type ByteDanceProviderSettings, type ByteDanceVideoModelId, type ByteDanceVideoModelOptions, type ByteDanceVideoModelOptions as ByteDanceVideoProviderOptions, VERSION, byteDance, createByteDance };
144
+ //#endregion
145
+ //#region src/version.d.ts
146
+ export declare const VERSION: string;
147
+ //#endregion
148
+ export type { ByteDanceImageModelId, ByteDanceImageModelOptions, ByteDanceProvider, ByteDanceProviderSettings, ByteDanceVideoModelId, ByteDanceVideoModelOptions, ByteDanceVideoModelOptions as ByteDanceVideoProviderOptions };
149
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/bytedance-image-settings.ts","../src/bytedance-video-settings.ts","../src/bytedance-provider.ts","../src/bytedance-config.ts","../src/bytedance-image-model.ts","../src/bytedance-image-model-options.ts","../src/bytedance-video-model-options.ts","../src/version.ts"],"mappings":";;;KAAY;;;KCAA;;;UCgBK;;;;;EAKf;;;;;EAMA;;;;EAKA,UAAU;;;;;EAMV,QAAQ;;UAGO,0BAA0B;;;;EAIzC,MAAM,SAAS,wBAAwB;;;;EAKvC,WAAW,SAAS,wBAAwB;;;;EAK5C,MAAM,SAAS,wBAAwB;;;;EAKvC,WAAW,SAAS,wBAAwB;;;;;wBAQ9B,gBACd,UAAS,4BACR;;;;qBA+CU,WAAS;;;UCnHL;EACf;EACA;EACA,SAAS,WAAW;EACpB,QAAQ;;;;UC0BA,kCAAkC;EAC1C;IACE,oBAAoB;;;qBAIX,+BAA+B;WA4B/B,SAAS;mBACD;WA5BV;WAIA;MAEL;MAYA;MAIA;EAKO,YAAA,SAAS,uBACD,QAAQ;EAGrB,aACJ,QACA,MACA,aACA,MACA,iBACA,SACA,aACA,OACA,QACC,0BAA0B,QAC3B,QAAQ,WAAW;;;;KC9EX;;;;;EAKV;;;;;;EAOA;;;;;;EAOA;;;;;EAMA;;;;;;EAOA;;;;;EAMA;GAEC;;;;KCxCS;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;EAIA;;;;EAIA;GACC;;;;qBCpBU"}