@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/genai.d.ts
CHANGED
|
@@ -2847,6 +2847,8 @@ export declare interface LiveServerContent {
|
|
|
2847
2847
|
turnComplete?: boolean;
|
|
2848
2848
|
/** 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. */
|
|
2849
2849
|
interrupted?: boolean;
|
|
2850
|
+
/** Metadata returned to client when grounding is enabled. */
|
|
2851
|
+
groundingMetadata?: GroundingMetadata;
|
|
2850
2852
|
/** If true, indicates that the model is done generating. When model is
|
|
2851
2853
|
interrupted while generating there will be no generation_complete message
|
|
2852
2854
|
in interrupted turn, it will go through interrupted > turn_complete.
|
package/dist/index.js
CHANGED
|
@@ -2817,7 +2817,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
2817
2817
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
2818
2818
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
2819
2819
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
2820
|
-
const SDK_VERSION = '0.
|
|
2820
|
+
const SDK_VERSION = '0.12.0'; // x-release-please-version
|
|
2821
2821
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
2822
2822
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
2823
2823
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -4791,6 +4791,12 @@ function liveServerContentFromMldev(apiClient, fromObject) {
|
|
|
4791
4791
|
if (fromInterrupted != null) {
|
|
4792
4792
|
setValueByPath(toObject, ['interrupted'], fromInterrupted);
|
|
4793
4793
|
}
|
|
4794
|
+
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
4795
|
+
'groundingMetadata',
|
|
4796
|
+
]);
|
|
4797
|
+
if (fromGroundingMetadata != null) {
|
|
4798
|
+
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
4799
|
+
}
|
|
4794
4800
|
const fromGenerationComplete = getValueByPath(fromObject, [
|
|
4795
4801
|
'generationComplete',
|
|
4796
4802
|
]);
|
|
@@ -4825,6 +4831,12 @@ function liveServerContentFromVertex(apiClient, fromObject) {
|
|
|
4825
4831
|
if (fromInterrupted != null) {
|
|
4826
4832
|
setValueByPath(toObject, ['interrupted'], fromInterrupted);
|
|
4827
4833
|
}
|
|
4834
|
+
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
4835
|
+
'groundingMetadata',
|
|
4836
|
+
]);
|
|
4837
|
+
if (fromGroundingMetadata != null) {
|
|
4838
|
+
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
4839
|
+
}
|
|
4828
4840
|
const fromGenerationComplete = getValueByPath(fromObject, [
|
|
4829
4841
|
'generationComplete',
|
|
4830
4842
|
]);
|