@ai-sdk/google 3.0.118 → 3.0.119
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 +8 -0
- package/dist/index.d.mts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -4
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +14 -0
- package/dist/internal/index.d.ts +14 -0
- package/dist/internal/index.js +6 -3
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +6 -3
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/convert-google-generative-ai-usage.ts +3 -0
- package/src/google-generative-ai-language-model.ts +24 -17
package/dist/index.mjs
CHANGED
|
@@ -224,7 +224,7 @@ import {
|
|
|
224
224
|
} from "@ai-sdk/provider-utils";
|
|
225
225
|
|
|
226
226
|
// src/version.ts
|
|
227
|
-
var VERSION = true ? "3.0.
|
|
227
|
+
var VERSION = true ? "3.0.119" : "0.0.0-test";
|
|
228
228
|
|
|
229
229
|
// src/google-generative-ai-embedding-model.ts
|
|
230
230
|
import {
|
|
@@ -2928,21 +2928,24 @@ var tokenDetailsSchema = z7.array(
|
|
|
2928
2928
|
z7.object({
|
|
2929
2929
|
modality: z7.string(),
|
|
2930
2930
|
tokenCount: z7.number()
|
|
2931
|
-
})
|
|
2931
|
+
}).catchall(z7.json())
|
|
2932
2932
|
).nullish();
|
|
2933
2933
|
var usageSchema = z7.object({
|
|
2934
2934
|
cachedContentTokenCount: z7.number().nullish(),
|
|
2935
2935
|
thoughtsTokenCount: z7.number().nullish(),
|
|
2936
2936
|
promptTokenCount: z7.number().nullish(),
|
|
2937
2937
|
candidatesTokenCount: z7.number().nullish(),
|
|
2938
|
+
toolUsePromptTokenCount: z7.number().nullish(),
|
|
2938
2939
|
totalTokenCount: z7.number().nullish(),
|
|
2939
2940
|
// https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#TrafficType
|
|
2940
2941
|
trafficType: z7.string().nullish(),
|
|
2941
2942
|
serviceTier: z7.string().nullish(),
|
|
2942
2943
|
// https://ai.google.dev/api/generate-content#Modality
|
|
2943
2944
|
promptTokensDetails: tokenDetailsSchema,
|
|
2944
|
-
|
|
2945
|
-
|
|
2945
|
+
cacheTokensDetails: tokenDetailsSchema,
|
|
2946
|
+
candidatesTokensDetails: tokenDetailsSchema,
|
|
2947
|
+
toolUsePromptTokensDetails: tokenDetailsSchema
|
|
2948
|
+
}).catchall(z7.json());
|
|
2946
2949
|
var getUrlContextMetadataSchema = () => z7.object({
|
|
2947
2950
|
urlMetadata: z7.array(
|
|
2948
2951
|
z7.object({
|