@ai-sdk/provider 2.0.0-alpha.10 → 2.0.0-alpha.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 +34 -1
- package/dist/index.d.ts +34 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
@@ -843,6 +843,10 @@ type LanguageModelV2CallOptions = {
|
|
843
843
|
*/
|
844
844
|
toolChoice?: LanguageModelV2ToolChoice;
|
845
845
|
/**
|
846
|
+
Include raw chunks in the stream. Only applicable for streaming calls.
|
847
|
+
*/
|
848
|
+
includeRawChunks?: boolean;
|
849
|
+
/**
|
846
850
|
Abort signal for cancelling the operation.
|
847
851
|
*/
|
848
852
|
abortSignal?: AbortSignal;
|
@@ -918,7 +922,7 @@ A source that has been used as input to generate the response.
|
|
918
922
|
type LanguageModelV2Source = {
|
919
923
|
type: 'source';
|
920
924
|
/**
|
921
|
-
*
|
925
|
+
* The type of source - URL sources reference web content.
|
922
926
|
*/
|
923
927
|
sourceType: 'url';
|
924
928
|
/**
|
@@ -937,6 +941,32 @@ type LanguageModelV2Source = {
|
|
937
941
|
* Additional provider metadata for the source.
|
938
942
|
*/
|
939
943
|
providerMetadata?: SharedV2ProviderMetadata;
|
944
|
+
} | {
|
945
|
+
type: 'source';
|
946
|
+
/**
|
947
|
+
* The type of source - document sources reference files/documents.
|
948
|
+
*/
|
949
|
+
sourceType: 'document';
|
950
|
+
/**
|
951
|
+
* The ID of the source.
|
952
|
+
*/
|
953
|
+
id: string;
|
954
|
+
/**
|
955
|
+
* IANA media type of the document (e.g., 'application/pdf').
|
956
|
+
*/
|
957
|
+
mediaType: string;
|
958
|
+
/**
|
959
|
+
* The title of the document.
|
960
|
+
*/
|
961
|
+
title: string;
|
962
|
+
/**
|
963
|
+
* Optional filename of the document.
|
964
|
+
*/
|
965
|
+
filename?: string;
|
966
|
+
/**
|
967
|
+
* Additional provider metadata for the source.
|
968
|
+
*/
|
969
|
+
providerMetadata?: SharedV2ProviderMetadata;
|
940
970
|
};
|
941
971
|
|
942
972
|
/**
|
@@ -1047,6 +1077,9 @@ type LanguageModelV2StreamPart = LanguageModelV2Content | {
|
|
1047
1077
|
usage: LanguageModelV2Usage;
|
1048
1078
|
finishReason: LanguageModelV2FinishReason;
|
1049
1079
|
providerMetadata?: SharedV2ProviderMetadata;
|
1080
|
+
} | {
|
1081
|
+
type: 'raw';
|
1082
|
+
rawValue: unknown;
|
1050
1083
|
} | {
|
1051
1084
|
type: 'error';
|
1052
1085
|
error: unknown;
|
package/dist/index.d.ts
CHANGED
@@ -843,6 +843,10 @@ type LanguageModelV2CallOptions = {
|
|
843
843
|
*/
|
844
844
|
toolChoice?: LanguageModelV2ToolChoice;
|
845
845
|
/**
|
846
|
+
Include raw chunks in the stream. Only applicable for streaming calls.
|
847
|
+
*/
|
848
|
+
includeRawChunks?: boolean;
|
849
|
+
/**
|
846
850
|
Abort signal for cancelling the operation.
|
847
851
|
*/
|
848
852
|
abortSignal?: AbortSignal;
|
@@ -918,7 +922,7 @@ A source that has been used as input to generate the response.
|
|
918
922
|
type LanguageModelV2Source = {
|
919
923
|
type: 'source';
|
920
924
|
/**
|
921
|
-
*
|
925
|
+
* The type of source - URL sources reference web content.
|
922
926
|
*/
|
923
927
|
sourceType: 'url';
|
924
928
|
/**
|
@@ -937,6 +941,32 @@ type LanguageModelV2Source = {
|
|
937
941
|
* Additional provider metadata for the source.
|
938
942
|
*/
|
939
943
|
providerMetadata?: SharedV2ProviderMetadata;
|
944
|
+
} | {
|
945
|
+
type: 'source';
|
946
|
+
/**
|
947
|
+
* The type of source - document sources reference files/documents.
|
948
|
+
*/
|
949
|
+
sourceType: 'document';
|
950
|
+
/**
|
951
|
+
* The ID of the source.
|
952
|
+
*/
|
953
|
+
id: string;
|
954
|
+
/**
|
955
|
+
* IANA media type of the document (e.g., 'application/pdf').
|
956
|
+
*/
|
957
|
+
mediaType: string;
|
958
|
+
/**
|
959
|
+
* The title of the document.
|
960
|
+
*/
|
961
|
+
title: string;
|
962
|
+
/**
|
963
|
+
* Optional filename of the document.
|
964
|
+
*/
|
965
|
+
filename?: string;
|
966
|
+
/**
|
967
|
+
* Additional provider metadata for the source.
|
968
|
+
*/
|
969
|
+
providerMetadata?: SharedV2ProviderMetadata;
|
940
970
|
};
|
941
971
|
|
942
972
|
/**
|
@@ -1047,6 +1077,9 @@ type LanguageModelV2StreamPart = LanguageModelV2Content | {
|
|
1047
1077
|
usage: LanguageModelV2Usage;
|
1048
1078
|
finishReason: LanguageModelV2FinishReason;
|
1049
1079
|
providerMetadata?: SharedV2ProviderMetadata;
|
1080
|
+
} | {
|
1081
|
+
type: 'raw';
|
1082
|
+
rawValue: unknown;
|
1050
1083
|
} | {
|
1051
1084
|
type: 'error';
|
1052
1085
|
error: unknown;
|