@ai-sdk/provider 1.0.10 → 1.0.12
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 +12 -0
- package/dist/index.d.mts +27 -1
- package/dist/index.d.ts +27 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @ai-sdk/provider
|
2
2
|
|
3
|
+
## 1.0.12
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 0bd5bc6: feat (ai): support model-generated files
|
8
|
+
|
9
|
+
## 1.0.11
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- 2e1101a: feat (provider/openai): pdf input support
|
14
|
+
|
3
15
|
## 1.0.10
|
4
16
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
@@ -611,7 +611,7 @@ type LanguageModelV1Message = ({
|
|
611
611
|
content: Array<LanguageModelV1TextPart | LanguageModelV1ImagePart | LanguageModelV1FilePart>;
|
612
612
|
} | {
|
613
613
|
role: 'assistant';
|
614
|
-
content: Array<LanguageModelV1TextPart | LanguageModelV1ReasoningPart | LanguageModelV1RedactedReasoningPart | LanguageModelV1ToolCallPart>;
|
614
|
+
content: Array<LanguageModelV1TextPart | LanguageModelV1FilePart | LanguageModelV1ReasoningPart | LanguageModelV1RedactedReasoningPart | LanguageModelV1ToolCallPart>;
|
615
615
|
} | {
|
616
616
|
role: 'tool';
|
617
617
|
content: Array<LanguageModelV1ToolResultPart>;
|
@@ -701,6 +701,10 @@ File content part of a prompt. It contains a file.
|
|
701
701
|
interface LanguageModelV1FilePart {
|
702
702
|
type: 'file';
|
703
703
|
/**
|
704
|
+
* Optional filename of the file.
|
705
|
+
*/
|
706
|
+
filename?: string;
|
707
|
+
/**
|
704
708
|
File data as base64 encoded string or as a URL.
|
705
709
|
*/
|
706
710
|
data: string | URL;
|
@@ -1030,6 +1034,17 @@ An optional signature for verifying that the reasoning originated from the model
|
|
1030
1034
|
data: string;
|
1031
1035
|
}>;
|
1032
1036
|
/**
|
1037
|
+
Generated files as base64 encoded strings or binary data.
|
1038
|
+
The files should be returned without any unnecessary conversion.
|
1039
|
+
If the API returns base64 encoded strings, the files should be returned
|
1040
|
+
as base64 encoded strings. If the API returns binary data, the files should
|
1041
|
+
be returned as binary data.
|
1042
|
+
*/
|
1043
|
+
files?: Array<{
|
1044
|
+
data: string | Uint8Array;
|
1045
|
+
mimeType: string;
|
1046
|
+
}>;
|
1047
|
+
/**
|
1033
1048
|
Tool calls that the model has generated.
|
1034
1049
|
Can be undefined if the model did not generate any tool calls.
|
1035
1050
|
*/
|
@@ -1184,6 +1199,17 @@ type LanguageModelV1StreamPart = {
|
|
1184
1199
|
} | {
|
1185
1200
|
type: 'source';
|
1186
1201
|
source: LanguageModelV1Source;
|
1202
|
+
} | {
|
1203
|
+
type: 'file';
|
1204
|
+
mimeType: string;
|
1205
|
+
/**
|
1206
|
+
Generated file data as base64 encoded strings or binary data.
|
1207
|
+
The file data should be returned without any unnecessary conversion.
|
1208
|
+
If the API returns base64 encoded strings, the file data should be returned
|
1209
|
+
as base64 encoded strings. If the API returns binary data, the file data should
|
1210
|
+
be returned as binary data.
|
1211
|
+
*/
|
1212
|
+
data: string | Uint8Array;
|
1187
1213
|
} | ({
|
1188
1214
|
type: 'tool-call';
|
1189
1215
|
} & LanguageModelV1FunctionToolCall) | {
|
package/dist/index.d.ts
CHANGED
@@ -611,7 +611,7 @@ type LanguageModelV1Message = ({
|
|
611
611
|
content: Array<LanguageModelV1TextPart | LanguageModelV1ImagePart | LanguageModelV1FilePart>;
|
612
612
|
} | {
|
613
613
|
role: 'assistant';
|
614
|
-
content: Array<LanguageModelV1TextPart | LanguageModelV1ReasoningPart | LanguageModelV1RedactedReasoningPart | LanguageModelV1ToolCallPart>;
|
614
|
+
content: Array<LanguageModelV1TextPart | LanguageModelV1FilePart | LanguageModelV1ReasoningPart | LanguageModelV1RedactedReasoningPart | LanguageModelV1ToolCallPart>;
|
615
615
|
} | {
|
616
616
|
role: 'tool';
|
617
617
|
content: Array<LanguageModelV1ToolResultPart>;
|
@@ -701,6 +701,10 @@ File content part of a prompt. It contains a file.
|
|
701
701
|
interface LanguageModelV1FilePart {
|
702
702
|
type: 'file';
|
703
703
|
/**
|
704
|
+
* Optional filename of the file.
|
705
|
+
*/
|
706
|
+
filename?: string;
|
707
|
+
/**
|
704
708
|
File data as base64 encoded string or as a URL.
|
705
709
|
*/
|
706
710
|
data: string | URL;
|
@@ -1030,6 +1034,17 @@ An optional signature for verifying that the reasoning originated from the model
|
|
1030
1034
|
data: string;
|
1031
1035
|
}>;
|
1032
1036
|
/**
|
1037
|
+
Generated files as base64 encoded strings or binary data.
|
1038
|
+
The files should be returned without any unnecessary conversion.
|
1039
|
+
If the API returns base64 encoded strings, the files should be returned
|
1040
|
+
as base64 encoded strings. If the API returns binary data, the files should
|
1041
|
+
be returned as binary data.
|
1042
|
+
*/
|
1043
|
+
files?: Array<{
|
1044
|
+
data: string | Uint8Array;
|
1045
|
+
mimeType: string;
|
1046
|
+
}>;
|
1047
|
+
/**
|
1033
1048
|
Tool calls that the model has generated.
|
1034
1049
|
Can be undefined if the model did not generate any tool calls.
|
1035
1050
|
*/
|
@@ -1184,6 +1199,17 @@ type LanguageModelV1StreamPart = {
|
|
1184
1199
|
} | {
|
1185
1200
|
type: 'source';
|
1186
1201
|
source: LanguageModelV1Source;
|
1202
|
+
} | {
|
1203
|
+
type: 'file';
|
1204
|
+
mimeType: string;
|
1205
|
+
/**
|
1206
|
+
Generated file data as base64 encoded strings or binary data.
|
1207
|
+
The file data should be returned without any unnecessary conversion.
|
1208
|
+
If the API returns base64 encoded strings, the file data should be returned
|
1209
|
+
as base64 encoded strings. If the API returns binary data, the file data should
|
1210
|
+
be returned as binary data.
|
1211
|
+
*/
|
1212
|
+
data: string | Uint8Array;
|
1187
1213
|
} | ({
|
1188
1214
|
type: 'tool-call';
|
1189
1215
|
} & LanguageModelV1FunctionToolCall) | {
|