@google/genai 0.11.0 → 0.12.0
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/dist/genai.d.ts +2 -0
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -1
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.js +13 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/node.d.ts +2 -0
- package/dist/web/index.mjs +13 -1
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +2 -0
- package/package.json +1 -1
package/dist/node/node.d.ts
CHANGED
|
@@ -2859,6 +2859,8 @@ export declare interface LiveServerContent {
|
|
|
2859
2859
|
turnComplete?: boolean;
|
|
2860
2860
|
/** If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue. */
|
|
2861
2861
|
interrupted?: boolean;
|
|
2862
|
+
/** Metadata returned to client when grounding is enabled. */
|
|
2863
|
+
groundingMetadata?: GroundingMetadata;
|
|
2862
2864
|
/** If true, indicates that the model is done generating. When model is
|
|
2863
2865
|
interrupted while generating there will be no generation_complete message
|
|
2864
2866
|
in interrupted turn, it will go through interrupted > turn_complete.
|
package/dist/web/index.mjs
CHANGED
|
@@ -4236,6 +4236,12 @@ function liveServerContentFromMldev(apiClient, fromObject) {
|
|
|
4236
4236
|
if (fromInterrupted != null) {
|
|
4237
4237
|
setValueByPath(toObject, ['interrupted'], fromInterrupted);
|
|
4238
4238
|
}
|
|
4239
|
+
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
4240
|
+
'groundingMetadata',
|
|
4241
|
+
]);
|
|
4242
|
+
if (fromGroundingMetadata != null) {
|
|
4243
|
+
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
4244
|
+
}
|
|
4239
4245
|
const fromGenerationComplete = getValueByPath(fromObject, [
|
|
4240
4246
|
'generationComplete',
|
|
4241
4247
|
]);
|
|
@@ -4270,6 +4276,12 @@ function liveServerContentFromVertex(apiClient, fromObject) {
|
|
|
4270
4276
|
if (fromInterrupted != null) {
|
|
4271
4277
|
setValueByPath(toObject, ['interrupted'], fromInterrupted);
|
|
4272
4278
|
}
|
|
4279
|
+
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
4280
|
+
'groundingMetadata',
|
|
4281
|
+
]);
|
|
4282
|
+
if (fromGroundingMetadata != null) {
|
|
4283
|
+
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
4284
|
+
}
|
|
4273
4285
|
const fromGenerationComplete = getValueByPath(fromObject, [
|
|
4274
4286
|
'generationComplete',
|
|
4275
4287
|
]);
|
|
@@ -8612,7 +8624,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
8612
8624
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
8613
8625
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
8614
8626
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
8615
|
-
const SDK_VERSION = '0.
|
|
8627
|
+
const SDK_VERSION = '0.12.0'; // x-release-please-version
|
|
8616
8628
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
8617
8629
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
8618
8630
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|