@ai-sdk/prodia 0.0.3 → 0.0.5
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 +17 -0
- package/dist/index.d.mts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +465 -152
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +463 -140
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @ai-sdk/prodia
|
|
2
2
|
|
|
3
|
+
## 0.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a644ffd: feat(provider/prodia): Add LanguageModel support to the Prodia provider.
|
|
8
|
+
|
|
9
|
+
- **LanguageModel**: Supports Nano Banana (`inference.nano-banana.img2img.v2`) for img2img generation with text+image output via multipart form-data requests. Implements both `doGenerate` and `doStream`.
|
|
10
|
+
- Extract shared multipart parsing and error handling infrastructure into `prodia-api.ts`.
|
|
11
|
+
|
|
12
|
+
## 0.0.4
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [6a2f01b]
|
|
17
|
+
- Updated dependencies [17d64e3]
|
|
18
|
+
- @ai-sdk/provider-utils@3.0.22
|
|
19
|
+
|
|
3
20
|
## 0.0.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
2
2
|
import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
-
import { ProviderV2, ImageModelV2 } from '@ai-sdk/provider';
|
|
3
|
+
import { ProviderV2, LanguageModelV2, ImageModelV2 } from '@ai-sdk/provider';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Prodia job types for image generation.
|
|
@@ -17,6 +17,16 @@ declare const prodiaImageProviderOptionsSchema: _ai_sdk_provider_utils.LazySchem
|
|
|
17
17
|
}>;
|
|
18
18
|
type ProdiaImageProviderOptions = InferSchema<typeof prodiaImageProviderOptionsSchema>;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Prodia job types for language model (multimodal img2img).
|
|
22
|
+
*/
|
|
23
|
+
type ProdiaLanguageModelId = 'inference.nano-banana.img2img.v2' | (string & {});
|
|
24
|
+
|
|
25
|
+
declare const prodiaLanguageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
26
|
+
aspectRatio?: "1:1" | "2:3" | "3:2" | "4:5" | "5:4" | "4:7" | "7:4" | "9:16" | "16:9" | "9:21" | "21:9" | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
type ProdiaLanguageModelOptions = InferSchema<typeof prodiaLanguageModelOptionsSchema>;
|
|
29
|
+
|
|
20
30
|
interface ProdiaProviderSettings {
|
|
21
31
|
/**
|
|
22
32
|
* Prodia API key. Default value is taken from the `PRODIA_TOKEN` environment variable.
|
|
@@ -37,6 +47,10 @@ interface ProdiaProviderSettings {
|
|
|
37
47
|
fetch?: FetchFunction;
|
|
38
48
|
}
|
|
39
49
|
interface ProdiaProvider extends ProviderV2 {
|
|
50
|
+
/**
|
|
51
|
+
* Creates a language model for multimodal generation (img2img with text+image output).
|
|
52
|
+
*/
|
|
53
|
+
languageModel(modelId: ProdiaLanguageModelId): LanguageModelV2;
|
|
40
54
|
/**
|
|
41
55
|
* Creates a model for image generation.
|
|
42
56
|
*/
|
|
@@ -55,4 +69,4 @@ declare const prodia: ProdiaProvider;
|
|
|
55
69
|
|
|
56
70
|
declare const VERSION: string;
|
|
57
71
|
|
|
58
|
-
export { type ProdiaImageModelId, type ProdiaImageProviderOptions, type ProdiaProvider, type ProdiaProviderSettings, VERSION, createProdia, prodia };
|
|
72
|
+
export { type ProdiaImageModelId, type ProdiaImageProviderOptions, type ProdiaLanguageModelId, type ProdiaLanguageModelOptions, type ProdiaProvider, type ProdiaProviderSettings, VERSION, createProdia, prodia };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
2
2
|
import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
-
import { ProviderV2, ImageModelV2 } from '@ai-sdk/provider';
|
|
3
|
+
import { ProviderV2, LanguageModelV2, ImageModelV2 } from '@ai-sdk/provider';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Prodia job types for image generation.
|
|
@@ -17,6 +17,16 @@ declare const prodiaImageProviderOptionsSchema: _ai_sdk_provider_utils.LazySchem
|
|
|
17
17
|
}>;
|
|
18
18
|
type ProdiaImageProviderOptions = InferSchema<typeof prodiaImageProviderOptionsSchema>;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Prodia job types for language model (multimodal img2img).
|
|
22
|
+
*/
|
|
23
|
+
type ProdiaLanguageModelId = 'inference.nano-banana.img2img.v2' | (string & {});
|
|
24
|
+
|
|
25
|
+
declare const prodiaLanguageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
26
|
+
aspectRatio?: "1:1" | "2:3" | "3:2" | "4:5" | "5:4" | "4:7" | "7:4" | "9:16" | "16:9" | "9:21" | "21:9" | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
type ProdiaLanguageModelOptions = InferSchema<typeof prodiaLanguageModelOptionsSchema>;
|
|
29
|
+
|
|
20
30
|
interface ProdiaProviderSettings {
|
|
21
31
|
/**
|
|
22
32
|
* Prodia API key. Default value is taken from the `PRODIA_TOKEN` environment variable.
|
|
@@ -37,6 +47,10 @@ interface ProdiaProviderSettings {
|
|
|
37
47
|
fetch?: FetchFunction;
|
|
38
48
|
}
|
|
39
49
|
interface ProdiaProvider extends ProviderV2 {
|
|
50
|
+
/**
|
|
51
|
+
* Creates a language model for multimodal generation (img2img with text+image output).
|
|
52
|
+
*/
|
|
53
|
+
languageModel(modelId: ProdiaLanguageModelId): LanguageModelV2;
|
|
40
54
|
/**
|
|
41
55
|
* Creates a model for image generation.
|
|
42
56
|
*/
|
|
@@ -55,4 +69,4 @@ declare const prodia: ProdiaProvider;
|
|
|
55
69
|
|
|
56
70
|
declare const VERSION: string;
|
|
57
71
|
|
|
58
|
-
export { type ProdiaImageModelId, type ProdiaImageProviderOptions, type ProdiaProvider, type ProdiaProviderSettings, VERSION, createProdia, prodia };
|
|
72
|
+
export { type ProdiaImageModelId, type ProdiaImageProviderOptions, type ProdiaLanguageModelId, type ProdiaLanguageModelOptions, type ProdiaProvider, type ProdiaProviderSettings, VERSION, createProdia, prodia };
|