@ai-sdk/google 4.0.0-beta.25 → 4.0.0-beta.26
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 +6 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +8 -0
- package/dist/internal/index.d.ts +8 -0
- package/dist/internal/index.js +10 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +10 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/convert-google-generative-ai-usage.ts +7 -0
- package/src/google-generative-ai-language-model.ts +12 -0
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "@ai-sdk/provider-utils";
|
|
8
8
|
|
|
9
9
|
// src/version.ts
|
|
10
|
-
var VERSION = true ? "4.0.0-beta.
|
|
10
|
+
var VERSION = true ? "4.0.0-beta.26" : "0.0.0-test";
|
|
11
11
|
|
|
12
12
|
// src/google-generative-ai-embedding-model.ts
|
|
13
13
|
import {
|
|
@@ -2082,6 +2082,12 @@ var getSafetyRatingSchema = () => z5.object({
|
|
|
2082
2082
|
severityScore: z5.number().nullish(),
|
|
2083
2083
|
blocked: z5.boolean().nullish()
|
|
2084
2084
|
});
|
|
2085
|
+
var tokenDetailsSchema = z5.array(
|
|
2086
|
+
z5.object({
|
|
2087
|
+
modality: z5.string(),
|
|
2088
|
+
tokenCount: z5.number()
|
|
2089
|
+
})
|
|
2090
|
+
).nullish();
|
|
2085
2091
|
var usageSchema = z5.object({
|
|
2086
2092
|
cachedContentTokenCount: z5.number().nullish(),
|
|
2087
2093
|
thoughtsTokenCount: z5.number().nullish(),
|
|
@@ -2089,7 +2095,10 @@ var usageSchema = z5.object({
|
|
|
2089
2095
|
candidatesTokenCount: z5.number().nullish(),
|
|
2090
2096
|
totalTokenCount: z5.number().nullish(),
|
|
2091
2097
|
// https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#TrafficType
|
|
2092
|
-
trafficType: z5.string().nullish()
|
|
2098
|
+
trafficType: z5.string().nullish(),
|
|
2099
|
+
// https://ai.google.dev/api/generate-content#Modality
|
|
2100
|
+
promptTokensDetails: tokenDetailsSchema,
|
|
2101
|
+
candidatesTokensDetails: tokenDetailsSchema
|
|
2093
2102
|
});
|
|
2094
2103
|
var getUrlContextMetadataSchema = () => z5.object({
|
|
2095
2104
|
urlMetadata: z5.array(
|