@ai-sdk/google 4.0.0-beta.24 → 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 +14 -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 +3 -3
- package/src/convert-google-generative-ai-usage.ts +7 -0
- package/src/google-generative-ai-language-model.ts +12 -0
package/dist/internal/index.mjs
CHANGED
|
@@ -1871,6 +1871,12 @@ var getSafetyRatingSchema = () => z3.object({
|
|
|
1871
1871
|
severityScore: z3.number().nullish(),
|
|
1872
1872
|
blocked: z3.boolean().nullish()
|
|
1873
1873
|
});
|
|
1874
|
+
var tokenDetailsSchema = z3.array(
|
|
1875
|
+
z3.object({
|
|
1876
|
+
modality: z3.string(),
|
|
1877
|
+
tokenCount: z3.number()
|
|
1878
|
+
})
|
|
1879
|
+
).nullish();
|
|
1874
1880
|
var usageSchema = z3.object({
|
|
1875
1881
|
cachedContentTokenCount: z3.number().nullish(),
|
|
1876
1882
|
thoughtsTokenCount: z3.number().nullish(),
|
|
@@ -1878,7 +1884,10 @@ var usageSchema = z3.object({
|
|
|
1878
1884
|
candidatesTokenCount: z3.number().nullish(),
|
|
1879
1885
|
totalTokenCount: z3.number().nullish(),
|
|
1880
1886
|
// https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#TrafficType
|
|
1881
|
-
trafficType: z3.string().nullish()
|
|
1887
|
+
trafficType: z3.string().nullish(),
|
|
1888
|
+
// https://ai.google.dev/api/generate-content#Modality
|
|
1889
|
+
promptTokensDetails: tokenDetailsSchema,
|
|
1890
|
+
candidatesTokensDetails: tokenDetailsSchema
|
|
1882
1891
|
});
|
|
1883
1892
|
var getUrlContextMetadataSchema = () => z3.object({
|
|
1884
1893
|
urlMetadata: z3.array(
|