@google/genai 2.9.0 → 2.11.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 +1149 -566
- package/dist/index.cjs +579 -105
- package/dist/index.mjs +575 -106
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +579 -105
- package/dist/node/index.mjs +575 -106
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +1149 -566
- package/dist/tokenizer/node.cjs +213 -73
- package/dist/tokenizer/node.d.ts +245 -14
- package/dist/tokenizer/node.mjs +213 -73
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +214 -74
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +339 -82
- package/dist/vertex_internal/index.js +214 -74
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +575 -106
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +1149 -566
- package/package.json +2 -9
package/dist/genai.d.ts
CHANGED
|
@@ -80,30 +80,30 @@ declare type Agent$ = Agent;
|
|
|
80
80
|
* }
|
|
81
81
|
*/
|
|
82
82
|
declare type Agent = {
|
|
83
|
-
/**
|
|
84
|
-
* The unique identifier for the agent.
|
|
85
|
-
*/
|
|
86
|
-
id?: string | undefined;
|
|
87
83
|
/**
|
|
88
84
|
* The base agent to extend.
|
|
89
85
|
*/
|
|
90
86
|
base_agent?: string | undefined;
|
|
91
87
|
/**
|
|
92
|
-
*
|
|
88
|
+
* The environment configuration for the agent.
|
|
93
89
|
*/
|
|
94
|
-
|
|
90
|
+
base_environment?: interactions.Environment | string | undefined;
|
|
95
91
|
/**
|
|
96
92
|
* Agent description for developers to quickly read and understand.
|
|
97
93
|
*/
|
|
98
94
|
description?: string | undefined;
|
|
99
95
|
/**
|
|
100
|
-
* The
|
|
96
|
+
* The unique identifier for the agent.
|
|
101
97
|
*/
|
|
102
|
-
|
|
98
|
+
id?: string | undefined;
|
|
103
99
|
/**
|
|
104
|
-
*
|
|
100
|
+
* System instruction for the agent.
|
|
105
101
|
*/
|
|
106
|
-
|
|
102
|
+
system_instruction?: string | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* The tools available to the agent.
|
|
105
|
+
*/
|
|
106
|
+
tools?: Array<AgentTool> | undefined;
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
declare type AgentCreateParams$ = CreateAgentParams;
|
|
@@ -160,7 +160,7 @@ declare type AgentTool$ = AgentTool;
|
|
|
160
160
|
/**
|
|
161
161
|
* A tool that the agent can use.
|
|
162
162
|
*/
|
|
163
|
-
declare type AgentTool = interactions.CodeExecution | interactions.GoogleSearch | interactions.URLContext | interactions.MCPServer;
|
|
163
|
+
declare type AgentTool = interactions.CodeExecution | interactions.GoogleSearch | interactions.URLContext | interactions.MCPServer | interactions.FunctionT;
|
|
164
164
|
|
|
165
165
|
/** Aggregation metric. This enum is not supported in Gemini API. */
|
|
166
166
|
export declare enum AggregationMetric {
|
|
@@ -251,8 +251,6 @@ declare type AllowedTools = {
|
|
|
251
251
|
|
|
252
252
|
declare type Allowlist$ = Allowlist;
|
|
253
253
|
|
|
254
|
-
declare type Allowlist$2 = AllowlistEntry;
|
|
255
|
-
|
|
256
254
|
/**
|
|
257
255
|
* Outbound networking configuration for the sandbox. When specified, restricts which external domains the sandbox can reach. Omit entirely to allow all outbound traffic with no header injection.
|
|
258
256
|
*/
|
|
@@ -263,13 +261,6 @@ declare type Allowlist = {
|
|
|
263
261
|
allowlist?: Array<AllowlistEntry> | undefined;
|
|
264
262
|
};
|
|
265
263
|
|
|
266
|
-
/**
|
|
267
|
-
* @license
|
|
268
|
-
* Copyright 2026 Google LLC
|
|
269
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
270
|
-
*
|
|
271
|
-
* g3-prettier-ignore-file
|
|
272
|
-
*/
|
|
273
264
|
/**
|
|
274
265
|
* A single domain allowlist rule with optional header injection.
|
|
275
266
|
*/
|
|
@@ -279,9 +270,11 @@ declare type AllowlistEntry = {
|
|
|
279
270
|
*/
|
|
280
271
|
domain: string;
|
|
281
272
|
/**
|
|
282
|
-
* Headers to inject on all outbound requests matching this domain.
|
|
273
|
+
* Headers to inject on all outbound requests matching this domain. Accepts a single dict or a list of dicts. The egress proxy injects these automatically.
|
|
283
274
|
*/
|
|
284
|
-
transform?:
|
|
275
|
+
transform?: {
|
|
276
|
+
[k: string]: string;
|
|
277
|
+
} | Array<{
|
|
285
278
|
[k: string]: string;
|
|
286
279
|
}> | undefined;
|
|
287
280
|
};
|
|
@@ -496,24 +489,9 @@ declare type Arguments$2 = GoogleMapsCallArguments;
|
|
|
496
489
|
|
|
497
490
|
declare type Arguments$3 = GoogleSearchCallArguments;
|
|
498
491
|
|
|
499
|
-
declare type Arguments$4 =
|
|
492
|
+
declare type Arguments$4 = RetrievalCallArguments;
|
|
500
493
|
|
|
501
|
-
|
|
502
|
-
* @license
|
|
503
|
-
* Copyright 2026 Google LLC
|
|
504
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
505
|
-
*
|
|
506
|
-
* g3-prettier-ignore-file
|
|
507
|
-
*/
|
|
508
|
-
/**
|
|
509
|
-
* The arguments to pass to the URL context.
|
|
510
|
-
*/
|
|
511
|
-
declare type Arguments = {
|
|
512
|
-
/**
|
|
513
|
-
* The URLs to fetch.
|
|
514
|
-
*/
|
|
515
|
-
urls?: Array<string> | undefined;
|
|
516
|
-
};
|
|
494
|
+
declare type Arguments$5 = URLContextCallArguments;
|
|
517
495
|
|
|
518
496
|
declare type ArgumentsDelta$ = ArgumentsDelta;
|
|
519
497
|
|
|
@@ -525,10 +503,74 @@ declare type ArgumentsDelta$ = ArgumentsDelta;
|
|
|
525
503
|
* g3-prettier-ignore-file
|
|
526
504
|
*/
|
|
527
505
|
declare type ArgumentsDelta = {
|
|
528
|
-
type: "arguments_delta";
|
|
529
506
|
arguments?: string | undefined;
|
|
507
|
+
type: "arguments_delta";
|
|
530
508
|
};
|
|
531
509
|
|
|
510
|
+
/** The aspect ratio for the image output. */
|
|
511
|
+
export declare enum AspectRatio {
|
|
512
|
+
/**
|
|
513
|
+
* Default value. This value is unused.
|
|
514
|
+
*/
|
|
515
|
+
ASPECT_RATIO_UNSPECIFIED = "ASPECT_RATIO_UNSPECIFIED",
|
|
516
|
+
/**
|
|
517
|
+
* 1:1 aspect ratio.
|
|
518
|
+
*/
|
|
519
|
+
ASPECT_RATIO_ONE_BY_ONE = "ASPECT_RATIO_ONE_BY_ONE",
|
|
520
|
+
/**
|
|
521
|
+
* 2:3 aspect ratio.
|
|
522
|
+
*/
|
|
523
|
+
ASPECT_RATIO_TWO_BY_THREE = "ASPECT_RATIO_TWO_BY_THREE",
|
|
524
|
+
/**
|
|
525
|
+
* 3:2 aspect ratio.
|
|
526
|
+
*/
|
|
527
|
+
ASPECT_RATIO_THREE_BY_TWO = "ASPECT_RATIO_THREE_BY_TWO",
|
|
528
|
+
/**
|
|
529
|
+
* 3:4 aspect ratio.
|
|
530
|
+
*/
|
|
531
|
+
ASPECT_RATIO_THREE_BY_FOUR = "ASPECT_RATIO_THREE_BY_FOUR",
|
|
532
|
+
/**
|
|
533
|
+
* 4:3 aspect ratio.
|
|
534
|
+
*/
|
|
535
|
+
ASPECT_RATIO_FOUR_BY_THREE = "ASPECT_RATIO_FOUR_BY_THREE",
|
|
536
|
+
/**
|
|
537
|
+
* 4:5 aspect ratio.
|
|
538
|
+
*/
|
|
539
|
+
ASPECT_RATIO_FOUR_BY_FIVE = "ASPECT_RATIO_FOUR_BY_FIVE",
|
|
540
|
+
/**
|
|
541
|
+
* 5:4 aspect ratio.
|
|
542
|
+
*/
|
|
543
|
+
ASPECT_RATIO_FIVE_BY_FOUR = "ASPECT_RATIO_FIVE_BY_FOUR",
|
|
544
|
+
/**
|
|
545
|
+
* 9:16 aspect ratio.
|
|
546
|
+
*/
|
|
547
|
+
ASPECT_RATIO_NINE_BY_SIXTEEN = "ASPECT_RATIO_NINE_BY_SIXTEEN",
|
|
548
|
+
/**
|
|
549
|
+
* 16:9 aspect ratio.
|
|
550
|
+
*/
|
|
551
|
+
ASPECT_RATIO_SIXTEEN_BY_NINE = "ASPECT_RATIO_SIXTEEN_BY_NINE",
|
|
552
|
+
/**
|
|
553
|
+
* 21:9 aspect ratio.
|
|
554
|
+
*/
|
|
555
|
+
ASPECT_RATIO_TWENTY_ONE_BY_NINE = "ASPECT_RATIO_TWENTY_ONE_BY_NINE",
|
|
556
|
+
/**
|
|
557
|
+
* 1:8 aspect ratio.
|
|
558
|
+
*/
|
|
559
|
+
ASPECT_RATIO_ONE_BY_EIGHT = "ASPECT_RATIO_ONE_BY_EIGHT",
|
|
560
|
+
/**
|
|
561
|
+
* 8:1 aspect ratio.
|
|
562
|
+
*/
|
|
563
|
+
ASPECT_RATIO_EIGHT_BY_ONE = "ASPECT_RATIO_EIGHT_BY_ONE",
|
|
564
|
+
/**
|
|
565
|
+
* 1:4 aspect ratio.
|
|
566
|
+
*/
|
|
567
|
+
ASPECT_RATIO_ONE_BY_FOUR = "ASPECT_RATIO_ONE_BY_FOUR",
|
|
568
|
+
/**
|
|
569
|
+
* 4:1 aspect ratio.
|
|
570
|
+
*/
|
|
571
|
+
ASPECT_RATIO_FOUR_BY_ONE = "ASPECT_RATIO_FOUR_BY_ONE"
|
|
572
|
+
}
|
|
573
|
+
|
|
532
574
|
declare type Audio$ = AudioDelta;
|
|
533
575
|
|
|
534
576
|
/** Representation of an audio chunk. */
|
|
@@ -548,27 +590,27 @@ declare type AudioContent$ = AudioContent;
|
|
|
548
590
|
* An audio content block.
|
|
549
591
|
*/
|
|
550
592
|
declare type AudioContent = {
|
|
551
|
-
type: "audio";
|
|
552
593
|
/**
|
|
553
|
-
* The audio
|
|
594
|
+
* The number of audio channels.
|
|
554
595
|
*/
|
|
555
|
-
|
|
596
|
+
channels?: number | undefined;
|
|
556
597
|
/**
|
|
557
|
-
* The
|
|
598
|
+
* The audio content.
|
|
558
599
|
*/
|
|
559
|
-
|
|
600
|
+
data?: string | undefined;
|
|
560
601
|
/**
|
|
561
602
|
* The mime type of the audio.
|
|
562
603
|
*/
|
|
563
604
|
mime_type?: AudioContentMimeType | undefined;
|
|
564
|
-
/**
|
|
565
|
-
* The number of audio channels.
|
|
566
|
-
*/
|
|
567
|
-
channels?: number | undefined;
|
|
568
605
|
/**
|
|
569
606
|
* The sample rate of the audio.
|
|
570
607
|
*/
|
|
571
608
|
sample_rate?: number | undefined;
|
|
609
|
+
type: "audio";
|
|
610
|
+
/**
|
|
611
|
+
* The URI of the audio.
|
|
612
|
+
*/
|
|
613
|
+
uri?: string | undefined;
|
|
572
614
|
};
|
|
573
615
|
|
|
574
616
|
/**
|
|
@@ -584,9 +626,11 @@ declare type AudioContent = {
|
|
|
584
626
|
declare type AudioContentMimeType = "audio/wav" | "audio/mp3" | "audio/aiff" | "audio/aac" | "audio/ogg" | "audio/flac" | "audio/mpeg" | "audio/m4a" | "audio/l16" | "audio/opus" | "audio/alaw" | "audio/mulaw" | (string & {});
|
|
585
627
|
|
|
586
628
|
declare type AudioDelta = {
|
|
587
|
-
|
|
629
|
+
/**
|
|
630
|
+
* The number of audio channels.
|
|
631
|
+
*/
|
|
632
|
+
channels?: number | undefined;
|
|
588
633
|
data?: string | undefined;
|
|
589
|
-
uri?: string | undefined;
|
|
590
634
|
mime_type?: AudioDeltaMimeType | undefined;
|
|
591
635
|
/**
|
|
592
636
|
* Deprecated. Use sample_rate instead. The value is ignored.
|
|
@@ -598,10 +642,8 @@ declare type AudioDelta = {
|
|
|
598
642
|
* The sample rate of the audio.
|
|
599
643
|
*/
|
|
600
644
|
sample_rate?: number | undefined;
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
*/
|
|
604
|
-
channels?: number | undefined;
|
|
645
|
+
type: "audio";
|
|
646
|
+
uri?: string | undefined;
|
|
605
647
|
};
|
|
606
648
|
|
|
607
649
|
/**
|
|
@@ -613,39 +655,46 @@ declare type AudioDelta = {
|
|
|
613
655
|
*/
|
|
614
656
|
declare type AudioDeltaMimeType = "audio/wav" | "audio/mp3" | "audio/aiff" | "audio/aac" | "audio/ogg" | "audio/flac" | "audio/mpeg" | "audio/m4a" | "audio/l16" | "audio/opus" | "audio/alaw" | "audio/mulaw" | (string & {});
|
|
615
657
|
|
|
616
|
-
declare type AudioResponseFormat$ =
|
|
658
|
+
declare type AudioResponseFormat$ = AudioResponseFormat_2;
|
|
659
|
+
|
|
660
|
+
/** Configuration for audio-specific output formatting. */
|
|
661
|
+
export declare class AudioResponseFormat {
|
|
662
|
+
/** Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus). */
|
|
663
|
+
bitRate?: number;
|
|
664
|
+
/** Optional. Delivery mode for the generated content. */
|
|
665
|
+
delivery?: Delivery;
|
|
666
|
+
/** Optional. The MIME type of the audio output. */
|
|
667
|
+
mimeType?: string;
|
|
668
|
+
/** Optional. Sample rate for the generated audio in Hertz. */
|
|
669
|
+
sampleRate?: number;
|
|
670
|
+
}
|
|
617
671
|
|
|
618
672
|
/**
|
|
619
673
|
* Configuration for audio output format.
|
|
620
674
|
*/
|
|
621
|
-
declare type
|
|
622
|
-
type: "audio";
|
|
675
|
+
declare type AudioResponseFormat_2 = {
|
|
623
676
|
/**
|
|
624
|
-
*
|
|
677
|
+
* Bit rate in bits per second (bps). Only applicable for compressed formats
|
|
678
|
+
*
|
|
679
|
+
* @remarks
|
|
680
|
+
* (MP3, Opus).
|
|
625
681
|
*/
|
|
626
|
-
|
|
682
|
+
bit_rate?: number | undefined;
|
|
627
683
|
/**
|
|
628
684
|
* The delivery mode for the audio output.
|
|
629
685
|
*/
|
|
630
686
|
delivery?: AudioResponseFormatDelivery | undefined;
|
|
631
687
|
/**
|
|
632
|
-
*
|
|
688
|
+
* The MIME type of the audio output.
|
|
633
689
|
*/
|
|
634
|
-
|
|
690
|
+
mime_type?: AudioResponseFormatMimeType | undefined;
|
|
635
691
|
/**
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
* @remarks
|
|
639
|
-
* (MP3, Opus).
|
|
692
|
+
* Sample rate in Hz.
|
|
640
693
|
*/
|
|
641
|
-
|
|
694
|
+
sample_rate?: number | undefined;
|
|
695
|
+
type: "audio";
|
|
642
696
|
};
|
|
643
697
|
|
|
644
|
-
/**
|
|
645
|
-
* The delivery mode for the audio output.
|
|
646
|
-
*/
|
|
647
|
-
declare type AudioResponseFormatDelivery = "inline" | "uri" | (string & {});
|
|
648
|
-
|
|
649
698
|
/**
|
|
650
699
|
* @license
|
|
651
700
|
* Copyright 2026 Google LLC
|
|
@@ -653,6 +702,11 @@ declare type AudioResponseFormatDelivery = "inline" | "uri" | (string & {});
|
|
|
653
702
|
*
|
|
654
703
|
* g3-prettier-ignore-file
|
|
655
704
|
*/
|
|
705
|
+
/**
|
|
706
|
+
* The delivery mode for the audio output.
|
|
707
|
+
*/
|
|
708
|
+
declare type AudioResponseFormatDelivery = "inline" | "uri" | (string & {});
|
|
709
|
+
|
|
656
710
|
/**
|
|
657
711
|
* The MIME type of the audio output.
|
|
658
712
|
*/
|
|
@@ -1031,7 +1085,7 @@ export declare interface BatchJob {
|
|
|
1031
1085
|
outputInfo?: BatchJobOutputInfo;
|
|
1032
1086
|
}
|
|
1033
1087
|
|
|
1034
|
-
/** Config for `
|
|
1088
|
+
/** Config for `dest` parameter. */
|
|
1035
1089
|
export declare interface BatchJobDestination {
|
|
1036
1090
|
/** Storage format of the output files. Must be one of:
|
|
1037
1091
|
'jsonl', 'bigquery', 'vertex-dataset'.
|
|
@@ -1103,7 +1157,7 @@ export declare interface BatchJobSource {
|
|
|
1103
1157
|
|
|
1104
1158
|
export declare type BatchJobSourceUnion = BatchJobSource | InlinedRequest[] | string;
|
|
1105
1159
|
|
|
1106
|
-
/** Specifies the function Behavior.
|
|
1160
|
+
/** Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
|
|
1107
1161
|
export declare enum Behavior {
|
|
1108
1162
|
/**
|
|
1109
1163
|
* This value is unspecified.
|
|
@@ -1618,18 +1672,17 @@ declare type CodeExecutionCallArguments$ = CodeExecutionCallArguments;
|
|
|
1618
1672
|
* The arguments to pass to the code execution.
|
|
1619
1673
|
*/
|
|
1620
1674
|
declare type CodeExecutionCallArguments = {
|
|
1621
|
-
/**
|
|
1622
|
-
* Programming language of the `code`.
|
|
1623
|
-
*/
|
|
1624
|
-
language?: Language_2 | undefined;
|
|
1625
1675
|
/**
|
|
1626
1676
|
* The code to be executed.
|
|
1627
1677
|
*/
|
|
1628
1678
|
code?: string | undefined;
|
|
1679
|
+
/**
|
|
1680
|
+
* Programming language of the `code`.
|
|
1681
|
+
*/
|
|
1682
|
+
language?: Language_2 | undefined;
|
|
1629
1683
|
};
|
|
1630
1684
|
|
|
1631
1685
|
declare type CodeExecutionCallDelta = {
|
|
1632
|
-
type: "code_execution_call";
|
|
1633
1686
|
/**
|
|
1634
1687
|
* The arguments to pass to the code execution.
|
|
1635
1688
|
*/
|
|
@@ -1638,6 +1691,7 @@ declare type CodeExecutionCallDelta = {
|
|
|
1638
1691
|
* A signature hash for backend validation.
|
|
1639
1692
|
*/
|
|
1640
1693
|
signature?: string | undefined;
|
|
1694
|
+
type: "code_execution_call";
|
|
1641
1695
|
};
|
|
1642
1696
|
|
|
1643
1697
|
declare type CodeExecutionCallStep$ = CodeExecutionCallStep;
|
|
@@ -1646,7 +1700,6 @@ declare type CodeExecutionCallStep$ = CodeExecutionCallStep;
|
|
|
1646
1700
|
* Code execution call step.
|
|
1647
1701
|
*/
|
|
1648
1702
|
declare type CodeExecutionCallStep = {
|
|
1649
|
-
type: "code_execution_call";
|
|
1650
1703
|
/**
|
|
1651
1704
|
* The arguments to pass to the code execution.
|
|
1652
1705
|
*/
|
|
@@ -1659,6 +1712,7 @@ declare type CodeExecutionCallStep = {
|
|
|
1659
1712
|
* A signature hash for backend validation.
|
|
1660
1713
|
*/
|
|
1661
1714
|
signature?: string | undefined;
|
|
1715
|
+
type: "code_execution_call";
|
|
1662
1716
|
};
|
|
1663
1717
|
|
|
1664
1718
|
declare type CodeExecutionResult$ = CodeExecutionResultDelta;
|
|
@@ -1681,13 +1735,13 @@ export declare interface CodeExecutionResult {
|
|
|
1681
1735
|
* g3-prettier-ignore-file
|
|
1682
1736
|
*/
|
|
1683
1737
|
declare type CodeExecutionResultDelta = {
|
|
1684
|
-
type: "code_execution_result";
|
|
1685
|
-
result: string;
|
|
1686
1738
|
is_error?: boolean | undefined;
|
|
1739
|
+
result: string;
|
|
1687
1740
|
/**
|
|
1688
1741
|
* A signature hash for backend validation.
|
|
1689
1742
|
*/
|
|
1690
1743
|
signature?: string | undefined;
|
|
1744
|
+
type: "code_execution_result";
|
|
1691
1745
|
};
|
|
1692
1746
|
|
|
1693
1747
|
declare type CodeExecutionResultStep$ = CodeExecutionResultStep;
|
|
@@ -1703,23 +1757,23 @@ declare type CodeExecutionResultStep$ = CodeExecutionResultStep;
|
|
|
1703
1757
|
* Code execution result step.
|
|
1704
1758
|
*/
|
|
1705
1759
|
declare type CodeExecutionResultStep = {
|
|
1706
|
-
type: "code_execution_result";
|
|
1707
1760
|
/**
|
|
1708
|
-
* Required.
|
|
1761
|
+
* Required. ID to match the ID from the function call block.
|
|
1709
1762
|
*/
|
|
1710
|
-
|
|
1763
|
+
call_id: string;
|
|
1711
1764
|
/**
|
|
1712
1765
|
* Whether the code execution resulted in an error.
|
|
1713
1766
|
*/
|
|
1714
1767
|
is_error?: boolean | undefined;
|
|
1715
1768
|
/**
|
|
1716
|
-
* Required.
|
|
1769
|
+
* Required. The output of the code execution.
|
|
1717
1770
|
*/
|
|
1718
|
-
|
|
1771
|
+
result: string;
|
|
1719
1772
|
/**
|
|
1720
1773
|
* A signature hash for backend validation.
|
|
1721
1774
|
*/
|
|
1722
1775
|
signature?: string | undefined;
|
|
1776
|
+
type: "code_execution_result";
|
|
1723
1777
|
};
|
|
1724
1778
|
|
|
1725
1779
|
/** Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. This data type is not supported in Gemini API. */
|
|
@@ -1736,13 +1790,15 @@ export declare interface CompletionStats {
|
|
|
1736
1790
|
|
|
1737
1791
|
/** Composite reinforcement tuning reward config. */
|
|
1738
1792
|
export declare interface CompositeReinforcementTuningRewardConfig {
|
|
1793
|
+
/** List of reward function configurations with weights. */
|
|
1739
1794
|
weightedRewardConfigs?: CompositeReinforcementTuningRewardConfigWeightedRewardConfig[];
|
|
1740
1795
|
}
|
|
1741
1796
|
|
|
1742
1797
|
/** Composite reinforcement tuning reward config weighted reward config. */
|
|
1743
1798
|
export declare interface CompositeReinforcementTuningRewardConfigWeightedRewardConfig {
|
|
1799
|
+
/** Single reward configuration. */
|
|
1744
1800
|
rewardConfig?: SingleReinforcementTuningRewardConfig;
|
|
1745
|
-
/** How much this single reward contributes to the total overall reward. */
|
|
1801
|
+
/** How much this single reward contributes to the total overall reward. Total reward is a linear combination of single rewards with their corresponding weights, i.e., ``` total_reward = ( weight_a * reward_a + weight_b * reward_b + ... ) / (weight_a + weight_b + ...) ``` */
|
|
1746
1802
|
weight?: number;
|
|
1747
1803
|
}
|
|
1748
1804
|
|
|
@@ -1752,30 +1808,22 @@ declare type ComputerUse$ = ComputerUse_2;
|
|
|
1752
1808
|
export declare interface ComputerUse {
|
|
1753
1809
|
/** Required. The environment being operated. */
|
|
1754
1810
|
environment?: Environment;
|
|
1755
|
-
/** By default, predefined functions are included in the final model call.
|
|
1756
|
-
Some of them can be explicitly excluded from being automatically included.
|
|
1757
|
-
This can serve two purposes:
|
|
1758
|
-
1. Using a more restricted / different action space.
|
|
1759
|
-
2. Improving the definitions / instructions of predefined functions. */
|
|
1811
|
+
/** Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions. */
|
|
1760
1812
|
excludedPredefinedFunctions?: string[];
|
|
1761
|
-
/** Optional.
|
|
1762
|
-
*/
|
|
1813
|
+
/** Optional. Enables the prompt injection detection check on computer-use request. */
|
|
1763
1814
|
enablePromptInjectionDetection?: boolean;
|
|
1815
|
+
/** Optional. Disabled safety policies for computer use. This field is not supported in Vertex AI. */
|
|
1816
|
+
disabledSafetyPolicies?: SafetyPolicy[];
|
|
1764
1817
|
}
|
|
1765
1818
|
|
|
1766
1819
|
/**
|
|
1767
1820
|
* A tool that can be used by the model to interact with the computer.
|
|
1768
1821
|
*/
|
|
1769
1822
|
declare type ComputerUse_2 = {
|
|
1770
|
-
type: "computer_use";
|
|
1771
|
-
/**
|
|
1772
|
-
* The environment being operated.
|
|
1773
|
-
*/
|
|
1774
|
-
environment?: EnvironmentEnum | undefined;
|
|
1775
1823
|
/**
|
|
1776
|
-
*
|
|
1824
|
+
* Optional. Disabled safety policies for computer use.
|
|
1777
1825
|
*/
|
|
1778
|
-
|
|
1826
|
+
disabled_safety_policies?: Array<DisabledSafetyPolicy> | undefined;
|
|
1779
1827
|
/**
|
|
1780
1828
|
* Whether enable the prompt injection detection check on computer-use
|
|
1781
1829
|
*
|
|
@@ -1783,6 +1831,15 @@ declare type ComputerUse_2 = {
|
|
|
1783
1831
|
* request.
|
|
1784
1832
|
*/
|
|
1785
1833
|
enable_prompt_injection_detection?: boolean | undefined;
|
|
1834
|
+
/**
|
|
1835
|
+
* The environment being operated.
|
|
1836
|
+
*/
|
|
1837
|
+
environment?: EnvironmentEnum | undefined;
|
|
1838
|
+
/**
|
|
1839
|
+
* The list of predefined functions that are excluded from the model call.
|
|
1840
|
+
*/
|
|
1841
|
+
excluded_predefined_functions?: Array<string> | undefined;
|
|
1842
|
+
type: "computer_use";
|
|
1786
1843
|
};
|
|
1787
1844
|
|
|
1788
1845
|
/** Optional parameters for computing tokens. */
|
|
@@ -2031,7 +2088,7 @@ declare type CreateAgentInteraction = {
|
|
|
2031
2088
|
/**
|
|
2032
2089
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
2033
2090
|
*/
|
|
2034
|
-
response_format?: Array<
|
|
2091
|
+
response_format?: Array<ResponseFormat_2> | ResponseFormat_2 | undefined;
|
|
2035
2092
|
/**
|
|
2036
2093
|
* The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
|
|
2037
2094
|
*/
|
|
@@ -2040,6 +2097,16 @@ declare type CreateAgentInteraction = {
|
|
|
2040
2097
|
* Configuration parameters for the agent interaction.
|
|
2041
2098
|
*/
|
|
2042
2099
|
agent_config?: DynamicAgentConfig | DeepResearchAgentConfig | undefined;
|
|
2100
|
+
/**
|
|
2101
|
+
* Safety settings for the interaction.
|
|
2102
|
+
*/
|
|
2103
|
+
safety_settings?: Array<SafetySetting_2> | undefined;
|
|
2104
|
+
/**
|
|
2105
|
+
* The labels with user-defined metadata for the request.
|
|
2106
|
+
*/
|
|
2107
|
+
labels?: {
|
|
2108
|
+
[k: string]: string;
|
|
2109
|
+
} | undefined;
|
|
2043
2110
|
/**
|
|
2044
2111
|
* The input for the interaction.
|
|
2045
2112
|
*/
|
|
@@ -2073,7 +2140,7 @@ declare type CreateAgentInteractionParamsStreaming = CreateAgentInteractionParam
|
|
|
2073
2140
|
/**
|
|
2074
2141
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
2075
2142
|
*/
|
|
2076
|
-
declare type CreateAgentInteractionResponseFormat = Array<
|
|
2143
|
+
declare type CreateAgentInteractionResponseFormat = Array<ResponseFormat_2> | ResponseFormat_2;
|
|
2077
2144
|
|
|
2078
2145
|
declare type CreateAgentParams = Omit<CreateAgentRequest, "body"> & CreateAgentRequest["body"];
|
|
2079
2146
|
|
|
@@ -2417,7 +2484,7 @@ declare type CreateModelInteraction = {
|
|
|
2417
2484
|
/**
|
|
2418
2485
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
2419
2486
|
*/
|
|
2420
|
-
response_format?: Array<
|
|
2487
|
+
response_format?: Array<ResponseFormat_2> | ResponseFormat_2 | undefined;
|
|
2421
2488
|
/**
|
|
2422
2489
|
* The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
|
|
2423
2490
|
*/
|
|
@@ -2436,6 +2503,16 @@ declare type CreateModelInteraction = {
|
|
|
2436
2503
|
* `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
|
|
2437
2504
|
*/
|
|
2438
2505
|
cached_content?: string | undefined;
|
|
2506
|
+
/**
|
|
2507
|
+
* Safety settings for the interaction.
|
|
2508
|
+
*/
|
|
2509
|
+
safety_settings?: Array<SafetySetting_2> | undefined;
|
|
2510
|
+
/**
|
|
2511
|
+
* The labels with user-defined metadata for the request.
|
|
2512
|
+
*/
|
|
2513
|
+
labels?: {
|
|
2514
|
+
[k: string]: string;
|
|
2515
|
+
} | undefined;
|
|
2439
2516
|
/**
|
|
2440
2517
|
* The input for the interaction.
|
|
2441
2518
|
*/
|
|
@@ -2464,7 +2541,7 @@ declare type CreateModelInteractionParamsStreaming = CreateModelInteractionParam
|
|
|
2464
2541
|
/**
|
|
2465
2542
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
2466
2543
|
*/
|
|
2467
|
-
declare type CreateModelInteractionResponseFormat = Array<
|
|
2544
|
+
declare type CreateModelInteractionResponseFormat = Array<ResponseFormat_2> | ResponseFormat_2;
|
|
2468
2545
|
|
|
2469
2546
|
/**
|
|
2470
2547
|
* Creates a `Part` object from a `base64` encoded `string`.
|
|
@@ -2696,6 +2773,12 @@ export declare interface DatasetStats {
|
|
|
2696
2773
|
userMessagePerExampleDistribution?: DatasetDistribution;
|
|
2697
2774
|
/** Output only. Dataset distributions for the user output tokens. */
|
|
2698
2775
|
userOutputTokenDistribution?: DatasetDistribution;
|
|
2776
|
+
/** Output only. Dataset distributions for the number of contents per example. */
|
|
2777
|
+
contentsPerExampleDistribution?: DatasetDistribution;
|
|
2778
|
+
/** Output only. Sample user dataset examples in the training dataset uri for Reinforcement Tuning. */
|
|
2779
|
+
reinforcementTuningUserDatasetExamples?: ReinforcementTuningUserDatasetExamples;
|
|
2780
|
+
/** Output only. Number of billable tokens in the tuning dataset. */
|
|
2781
|
+
totalBillableTokenCount?: string;
|
|
2699
2782
|
}
|
|
2700
2783
|
|
|
2701
2784
|
declare type DeepResearchAgentConfig$ = DeepResearchAgentConfig;
|
|
@@ -2704,12 +2787,6 @@ declare type DeepResearchAgentConfig$ = DeepResearchAgentConfig;
|
|
|
2704
2787
|
* Configuration for the Deep Research agent.
|
|
2705
2788
|
*/
|
|
2706
2789
|
declare type DeepResearchAgentConfig = {
|
|
2707
|
-
type: "deep-research";
|
|
2708
|
-
thinking_summaries?: ThinkingSummaries | undefined;
|
|
2709
|
-
/**
|
|
2710
|
-
* Whether to include visualizations in the response.
|
|
2711
|
-
*/
|
|
2712
|
-
visualization?: Visualization | undefined;
|
|
2713
2790
|
/**
|
|
2714
2791
|
* Enables human-in-the-loop planning for the Deep Research agent. If set to
|
|
2715
2792
|
*
|
|
@@ -2723,6 +2800,12 @@ declare type DeepResearchAgentConfig = {
|
|
|
2723
2800
|
* Enables bigquery tool for the Deep Research agent.
|
|
2724
2801
|
*/
|
|
2725
2802
|
enable_bigquery_tool?: boolean | undefined;
|
|
2803
|
+
thinking_summaries?: ThinkingSummaries | undefined;
|
|
2804
|
+
type: "deep-research";
|
|
2805
|
+
/**
|
|
2806
|
+
* Whether to include visualizations in the response.
|
|
2807
|
+
*/
|
|
2808
|
+
visualization?: Visualization | undefined;
|
|
2726
2809
|
};
|
|
2727
2810
|
|
|
2728
2811
|
declare type DeleteAgentParams = Omit<DeleteAgentRequest, "id">;
|
|
@@ -2930,11 +3013,36 @@ declare type DeleteWebhookRequest = {
|
|
|
2930
3013
|
id: string;
|
|
2931
3014
|
};
|
|
2932
3015
|
|
|
3016
|
+
/** Delivery mode for the generated content. */
|
|
3017
|
+
export declare enum Delivery {
|
|
3018
|
+
/**
|
|
3019
|
+
* Default value. This value is unused.
|
|
3020
|
+
*/
|
|
3021
|
+
DELIVERY_UNSPECIFIED = "DELIVERY_UNSPECIFIED",
|
|
3022
|
+
/**
|
|
3023
|
+
* Generated bytes are returned inline in the response.
|
|
3024
|
+
*/
|
|
3025
|
+
INLINE = "INLINE",
|
|
3026
|
+
/**
|
|
3027
|
+
* Generated content is stored and a URI is returned.
|
|
3028
|
+
*/
|
|
3029
|
+
URI = "URI"
|
|
3030
|
+
}
|
|
3031
|
+
|
|
2933
3032
|
/**
|
|
2934
3033
|
* Turns all network off.
|
|
2935
3034
|
*/
|
|
2936
3035
|
declare type Disabled = "disabled";
|
|
2937
3036
|
|
|
3037
|
+
/**
|
|
3038
|
+
* @license
|
|
3039
|
+
* Copyright 2026 Google LLC
|
|
3040
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
3041
|
+
*
|
|
3042
|
+
* g3-prettier-ignore-file
|
|
3043
|
+
*/
|
|
3044
|
+
declare type DisabledSafetyPolicy = "financial_transactions" | "sensitive_data_modification" | "communication_tool" | "account_creation" | "data_modification" | "user_consent_management" | "legal_terms_and_agreements" | (string & {});
|
|
3045
|
+
|
|
2938
3046
|
/** Statistics for distillation prompt dataset. These statistics do not include the responses sampled from the teacher model. This data type is not supported in Gemini API. */
|
|
2939
3047
|
export declare interface DistillationDataStats {
|
|
2940
3048
|
/** Output only. Statistics computed for the training dataset. */
|
|
@@ -3034,19 +3142,19 @@ declare type DocumentContent$ = DocumentContent;
|
|
|
3034
3142
|
* A document content block.
|
|
3035
3143
|
*/
|
|
3036
3144
|
declare type DocumentContent = {
|
|
3037
|
-
type: "document";
|
|
3038
3145
|
/**
|
|
3039
3146
|
* The document content.
|
|
3040
3147
|
*/
|
|
3041
3148
|
data?: string | undefined;
|
|
3042
|
-
/**
|
|
3043
|
-
* The URI of the document.
|
|
3044
|
-
*/
|
|
3045
|
-
uri?: string | undefined;
|
|
3046
3149
|
/**
|
|
3047
3150
|
* The mime type of the document.
|
|
3048
3151
|
*/
|
|
3049
3152
|
mime_type?: DocumentContentMimeType | undefined;
|
|
3153
|
+
type: "document";
|
|
3154
|
+
/**
|
|
3155
|
+
* The URI of the document.
|
|
3156
|
+
*/
|
|
3157
|
+
uri?: string | undefined;
|
|
3050
3158
|
};
|
|
3051
3159
|
|
|
3052
3160
|
/**
|
|
@@ -3062,10 +3170,10 @@ declare type DocumentContent = {
|
|
|
3062
3170
|
declare type DocumentContentMimeType = "application/pdf" | "text/csv" | (string & {});
|
|
3063
3171
|
|
|
3064
3172
|
declare type DocumentDelta = {
|
|
3065
|
-
type: "document";
|
|
3066
3173
|
data?: string | undefined;
|
|
3067
|
-
uri?: string | undefined;
|
|
3068
3174
|
mime_type?: DocumentDeltaMimeType | undefined;
|
|
3175
|
+
type: "document";
|
|
3176
|
+
uri?: string | undefined;
|
|
3069
3177
|
};
|
|
3070
3178
|
|
|
3071
3179
|
/**
|
|
@@ -3523,21 +3631,21 @@ export declare enum Environment {
|
|
|
3523
3631
|
* Configuration for a custom environment.
|
|
3524
3632
|
*/
|
|
3525
3633
|
declare type Environment_2 = {
|
|
3526
|
-
|
|
3527
|
-
|
|
3634
|
+
/**
|
|
3635
|
+
* Optional. The environment ID for the interaction. If specified, the request will
|
|
3636
|
+
*
|
|
3637
|
+
* @remarks
|
|
3638
|
+
* update the existing environment instead of creating a new one.
|
|
3639
|
+
*/
|
|
3640
|
+
environment_id?: string | undefined;
|
|
3528
3641
|
/**
|
|
3529
3642
|
* Network configuration for the environment.
|
|
3530
3643
|
*/
|
|
3531
3644
|
network?: EnvironmentNetworkEgressAllowlist | NetworkEnum | undefined;
|
|
3645
|
+
sources?: Array<Source> | undefined;
|
|
3646
|
+
type: "remote";
|
|
3532
3647
|
};
|
|
3533
3648
|
|
|
3534
|
-
/**
|
|
3535
|
-
* @license
|
|
3536
|
-
* Copyright 2026 Google LLC
|
|
3537
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
3538
|
-
*
|
|
3539
|
-
* g3-prettier-ignore-file
|
|
3540
|
-
*/
|
|
3541
3649
|
/**
|
|
3542
3650
|
* The environment being operated.
|
|
3543
3651
|
*/
|
|
@@ -3550,10 +3658,11 @@ declare type EnvironmentNetworkEgressAllowlist = Allowlist | Disabled;
|
|
|
3550
3658
|
|
|
3551
3659
|
declare type Error$ = ErrorT;
|
|
3552
3660
|
|
|
3661
|
+
declare type Error$2 = Status;
|
|
3662
|
+
|
|
3553
3663
|
declare type ErrorEvent$ = ErrorEvent_2;
|
|
3554
3664
|
|
|
3555
3665
|
declare type ErrorEvent_2 = {
|
|
3556
|
-
event_type: "error";
|
|
3557
3666
|
/**
|
|
3558
3667
|
* Error message from an interaction.
|
|
3559
3668
|
*/
|
|
@@ -3565,6 +3674,7 @@ declare type ErrorEvent_2 = {
|
|
|
3565
3674
|
* this event.
|
|
3566
3675
|
*/
|
|
3567
3676
|
event_id?: string | undefined;
|
|
3677
|
+
event_type: "error";
|
|
3568
3678
|
metadata?: StreamMetadata | undefined;
|
|
3569
3679
|
};
|
|
3570
3680
|
|
|
@@ -3763,33 +3873,36 @@ declare type FileCitation$ = FileCitation;
|
|
|
3763
3873
|
* A file citation annotation.
|
|
3764
3874
|
*/
|
|
3765
3875
|
declare type FileCitation = {
|
|
3766
|
-
|
|
3876
|
+
/**
|
|
3877
|
+
* User provided metadata about the retrieved context.
|
|
3878
|
+
*/
|
|
3879
|
+
custom_metadata?: {
|
|
3880
|
+
[k: string]: any;
|
|
3881
|
+
} | undefined;
|
|
3767
3882
|
/**
|
|
3768
3883
|
* The URI of the file.
|
|
3769
3884
|
*/
|
|
3770
3885
|
document_uri?: string | undefined;
|
|
3771
3886
|
/**
|
|
3772
|
-
*
|
|
3887
|
+
* End of the attributed segment, exclusive.
|
|
3773
3888
|
*/
|
|
3774
|
-
|
|
3889
|
+
end_index?: number | undefined;
|
|
3775
3890
|
/**
|
|
3776
|
-
*
|
|
3891
|
+
* The name of the file.
|
|
3777
3892
|
*/
|
|
3778
|
-
|
|
3893
|
+
file_name?: string | undefined;
|
|
3779
3894
|
/**
|
|
3780
|
-
*
|
|
3895
|
+
* Media ID in-case of image citations, if applicable.
|
|
3781
3896
|
*/
|
|
3782
|
-
|
|
3783
|
-
[k: string]: any;
|
|
3784
|
-
} | undefined;
|
|
3897
|
+
media_id?: string | undefined;
|
|
3785
3898
|
/**
|
|
3786
3899
|
* Page number of the cited document, if applicable.
|
|
3787
3900
|
*/
|
|
3788
3901
|
page_number?: number | undefined;
|
|
3789
3902
|
/**
|
|
3790
|
-
*
|
|
3903
|
+
* Source attributed for a portion of the text.
|
|
3791
3904
|
*/
|
|
3792
|
-
|
|
3905
|
+
source?: string | undefined;
|
|
3793
3906
|
/**
|
|
3794
3907
|
* Start of segment of the response that is attributed to this source.
|
|
3795
3908
|
*
|
|
@@ -3798,10 +3911,7 @@ declare type FileCitation = {
|
|
|
3798
3911
|
* Index indicates the start of the segment, measured in bytes.
|
|
3799
3912
|
*/
|
|
3800
3913
|
start_index?: number | undefined;
|
|
3801
|
-
|
|
3802
|
-
* End of the attributed segment, exclusive.
|
|
3803
|
-
*/
|
|
3804
|
-
end_index?: number | undefined;
|
|
3914
|
+
type: "file_citation";
|
|
3805
3915
|
};
|
|
3806
3916
|
|
|
3807
3917
|
/** URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. */
|
|
@@ -3845,7 +3955,7 @@ export declare class Files extends BaseModule {
|
|
|
3845
3955
|
* file extension.
|
|
3846
3956
|
* - For Blob object inputs, the `mimeType` will be set to the Blob's `type`
|
|
3847
3957
|
* property.
|
|
3848
|
-
*
|
|
3958
|
+
* Some examples for file extension to mimeType mapping:
|
|
3849
3959
|
* .txt -> text/plain
|
|
3850
3960
|
* .json -> application/json
|
|
3851
3961
|
* .jpg -> image/jpeg
|
|
@@ -3957,19 +4067,19 @@ export declare interface FileSearch {
|
|
|
3957
4067
|
* A tool that can be used by the model to search files.
|
|
3958
4068
|
*/
|
|
3959
4069
|
declare type FileSearch_2 = {
|
|
3960
|
-
type: "file_search";
|
|
3961
4070
|
/**
|
|
3962
4071
|
* The file search store names to search.
|
|
3963
4072
|
*/
|
|
3964
4073
|
file_search_store_names?: Array<string> | undefined;
|
|
3965
|
-
/**
|
|
3966
|
-
* The number of semantic retrieval chunks to retrieve.
|
|
3967
|
-
*/
|
|
3968
|
-
top_k?: number | undefined;
|
|
3969
4074
|
/**
|
|
3970
4075
|
* Metadata filter to apply to the semantic retrieval documents and chunks.
|
|
3971
4076
|
*/
|
|
3972
4077
|
metadata_filter?: string | undefined;
|
|
4078
|
+
/**
|
|
4079
|
+
* The number of semantic retrieval chunks to retrieve.
|
|
4080
|
+
*/
|
|
4081
|
+
top_k?: number | undefined;
|
|
4082
|
+
type: "file_search";
|
|
3973
4083
|
};
|
|
3974
4084
|
|
|
3975
4085
|
declare type FileSearchCall$ = FileSearchCallDelta;
|
|
@@ -3982,11 +4092,11 @@ declare type FileSearchCall$ = FileSearchCallDelta;
|
|
|
3982
4092
|
* g3-prettier-ignore-file
|
|
3983
4093
|
*/
|
|
3984
4094
|
declare type FileSearchCallDelta = {
|
|
3985
|
-
type: "file_search_call";
|
|
3986
4095
|
/**
|
|
3987
4096
|
* A signature hash for backend validation.
|
|
3988
4097
|
*/
|
|
3989
4098
|
signature?: string | undefined;
|
|
4099
|
+
type: "file_search_call";
|
|
3990
4100
|
};
|
|
3991
4101
|
|
|
3992
4102
|
declare type FileSearchCallStep$ = FileSearchCallStep;
|
|
@@ -4002,7 +4112,6 @@ declare type FileSearchCallStep$ = FileSearchCallStep;
|
|
|
4002
4112
|
* File Search call step.
|
|
4003
4113
|
*/
|
|
4004
4114
|
declare type FileSearchCallStep = {
|
|
4005
|
-
type: "file_search_call";
|
|
4006
4115
|
/**
|
|
4007
4116
|
* Required. A unique ID for this specific tool call.
|
|
4008
4117
|
*/
|
|
@@ -4011,6 +4120,7 @@ declare type FileSearchCallStep = {
|
|
|
4011
4120
|
* A signature hash for backend validation.
|
|
4012
4121
|
*/
|
|
4013
4122
|
signature?: string | undefined;
|
|
4123
|
+
type: "file_search_call";
|
|
4014
4124
|
};
|
|
4015
4125
|
|
|
4016
4126
|
declare type FileSearchResult$ = FileSearchResultDelta;
|
|
@@ -4028,12 +4138,12 @@ declare type FileSearchResult$ = FileSearchResultDelta;
|
|
|
4028
4138
|
declare type FileSearchResult = {};
|
|
4029
4139
|
|
|
4030
4140
|
declare type FileSearchResultDelta = {
|
|
4031
|
-
type: "file_search_result";
|
|
4032
4141
|
result: Array<FileSearchResult>;
|
|
4033
4142
|
/**
|
|
4034
4143
|
* A signature hash for backend validation.
|
|
4035
4144
|
*/
|
|
4036
4145
|
signature?: string | undefined;
|
|
4146
|
+
type: "file_search_result";
|
|
4037
4147
|
};
|
|
4038
4148
|
|
|
4039
4149
|
declare type FileSearchResultStep$ = FileSearchResultStep;
|
|
@@ -4049,7 +4159,6 @@ declare type FileSearchResultStep$ = FileSearchResultStep;
|
|
|
4049
4159
|
* File Search result step.
|
|
4050
4160
|
*/
|
|
4051
4161
|
declare type FileSearchResultStep = {
|
|
4052
|
-
type: "file_search_result";
|
|
4053
4162
|
/**
|
|
4054
4163
|
* Required. ID to match the ID from the function call block.
|
|
4055
4164
|
*/
|
|
@@ -4058,6 +4167,7 @@ declare type FileSearchResultStep = {
|
|
|
4058
4167
|
* A signature hash for backend validation.
|
|
4059
4168
|
*/
|
|
4060
4169
|
signature?: string | undefined;
|
|
4170
|
+
type: "file_search_result";
|
|
4061
4171
|
};
|
|
4062
4172
|
|
|
4063
4173
|
/** A collection of Documents. */
|
|
@@ -4234,6 +4344,10 @@ export declare interface FileStatus {
|
|
|
4234
4344
|
* Config for filters.
|
|
4235
4345
|
*/
|
|
4236
4346
|
declare type Filter = {
|
|
4347
|
+
/**
|
|
4348
|
+
* Optional. String for metadata filtering.
|
|
4349
|
+
*/
|
|
4350
|
+
metadata_filter?: string | undefined;
|
|
4237
4351
|
/**
|
|
4238
4352
|
* Optional. Only returns contexts with vector distance smaller than the
|
|
4239
4353
|
*
|
|
@@ -4248,10 +4362,6 @@ declare type Filter = {
|
|
|
4248
4362
|
* threshold.
|
|
4249
4363
|
*/
|
|
4250
4364
|
vector_similarity_threshold?: number | undefined;
|
|
4251
|
-
/**
|
|
4252
|
-
* Optional. String for metadata filtering.
|
|
4253
|
-
*/
|
|
4254
|
-
metadata_filter?: string | undefined;
|
|
4255
4365
|
};
|
|
4256
4366
|
|
|
4257
4367
|
/** Output only. The reason why the model stopped generating tokens.
|
|
@@ -4401,11 +4511,6 @@ declare type FunctionCallStep$ = FunctionCallStep;
|
|
|
4401
4511
|
* A function tool call step.
|
|
4402
4512
|
*/
|
|
4403
4513
|
declare type FunctionCallStep = {
|
|
4404
|
-
type: "function_call";
|
|
4405
|
-
/**
|
|
4406
|
-
* Required. The name of the tool to call.
|
|
4407
|
-
*/
|
|
4408
|
-
name: string;
|
|
4409
4514
|
/**
|
|
4410
4515
|
* Required. The arguments to pass to the function.
|
|
4411
4516
|
*/
|
|
@@ -4416,6 +4521,11 @@ declare type FunctionCallStep = {
|
|
|
4416
4521
|
* Required. A unique ID for this specific tool call.
|
|
4417
4522
|
*/
|
|
4418
4523
|
id: string;
|
|
4524
|
+
/**
|
|
4525
|
+
* Required. The name of the tool to call.
|
|
4526
|
+
*/
|
|
4527
|
+
name: string;
|
|
4528
|
+
type: "function_call";
|
|
4419
4529
|
};
|
|
4420
4530
|
|
|
4421
4531
|
/** Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. */
|
|
@@ -4432,7 +4542,7 @@ export declare interface FunctionDeclaration {
|
|
|
4432
4542
|
response?: Schema;
|
|
4433
4543
|
/** Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`. */
|
|
4434
4544
|
responseJsonSchema?: unknown;
|
|
4435
|
-
/** Optional. Specifies the function Behavior.
|
|
4545
|
+
/** Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
|
|
4436
4546
|
behavior?: Behavior;
|
|
4437
4547
|
}
|
|
4438
4548
|
|
|
@@ -4504,14 +4614,14 @@ export declare enum FunctionResponseScheduling {
|
|
|
4504
4614
|
declare type FunctionResult$ = FunctionResultDelta;
|
|
4505
4615
|
|
|
4506
4616
|
declare type FunctionResultDelta = {
|
|
4507
|
-
type: "function_result";
|
|
4508
|
-
name?: string | undefined;
|
|
4509
|
-
is_error?: boolean | undefined;
|
|
4510
4617
|
/**
|
|
4511
4618
|
* Required. ID to match the ID from the function call block.
|
|
4512
4619
|
*/
|
|
4513
4620
|
call_id: string;
|
|
4621
|
+
is_error?: boolean | undefined;
|
|
4622
|
+
name?: string | undefined;
|
|
4514
4623
|
result: FunctionResultDeltaResult | Array<FunctionResultSubcontent> | string;
|
|
4624
|
+
type: "function_result";
|
|
4515
4625
|
};
|
|
4516
4626
|
|
|
4517
4627
|
declare type FunctionResultDeltaResult = {};
|
|
@@ -4524,23 +4634,23 @@ declare type FunctionResultStep$ = FunctionResultStep;
|
|
|
4524
4634
|
* Result of a function tool call.
|
|
4525
4635
|
*/
|
|
4526
4636
|
declare type FunctionResultStep = {
|
|
4527
|
-
type: "function_result";
|
|
4528
4637
|
/**
|
|
4529
|
-
*
|
|
4638
|
+
* Required. ID to match the ID from the function call block.
|
|
4530
4639
|
*/
|
|
4531
|
-
|
|
4640
|
+
call_id: string;
|
|
4532
4641
|
/**
|
|
4533
4642
|
* Whether the tool call resulted in an error.
|
|
4534
4643
|
*/
|
|
4535
4644
|
is_error?: boolean | undefined;
|
|
4536
4645
|
/**
|
|
4537
|
-
*
|
|
4646
|
+
* The name of the tool that was called.
|
|
4538
4647
|
*/
|
|
4539
|
-
|
|
4648
|
+
name?: string | undefined;
|
|
4540
4649
|
/**
|
|
4541
4650
|
* The result of the tool call.
|
|
4542
4651
|
*/
|
|
4543
4652
|
result: FunctionResultStepResult | Array<FunctionResultSubcontent> | string;
|
|
4653
|
+
type: "function_result";
|
|
4544
4654
|
};
|
|
4545
4655
|
|
|
4546
4656
|
declare type FunctionResultStepResult = {};
|
|
@@ -4563,19 +4673,19 @@ declare type FunctionResultSubcontent = TextContent | ImageContent;
|
|
|
4563
4673
|
* A tool that can be used by the model.
|
|
4564
4674
|
*/
|
|
4565
4675
|
declare type FunctionT = {
|
|
4566
|
-
type: "function";
|
|
4567
|
-
/**
|
|
4568
|
-
* The name of the function.
|
|
4569
|
-
*/
|
|
4570
|
-
name?: string | undefined;
|
|
4571
4676
|
/**
|
|
4572
4677
|
* A description of the function.
|
|
4573
4678
|
*/
|
|
4574
4679
|
description?: string | undefined;
|
|
4680
|
+
/**
|
|
4681
|
+
* The name of the function.
|
|
4682
|
+
*/
|
|
4683
|
+
name?: string | undefined;
|
|
4575
4684
|
/**
|
|
4576
4685
|
* The JSON Schema for the function's parameters.
|
|
4577
4686
|
*/
|
|
4578
4687
|
parameters?: any | undefined;
|
|
4688
|
+
type: "function";
|
|
4579
4689
|
};
|
|
4580
4690
|
|
|
4581
4691
|
/** The Google Cloud Storage location for the input content. This data type is not supported in Gemini API. */
|
|
@@ -5282,11 +5392,11 @@ export declare interface GenerationConfig {
|
|
|
5282
5392
|
presencePenalty?: number;
|
|
5283
5393
|
/** Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model's confidence in its own output and for debugging. */
|
|
5284
5394
|
responseLogprobs?: boolean;
|
|
5285
|
-
/** Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include 'text/plain' (default) and 'application/json'. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. */
|
|
5395
|
+
/** Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include 'text/plain' (default) and 'application/json'. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead. */
|
|
5286
5396
|
responseMimeType?: string;
|
|
5287
5397
|
/** Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image. */
|
|
5288
5398
|
responseModalities?: Modality[];
|
|
5289
|
-
/** Optional. Lets you to specify a schema for the model's response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. */
|
|
5399
|
+
/** Optional. Lets you to specify a schema for the model's response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead. */
|
|
5290
5400
|
responseSchema?: Schema;
|
|
5291
5401
|
/** Optional. Routing configuration. This field is not supported in Gemini API. */
|
|
5292
5402
|
routingConfig?: GenerationConfigRoutingConfig;
|
|
@@ -5306,6 +5416,10 @@ export declare interface GenerationConfig {
|
|
|
5306
5416
|
topP?: number;
|
|
5307
5417
|
/** Optional. Enables enhanced civic answers. It may not be available for all models. This field is not supported in Vertex AI. */
|
|
5308
5418
|
enableEnhancedCivicAnswers?: boolean;
|
|
5419
|
+
/** Optional. New response format field for the model to configure output formatting and delivery. */
|
|
5420
|
+
responseFormat?: ResponseFormat[];
|
|
5421
|
+
/** Optional. Config for translation. This field is not supported in Vertex AI. */
|
|
5422
|
+
translationConfig?: TranslationConfig;
|
|
5309
5423
|
}
|
|
5310
5424
|
|
|
5311
5425
|
/**
|
|
@@ -5313,57 +5427,45 @@ export declare interface GenerationConfig {
|
|
|
5313
5427
|
*/
|
|
5314
5428
|
declare type GenerationConfig_2 = {
|
|
5315
5429
|
/**
|
|
5316
|
-
*
|
|
5430
|
+
* The configuration for image interaction.
|
|
5431
|
+
*
|
|
5432
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
5317
5433
|
*/
|
|
5318
|
-
|
|
5434
|
+
image_config?: ImageConfig_2 | undefined;
|
|
5319
5435
|
/**
|
|
5320
|
-
* The maximum
|
|
5436
|
+
* The maximum number of tokens to include in the response.
|
|
5321
5437
|
*/
|
|
5322
|
-
|
|
5438
|
+
max_output_tokens?: number | undefined;
|
|
5323
5439
|
/**
|
|
5324
5440
|
* Seed used in decoding for reproducibility.
|
|
5325
5441
|
*/
|
|
5326
5442
|
seed?: number | undefined;
|
|
5327
|
-
/**
|
|
5328
|
-
* A list of character sequences that will stop output interaction.
|
|
5329
|
-
*/
|
|
5330
|
-
stop_sequences?: Array<string> | undefined;
|
|
5331
|
-
thinking_level?: ThinkingLevel_2 | undefined;
|
|
5332
|
-
thinking_summaries?: ThinkingSummaries | undefined;
|
|
5333
|
-
/**
|
|
5334
|
-
* The maximum number of tokens to include in the response.
|
|
5335
|
-
*/
|
|
5336
|
-
max_output_tokens?: number | undefined;
|
|
5337
5443
|
/**
|
|
5338
5444
|
* Configuration for speech interaction.
|
|
5339
5445
|
*/
|
|
5340
5446
|
speech_config?: Array<SpeechConfig_2> | undefined;
|
|
5341
5447
|
/**
|
|
5342
|
-
*
|
|
5343
|
-
*
|
|
5344
|
-
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
5345
|
-
*/
|
|
5346
|
-
image_config?: ImageConfig_2 | undefined;
|
|
5347
|
-
/**
|
|
5348
|
-
* Penalizes tokens that have already appeared in the generated
|
|
5349
|
-
*
|
|
5350
|
-
* @remarks
|
|
5351
|
-
* text. A positive value encourages the model to generate more diverse and
|
|
5352
|
-
* less repetitive text. Valid values can range from [-2.0, 2.0].
|
|
5448
|
+
* A list of character sequences that will stop output interaction.
|
|
5353
5449
|
*/
|
|
5354
|
-
|
|
5450
|
+
stop_sequences?: Array<string> | undefined;
|
|
5355
5451
|
/**
|
|
5356
|
-
*
|
|
5357
|
-
*
|
|
5358
|
-
* @remarks
|
|
5359
|
-
* A positive value helps to reduce the repetition of words and phrases.
|
|
5360
|
-
* Valid values can range from [-2.0, 2.0].
|
|
5452
|
+
* Controls the randomness of the output.
|
|
5361
5453
|
*/
|
|
5362
|
-
|
|
5454
|
+
temperature?: number | undefined;
|
|
5455
|
+
thinking_level?: ThinkingLevel_2 | undefined;
|
|
5456
|
+
thinking_summaries?: ThinkingSummaries | undefined;
|
|
5363
5457
|
/**
|
|
5364
5458
|
* The tool choice configuration.
|
|
5365
5459
|
*/
|
|
5366
5460
|
tool_choice?: ToolChoiceType | ToolChoiceConfig | undefined;
|
|
5461
|
+
/**
|
|
5462
|
+
* The maximum cumulative probability of tokens to consider when sampling.
|
|
5463
|
+
*/
|
|
5464
|
+
top_p?: number | undefined;
|
|
5465
|
+
/**
|
|
5466
|
+
* Configuration options for video generation.
|
|
5467
|
+
*/
|
|
5468
|
+
video_config?: VideoConfig | undefined;
|
|
5367
5469
|
};
|
|
5368
5470
|
|
|
5369
5471
|
/** The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. This data type is not supported in Gemini API. */
|
|
@@ -5814,7 +5916,6 @@ export declare interface GoogleMaps {
|
|
|
5814
5916
|
* A tool that can be used by the model to call Google Maps.
|
|
5815
5917
|
*/
|
|
5816
5918
|
declare type GoogleMaps_2 = {
|
|
5817
|
-
type: "google_maps";
|
|
5818
5919
|
/**
|
|
5819
5920
|
* Whether to return a widget context token in the tool call result of the
|
|
5820
5921
|
*
|
|
@@ -5830,6 +5931,7 @@ declare type GoogleMaps_2 = {
|
|
|
5830
5931
|
* The longitude of the user's location.
|
|
5831
5932
|
*/
|
|
5832
5933
|
longitude?: number | undefined;
|
|
5934
|
+
type: "google_maps";
|
|
5833
5935
|
};
|
|
5834
5936
|
|
|
5835
5937
|
declare type GoogleMapsCall$ = GoogleMapsCallDelta;
|
|
@@ -5854,7 +5956,6 @@ declare type GoogleMapsCallArguments = {
|
|
|
5854
5956
|
};
|
|
5855
5957
|
|
|
5856
5958
|
declare type GoogleMapsCallDelta = {
|
|
5857
|
-
type: "google_maps_call";
|
|
5858
5959
|
/**
|
|
5859
5960
|
* The arguments to pass to the Google Maps tool.
|
|
5860
5961
|
*/
|
|
@@ -5863,6 +5964,7 @@ declare type GoogleMapsCallDelta = {
|
|
|
5863
5964
|
* A signature hash for backend validation.
|
|
5864
5965
|
*/
|
|
5865
5966
|
signature?: string | undefined;
|
|
5967
|
+
type: "google_maps_call";
|
|
5866
5968
|
};
|
|
5867
5969
|
|
|
5868
5970
|
declare type GoogleMapsCallStep$ = GoogleMapsCallStep;
|
|
@@ -5871,7 +5973,6 @@ declare type GoogleMapsCallStep$ = GoogleMapsCallStep;
|
|
|
5871
5973
|
* Google Maps call step.
|
|
5872
5974
|
*/
|
|
5873
5975
|
declare type GoogleMapsCallStep = {
|
|
5874
|
-
type: "google_maps_call";
|
|
5875
5976
|
/**
|
|
5876
5977
|
* The arguments to pass to the Google Maps tool.
|
|
5877
5978
|
*/
|
|
@@ -5884,6 +5985,7 @@ declare type GoogleMapsCallStep = {
|
|
|
5884
5985
|
* A signature hash for backend validation.
|
|
5885
5986
|
*/
|
|
5886
5987
|
signature?: string | undefined;
|
|
5988
|
+
type: "google_maps_call";
|
|
5887
5989
|
};
|
|
5888
5990
|
|
|
5889
5991
|
declare type GoogleMapsResult$ = GoogleMapsResult;
|
|
@@ -5899,7 +6001,6 @@ declare type GoogleMapsResult = {
|
|
|
5899
6001
|
};
|
|
5900
6002
|
|
|
5901
6003
|
declare type GoogleMapsResultDelta = {
|
|
5902
|
-
type: "google_maps_result";
|
|
5903
6004
|
/**
|
|
5904
6005
|
* The results of the Google Maps.
|
|
5905
6006
|
*/
|
|
@@ -5908,13 +6009,14 @@ declare type GoogleMapsResultDelta = {
|
|
|
5908
6009
|
* A signature hash for backend validation.
|
|
5909
6010
|
*/
|
|
5910
6011
|
signature?: string | undefined;
|
|
6012
|
+
type: "google_maps_result";
|
|
5911
6013
|
};
|
|
5912
6014
|
|
|
5913
6015
|
declare type GoogleMapsResultPlaces = {
|
|
5914
|
-
place_id?: string | undefined;
|
|
5915
6016
|
name?: string | undefined;
|
|
5916
|
-
|
|
6017
|
+
place_id?: string | undefined;
|
|
5917
6018
|
review_snippets?: Array<ReviewSnippet> | undefined;
|
|
6019
|
+
url?: string | undefined;
|
|
5918
6020
|
};
|
|
5919
6021
|
|
|
5920
6022
|
declare type GoogleMapsResultStep$ = GoogleMapsResultStep;
|
|
@@ -5923,16 +6025,16 @@ declare type GoogleMapsResultStep$ = GoogleMapsResultStep;
|
|
|
5923
6025
|
* Google Maps result step.
|
|
5924
6026
|
*/
|
|
5925
6027
|
declare type GoogleMapsResultStep = {
|
|
5926
|
-
type: "google_maps_result";
|
|
5927
|
-
result: Array<GoogleMapsResult>;
|
|
5928
6028
|
/**
|
|
5929
6029
|
* Required. ID to match the ID from the function call block.
|
|
5930
6030
|
*/
|
|
5931
6031
|
call_id: string;
|
|
6032
|
+
result: Array<GoogleMapsResult>;
|
|
5932
6033
|
/**
|
|
5933
6034
|
* A signature hash for backend validation.
|
|
5934
6035
|
*/
|
|
5935
6036
|
signature?: string | undefined;
|
|
6037
|
+
type: "google_maps_result";
|
|
5936
6038
|
};
|
|
5937
6039
|
|
|
5938
6040
|
/** The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). This data type is not supported in Gemini API. */
|
|
@@ -5963,11 +6065,11 @@ export declare interface GoogleSearch {
|
|
|
5963
6065
|
* A tool that can be used by the model to search Google.
|
|
5964
6066
|
*/
|
|
5965
6067
|
declare type GoogleSearch_2 = {
|
|
5966
|
-
type: "google_search";
|
|
5967
6068
|
/**
|
|
5968
6069
|
* The types of search grounding to enable.
|
|
5969
6070
|
*/
|
|
5970
6071
|
search_types?: Array<GoogleSearchSearchType> | undefined;
|
|
6072
|
+
type: "google_search";
|
|
5971
6073
|
};
|
|
5972
6074
|
|
|
5973
6075
|
declare type GoogleSearchCall$ = GoogleSearchCallDelta;
|
|
@@ -5992,7 +6094,6 @@ declare type GoogleSearchCallArguments = {
|
|
|
5992
6094
|
};
|
|
5993
6095
|
|
|
5994
6096
|
declare type GoogleSearchCallDelta = {
|
|
5995
|
-
type: "google_search_call";
|
|
5996
6097
|
/**
|
|
5997
6098
|
* The arguments to pass to Google Search.
|
|
5998
6099
|
*/
|
|
@@ -6001,6 +6102,7 @@ declare type GoogleSearchCallDelta = {
|
|
|
6001
6102
|
* A signature hash for backend validation.
|
|
6002
6103
|
*/
|
|
6003
6104
|
signature?: string | undefined;
|
|
6105
|
+
type: "google_search_call";
|
|
6004
6106
|
};
|
|
6005
6107
|
|
|
6006
6108
|
declare type GoogleSearchCallStep$ = GoogleSearchCallStep;
|
|
@@ -6009,23 +6111,23 @@ declare type GoogleSearchCallStep$ = GoogleSearchCallStep;
|
|
|
6009
6111
|
* Google Search call step.
|
|
6010
6112
|
*/
|
|
6011
6113
|
declare type GoogleSearchCallStep = {
|
|
6012
|
-
type: "google_search_call";
|
|
6013
6114
|
/**
|
|
6014
6115
|
* The arguments to pass to Google Search.
|
|
6015
6116
|
*/
|
|
6016
6117
|
arguments: GoogleSearchCallArguments;
|
|
6017
|
-
/**
|
|
6018
|
-
* The type of search grounding enabled.
|
|
6019
|
-
*/
|
|
6020
|
-
search_type?: GoogleSearchCallStepSearchType | undefined;
|
|
6021
6118
|
/**
|
|
6022
6119
|
* Required. A unique ID for this specific tool call.
|
|
6023
6120
|
*/
|
|
6024
6121
|
id: string;
|
|
6122
|
+
/**
|
|
6123
|
+
* The type of search grounding enabled.
|
|
6124
|
+
*/
|
|
6125
|
+
search_type?: GoogleSearchCallStepSearchType | undefined;
|
|
6025
6126
|
/**
|
|
6026
6127
|
* A signature hash for backend validation.
|
|
6027
6128
|
*/
|
|
6028
6129
|
signature?: string | undefined;
|
|
6130
|
+
type: "google_search_call";
|
|
6029
6131
|
};
|
|
6030
6132
|
|
|
6031
6133
|
/**
|
|
@@ -6055,13 +6157,13 @@ declare type GoogleSearchResult = {
|
|
|
6055
6157
|
};
|
|
6056
6158
|
|
|
6057
6159
|
declare type GoogleSearchResultDelta = {
|
|
6058
|
-
type: "google_search_result";
|
|
6059
|
-
result: Array<GoogleSearchResult>;
|
|
6060
6160
|
is_error?: boolean | undefined;
|
|
6161
|
+
result: Array<GoogleSearchResult>;
|
|
6061
6162
|
/**
|
|
6062
6163
|
* A signature hash for backend validation.
|
|
6063
6164
|
*/
|
|
6064
6165
|
signature?: string | undefined;
|
|
6166
|
+
type: "google_search_result";
|
|
6065
6167
|
};
|
|
6066
6168
|
|
|
6067
6169
|
declare type GoogleSearchResultStep$ = GoogleSearchResultStep;
|
|
@@ -6070,23 +6172,23 @@ declare type GoogleSearchResultStep$ = GoogleSearchResultStep;
|
|
|
6070
6172
|
* Google Search result step.
|
|
6071
6173
|
*/
|
|
6072
6174
|
declare type GoogleSearchResultStep = {
|
|
6073
|
-
type: "google_search_result";
|
|
6074
6175
|
/**
|
|
6075
|
-
* Required.
|
|
6176
|
+
* Required. ID to match the ID from the function call block.
|
|
6076
6177
|
*/
|
|
6077
|
-
|
|
6178
|
+
call_id: string;
|
|
6078
6179
|
/**
|
|
6079
6180
|
* Whether the Google Search resulted in an error.
|
|
6080
6181
|
*/
|
|
6081
6182
|
is_error?: boolean | undefined;
|
|
6082
6183
|
/**
|
|
6083
|
-
* Required.
|
|
6184
|
+
* Required. The results of the Google Search.
|
|
6084
6185
|
*/
|
|
6085
|
-
|
|
6186
|
+
result: Array<GoogleSearchResult>;
|
|
6086
6187
|
/**
|
|
6087
6188
|
* A signature hash for backend validation.
|
|
6088
6189
|
*/
|
|
6089
6190
|
signature?: string | undefined;
|
|
6191
|
+
type: "google_search_result";
|
|
6090
6192
|
};
|
|
6091
6193
|
|
|
6092
6194
|
/** Tool to retrieve public web data for grounding, powered by Google. */
|
|
@@ -6289,7 +6391,7 @@ export declare interface GroundingMetadata {
|
|
|
6289
6391
|
searchEntryPoint?: SearchEntryPoint;
|
|
6290
6392
|
/** Web search queries for the following-up web search. */
|
|
6291
6393
|
webSearchQueries?: string[];
|
|
6292
|
-
/** Optional. Output only. A token that can be used to render a Google Maps widget with the contextual data. This field is populated only when the grounding source is Google Maps. */
|
|
6394
|
+
/** Optional. Output only. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and will no longer be populated once removed. A token that can be used to render a Google Maps widget with the contextual data. This field is populated only when the grounding source is Google Maps. */
|
|
6293
6395
|
googleMapsWidgetContextToken?: string;
|
|
6294
6396
|
/** Optional. The queries that were executed by the retrieval tools. This field is populated only when the grounding source is a retrieval tool, such as Vertex AI Search. This field is not supported in Gemini API. */
|
|
6295
6397
|
retrievalQueries?: string[];
|
|
@@ -6329,14 +6431,14 @@ declare type GroundingToolCount$ = GroundingToolCount;
|
|
|
6329
6431
|
* The number of grounding tool counts.
|
|
6330
6432
|
*/
|
|
6331
6433
|
declare type GroundingToolCount = {
|
|
6332
|
-
/**
|
|
6333
|
-
* The grounding tool type associated with the count.
|
|
6334
|
-
*/
|
|
6335
|
-
type?: GroundingToolCountType | undefined;
|
|
6336
6434
|
/**
|
|
6337
6435
|
* The number of grounding tool counts.
|
|
6338
6436
|
*/
|
|
6339
6437
|
count?: number | undefined;
|
|
6438
|
+
/**
|
|
6439
|
+
* The grounding tool type associated with the count.
|
|
6440
|
+
*/
|
|
6441
|
+
type?: GroundingToolCountType | undefined;
|
|
6340
6442
|
};
|
|
6341
6443
|
|
|
6342
6444
|
/**
|
|
@@ -6395,6 +6497,8 @@ export declare enum HarmBlockThreshold {
|
|
|
6395
6497
|
OFF = "OFF"
|
|
6396
6498
|
}
|
|
6397
6499
|
|
|
6500
|
+
declare type HarmCategory$ = HarmCategory_2;
|
|
6501
|
+
|
|
6398
6502
|
/** The harm category to be blocked. */
|
|
6399
6503
|
export declare enum HarmCategory {
|
|
6400
6504
|
/**
|
|
@@ -6443,6 +6547,15 @@ export declare enum HarmCategory {
|
|
|
6443
6547
|
HARM_CATEGORY_JAILBREAK = "HARM_CATEGORY_JAILBREAK"
|
|
6444
6548
|
}
|
|
6445
6549
|
|
|
6550
|
+
/**
|
|
6551
|
+
* @license
|
|
6552
|
+
* Copyright 2026 Google LLC
|
|
6553
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6554
|
+
*
|
|
6555
|
+
* g3-prettier-ignore-file
|
|
6556
|
+
*/
|
|
6557
|
+
declare type HarmCategory_2 = "hate_speech" | "dangerous_content" | "harassment" | "sexually_explicit" | "civic_integrity" | "image_hate" | "image_dangerous_content" | "image_harassment" | "image_sexually_explicit" | "jailbreak" | (string & {});
|
|
6558
|
+
|
|
6446
6559
|
/** Output only. The probability of harm for this category. */
|
|
6447
6560
|
export declare enum HarmProbability {
|
|
6448
6561
|
/**
|
|
@@ -6702,20 +6815,20 @@ declare type ImageContent$ = ImageContent;
|
|
|
6702
6815
|
* An image content block.
|
|
6703
6816
|
*/
|
|
6704
6817
|
declare type ImageContent = {
|
|
6705
|
-
type: "image";
|
|
6706
6818
|
/**
|
|
6707
6819
|
* The image content.
|
|
6708
6820
|
*/
|
|
6709
6821
|
data?: string | undefined;
|
|
6710
|
-
/**
|
|
6711
|
-
* The URI of the image.
|
|
6712
|
-
*/
|
|
6713
|
-
uri?: string | undefined;
|
|
6714
6822
|
/**
|
|
6715
6823
|
* The mime type of the image.
|
|
6716
6824
|
*/
|
|
6717
6825
|
mime_type?: ImageContentMimeType | undefined;
|
|
6718
6826
|
resolution?: MediaResolution_2 | undefined;
|
|
6827
|
+
type: "image";
|
|
6828
|
+
/**
|
|
6829
|
+
* The URI of the image.
|
|
6830
|
+
*/
|
|
6831
|
+
uri?: string | undefined;
|
|
6719
6832
|
};
|
|
6720
6833
|
|
|
6721
6834
|
/**
|
|
@@ -6724,11 +6837,11 @@ declare type ImageContent = {
|
|
|
6724
6837
|
declare type ImageContentMimeType = "image/png" | "image/jpeg" | "image/webp" | "image/heic" | "image/heif" | "image/gif" | "image/bmp" | "image/tiff" | (string & {});
|
|
6725
6838
|
|
|
6726
6839
|
declare type ImageDelta = {
|
|
6727
|
-
type: "image";
|
|
6728
6840
|
data?: string | undefined;
|
|
6729
|
-
uri?: string | undefined;
|
|
6730
6841
|
mime_type?: ImageDeltaMimeType | undefined;
|
|
6731
6842
|
resolution?: MediaResolution_2 | undefined;
|
|
6843
|
+
type: "image";
|
|
6844
|
+
uri?: string | undefined;
|
|
6732
6845
|
};
|
|
6733
6846
|
|
|
6734
6847
|
declare type ImageDeltaMimeType = "image/png" | "image/jpeg" | "image/webp" | "image/heic" | "image/heif" | "image/gif" | "image/bmp" | "image/tiff" | (string & {});
|
|
@@ -6783,31 +6896,50 @@ export declare enum ImageResizeMode {
|
|
|
6783
6896
|
PAD = "PAD"
|
|
6784
6897
|
}
|
|
6785
6898
|
|
|
6786
|
-
declare type ImageResponseFormat$ =
|
|
6899
|
+
declare type ImageResponseFormat$ = ImageResponseFormat_2;
|
|
6900
|
+
|
|
6901
|
+
/** Configuration for image-specific output formatting. */
|
|
6902
|
+
export declare class ImageResponseFormat {
|
|
6903
|
+
/** Optional. The aspect ratio for the image output. */
|
|
6904
|
+
aspectRatio?: AspectRatio;
|
|
6905
|
+
/** Optional. Delivery mode for the generated content. */
|
|
6906
|
+
delivery?: Delivery;
|
|
6907
|
+
/** Optional. The size of the image output. */
|
|
6908
|
+
imageSize?: ImageSize;
|
|
6909
|
+
/** Optional. The MIME type of the image output. */
|
|
6910
|
+
mimeType?: string;
|
|
6911
|
+
}
|
|
6787
6912
|
|
|
6788
6913
|
/**
|
|
6789
6914
|
* Configuration for image output format.
|
|
6790
6915
|
*/
|
|
6791
|
-
declare type
|
|
6792
|
-
type: "image";
|
|
6916
|
+
declare type ImageResponseFormat_2 = {
|
|
6793
6917
|
/**
|
|
6794
|
-
* The
|
|
6918
|
+
* The aspect ratio for the image output.
|
|
6795
6919
|
*/
|
|
6796
|
-
|
|
6920
|
+
aspect_ratio?: ImageResponseFormatAspectRatio | undefined;
|
|
6797
6921
|
/**
|
|
6798
6922
|
* The delivery mode for the image output.
|
|
6799
6923
|
*/
|
|
6800
6924
|
delivery?: ImageResponseFormatDelivery | undefined;
|
|
6801
|
-
/**
|
|
6802
|
-
* The aspect ratio for the image output.
|
|
6803
|
-
*/
|
|
6804
|
-
aspect_ratio?: ImageResponseFormatAspectRatio | undefined;
|
|
6805
6925
|
/**
|
|
6806
6926
|
* The size of the image output.
|
|
6807
6927
|
*/
|
|
6808
6928
|
image_size?: ImageResponseFormatImageSize | undefined;
|
|
6929
|
+
/**
|
|
6930
|
+
* The MIME type of the image output.
|
|
6931
|
+
*/
|
|
6932
|
+
mime_type?: ImageResponseFormatMimeType | undefined;
|
|
6933
|
+
type: "image";
|
|
6809
6934
|
};
|
|
6810
6935
|
|
|
6936
|
+
/**
|
|
6937
|
+
* @license
|
|
6938
|
+
* Copyright 2026 Google LLC
|
|
6939
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6940
|
+
*
|
|
6941
|
+
* g3-prettier-ignore-file
|
|
6942
|
+
*/
|
|
6811
6943
|
/**
|
|
6812
6944
|
* The aspect ratio for the image output.
|
|
6813
6945
|
*/
|
|
@@ -6823,13 +6955,6 @@ declare type ImageResponseFormatDelivery = "inline" | "uri" | (string & {});
|
|
|
6823
6955
|
*/
|
|
6824
6956
|
declare type ImageResponseFormatImageSize = "512" | "1K" | "2K" | "4K" | (string & {});
|
|
6825
6957
|
|
|
6826
|
-
/**
|
|
6827
|
-
* @license
|
|
6828
|
-
* Copyright 2026 Google LLC
|
|
6829
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
6830
|
-
*
|
|
6831
|
-
* g3-prettier-ignore-file
|
|
6832
|
-
*/
|
|
6833
6958
|
/**
|
|
6834
6959
|
* The MIME type of the image output.
|
|
6835
6960
|
*/
|
|
@@ -6839,16 +6964,40 @@ declare type ImageResponseFormatMimeType = "image/jpeg";
|
|
|
6839
6964
|
export declare interface ImageSearch {
|
|
6840
6965
|
}
|
|
6841
6966
|
|
|
6842
|
-
/**
|
|
6843
|
-
export declare
|
|
6844
|
-
/**
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6967
|
+
/** The size of the image output. */
|
|
6968
|
+
export declare enum ImageSize {
|
|
6969
|
+
/**
|
|
6970
|
+
* Default value. This value is unused.
|
|
6971
|
+
*/
|
|
6972
|
+
IMAGE_SIZE_UNSPECIFIED = "IMAGE_SIZE_UNSPECIFIED",
|
|
6973
|
+
/**
|
|
6974
|
+
* 512px image size.
|
|
6975
|
+
*/
|
|
6976
|
+
IMAGE_SIZE_FIVE_TWELVE = "IMAGE_SIZE_FIVE_TWELVE",
|
|
6977
|
+
/**
|
|
6978
|
+
* 1K image size.
|
|
6979
|
+
*/
|
|
6980
|
+
IMAGE_SIZE_ONE_K = "IMAGE_SIZE_ONE_K",
|
|
6981
|
+
/**
|
|
6982
|
+
* 2K image size.
|
|
6983
|
+
*/
|
|
6984
|
+
IMAGE_SIZE_TWO_K = "IMAGE_SIZE_TWO_K",
|
|
6985
|
+
/**
|
|
6986
|
+
* 4K image size.
|
|
6987
|
+
*/
|
|
6988
|
+
IMAGE_SIZE_FOUR_K = "IMAGE_SIZE_FOUR_K"
|
|
6989
|
+
}
|
|
6990
|
+
|
|
6991
|
+
/** Optional parameters for importing a file. */
|
|
6992
|
+
export declare interface ImportFileConfig {
|
|
6993
|
+
/** Used to override HTTP request options. */
|
|
6994
|
+
httpOptions?: HttpOptions;
|
|
6995
|
+
/** Abort signal which can be used to cancel the request.
|
|
6996
|
+
|
|
6997
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
6998
|
+
operation will not cancel the request in the service. You will still
|
|
6999
|
+
be charged usage for any applicable operations.
|
|
7000
|
+
*/
|
|
6852
7001
|
abortSignal?: AbortSignal;
|
|
6853
7002
|
/** User provided custom metadata stored as key-value pairs used for querying. */
|
|
6854
7003
|
customMetadata?: CustomMetadata[];
|
|
@@ -7016,7 +7165,7 @@ declare type Interaction = {
|
|
|
7016
7165
|
/**
|
|
7017
7166
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
7018
7167
|
*/
|
|
7019
|
-
response_format?: Array<
|
|
7168
|
+
response_format?: Array<ResponseFormat_2> | ResponseFormat_2 | undefined;
|
|
7020
7169
|
/**
|
|
7021
7170
|
* The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
|
|
7022
7171
|
*/
|
|
@@ -7039,6 +7188,16 @@ declare type Interaction = {
|
|
|
7039
7188
|
* Configuration parameters for the agent interaction.
|
|
7040
7189
|
*/
|
|
7041
7190
|
agent_config?: DynamicAgentConfig | DeepResearchAgentConfig | undefined;
|
|
7191
|
+
/**
|
|
7192
|
+
* Safety settings for the interaction.
|
|
7193
|
+
*/
|
|
7194
|
+
safety_settings?: Array<SafetySetting_2> | undefined;
|
|
7195
|
+
/**
|
|
7196
|
+
* The labels with user-defined metadata for the request.
|
|
7197
|
+
*/
|
|
7198
|
+
labels?: {
|
|
7199
|
+
[k: string]: string;
|
|
7200
|
+
} | undefined;
|
|
7042
7201
|
/**
|
|
7043
7202
|
* The input for the interaction.
|
|
7044
7203
|
*/
|
|
@@ -7152,7 +7311,7 @@ declare type InteractionGetParamsStreaming = GetInteractionByIdParamsStreaming;
|
|
|
7152
7311
|
/**
|
|
7153
7312
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
7154
7313
|
*/
|
|
7155
|
-
declare type InteractionResponseFormat = Array<
|
|
7314
|
+
declare type InteractionResponseFormat = Array<ResponseFormat_2> | ResponseFormat_2;
|
|
7156
7315
|
|
|
7157
7316
|
export declare namespace Interactions {
|
|
7158
7317
|
export type AllowedTools = AllowedTools$;
|
|
@@ -7195,6 +7354,7 @@ export declare namespace Interactions {
|
|
|
7195
7354
|
export type GoogleSearchResult = GoogleSearchResult$;
|
|
7196
7355
|
export interface GoogleSearchResultStep extends GoogleSearchResultStep$ {
|
|
7197
7356
|
}
|
|
7357
|
+
export type HarmCategory = HarmCategory$;
|
|
7198
7358
|
export type ImageConfig = ImageConfig$;
|
|
7199
7359
|
export type ImageContent = ImageContent$;
|
|
7200
7360
|
export type ImageResponseFormat = ImageResponseFormat$;
|
|
@@ -7216,9 +7376,15 @@ export declare namespace Interactions {
|
|
|
7216
7376
|
export type MCPServerToolCallStep = MCPServerToolCallStep$;
|
|
7217
7377
|
export type MCPServerToolResultStep = MCPServerToolResultStep$;
|
|
7218
7378
|
export type Model = Model$;
|
|
7219
|
-
export
|
|
7379
|
+
export interface ModelOutputStep extends ModelOutputStep$ {
|
|
7380
|
+
}
|
|
7220
7381
|
export interface PlaceCitation extends PlaceCitation$ {
|
|
7221
7382
|
}
|
|
7383
|
+
export type RetrievalCallArguments = RetrievalCallArguments$;
|
|
7384
|
+
export interface RetrievalCallDelta extends RetrievalCallDelta$ {
|
|
7385
|
+
}
|
|
7386
|
+
export type RetrievalResultDelta = RetrievalResultDelta$;
|
|
7387
|
+
export type SafetySetting = SafetySetting$;
|
|
7222
7388
|
export type SpeechConfig = SpeechConfig$;
|
|
7223
7389
|
export type Step = Step$;
|
|
7224
7390
|
export interface StepDelta extends StepDelta$ {
|
|
@@ -7244,18 +7410,16 @@ export declare namespace Interactions {
|
|
|
7244
7410
|
export interface Usage extends Usage$ {
|
|
7245
7411
|
}
|
|
7246
7412
|
export type UserInputStep = UserInputStep$;
|
|
7413
|
+
export type VideoConfig = VideoConfig$;
|
|
7247
7414
|
export type VideoContent = VideoContent$;
|
|
7415
|
+
export type VideoResponseFormat = VideoResponseFormat$;
|
|
7248
7416
|
export type WebhookConfig = WebhookConfig$;
|
|
7249
7417
|
export namespace CodeExecutionCallStep {
|
|
7250
7418
|
export type Arguments = Arguments$;
|
|
7251
7419
|
}
|
|
7252
7420
|
export namespace Environment {
|
|
7253
|
-
export
|
|
7254
|
-
}
|
|
7421
|
+
export type Allowlist = Allowlist$;
|
|
7255
7422
|
export type Source = Source$;
|
|
7256
|
-
export namespace Allowlist {
|
|
7257
|
-
export type Allowlist = Allowlist$2;
|
|
7258
|
-
}
|
|
7259
7423
|
}
|
|
7260
7424
|
export namespace ErrorEvent {
|
|
7261
7425
|
export type Error = Error$;
|
|
@@ -7301,9 +7465,15 @@ export declare namespace Interactions {
|
|
|
7301
7465
|
export namespace InteractionStatusUpdate {
|
|
7302
7466
|
export type Metadata = Metadata$4;
|
|
7303
7467
|
}
|
|
7468
|
+
export namespace ModelOutputStep {
|
|
7469
|
+
export type Error = Error$2;
|
|
7470
|
+
}
|
|
7304
7471
|
export namespace PlaceCitation {
|
|
7305
7472
|
export type ReviewSnippet = ReviewSnippet$3;
|
|
7306
7473
|
}
|
|
7474
|
+
export namespace RetrievalCallDelta {
|
|
7475
|
+
export type Arguments = Arguments$4;
|
|
7476
|
+
}
|
|
7307
7477
|
export namespace StepDelta {
|
|
7308
7478
|
export type ArgumentsDelta = ArgumentsDelta$;
|
|
7309
7479
|
export type Audio = Audio$;
|
|
@@ -7350,7 +7520,7 @@ export declare namespace Interactions {
|
|
|
7350
7520
|
}
|
|
7351
7521
|
}
|
|
7352
7522
|
export namespace URLContextCallStep {
|
|
7353
|
-
export type Arguments = Arguments$
|
|
7523
|
+
export type Arguments = Arguments$5;
|
|
7354
7524
|
}
|
|
7355
7525
|
export namespace URLContextResultStep {
|
|
7356
7526
|
export type Result = Result$3;
|
|
@@ -7368,6 +7538,7 @@ declare namespace interactions {
|
|
|
7368
7538
|
export {
|
|
7369
7539
|
AgentOption,
|
|
7370
7540
|
AllowedTools,
|
|
7541
|
+
Transform,
|
|
7371
7542
|
AllowlistEntry,
|
|
7372
7543
|
Annotation,
|
|
7373
7544
|
ArgumentsDelta,
|
|
@@ -7375,9 +7546,9 @@ declare namespace interactions {
|
|
|
7375
7546
|
AudioContent,
|
|
7376
7547
|
AudioDeltaMimeType,
|
|
7377
7548
|
AudioDelta,
|
|
7378
|
-
AudioResponseFormatMimeType,
|
|
7379
7549
|
AudioResponseFormatDelivery,
|
|
7380
|
-
|
|
7550
|
+
AudioResponseFormatMimeType,
|
|
7551
|
+
AudioResponseFormat_2 as AudioResponseFormat,
|
|
7381
7552
|
Language_2 as Language,
|
|
7382
7553
|
CodeExecutionCallArguments,
|
|
7383
7554
|
CodeExecutionCallDelta,
|
|
@@ -7385,6 +7556,7 @@ declare namespace interactions {
|
|
|
7385
7556
|
CodeExecutionResultDelta,
|
|
7386
7557
|
CodeExecutionResultStep,
|
|
7387
7558
|
CodeExecution,
|
|
7559
|
+
DisabledSafetyPolicy,
|
|
7388
7560
|
EnvironmentEnum,
|
|
7389
7561
|
ComputerUse_2 as ComputerUse,
|
|
7390
7562
|
Content_2 as Content,
|
|
@@ -7450,6 +7622,7 @@ declare namespace interactions {
|
|
|
7450
7622
|
GoogleSearch_2 as GoogleSearch,
|
|
7451
7623
|
GroundingToolCountType,
|
|
7452
7624
|
GroundingToolCount,
|
|
7625
|
+
HarmCategory_2 as HarmCategory,
|
|
7453
7626
|
HybridSearch,
|
|
7454
7627
|
ImageConfigAspectRatio,
|
|
7455
7628
|
ImageConfigImageSize,
|
|
@@ -7458,11 +7631,11 @@ declare namespace interactions {
|
|
|
7458
7631
|
ImageContent,
|
|
7459
7632
|
ImageDeltaMimeType,
|
|
7460
7633
|
ImageDelta,
|
|
7461
|
-
ImageResponseFormatMimeType,
|
|
7462
|
-
ImageResponseFormatDelivery,
|
|
7463
7634
|
ImageResponseFormatAspectRatio,
|
|
7635
|
+
ImageResponseFormatDelivery,
|
|
7464
7636
|
ImageResponseFormatImageSize,
|
|
7465
|
-
|
|
7637
|
+
ImageResponseFormatMimeType,
|
|
7638
|
+
ImageResponseFormat_2 as ImageResponseFormat,
|
|
7466
7639
|
InteractionCompletedEvent,
|
|
7467
7640
|
InteractionCreatedEvent,
|
|
7468
7641
|
InteractionSseEventInteractionStatus,
|
|
@@ -7496,15 +7669,23 @@ declare namespace interactions {
|
|
|
7496
7669
|
RagRetrievalConfig_2 as RagRetrievalConfig,
|
|
7497
7670
|
RagStoreConfig,
|
|
7498
7671
|
Ranking,
|
|
7499
|
-
ResponseFormat,
|
|
7672
|
+
ResponseFormat_2 as ResponseFormat,
|
|
7500
7673
|
ResponseModality,
|
|
7501
|
-
|
|
7674
|
+
RetrievalCallArguments,
|
|
7675
|
+
RetrievalCallDeltaRetrievalType,
|
|
7676
|
+
RetrievalCallDelta,
|
|
7677
|
+
RetrievalResultDelta,
|
|
7678
|
+
RetrievalRetrievalType,
|
|
7502
7679
|
Retrieval_2 as Retrieval,
|
|
7503
7680
|
ReviewSnippet,
|
|
7681
|
+
Method,
|
|
7682
|
+
Threshold,
|
|
7683
|
+
SafetySetting_2 as SafetySetting,
|
|
7504
7684
|
ServiceTier_2 as ServiceTier,
|
|
7505
7685
|
SourceType,
|
|
7506
7686
|
Source,
|
|
7507
7687
|
SpeechConfig_2 as SpeechConfig,
|
|
7688
|
+
Status,
|
|
7508
7689
|
StepDeltaData,
|
|
7509
7690
|
StepDeltaMetadata,
|
|
7510
7691
|
StepDelta,
|
|
@@ -7516,7 +7697,7 @@ declare namespace interactions {
|
|
|
7516
7697
|
TextContent,
|
|
7517
7698
|
TextDelta,
|
|
7518
7699
|
TextResponseFormatMimeType,
|
|
7519
|
-
TextResponseFormat,
|
|
7700
|
+
TextResponseFormat_2 as TextResponseFormat,
|
|
7520
7701
|
ThinkingLevel_2 as ThinkingLevel,
|
|
7521
7702
|
ThinkingSummaries,
|
|
7522
7703
|
ThoughtSignatureDelta,
|
|
@@ -7531,7 +7712,6 @@ declare namespace interactions {
|
|
|
7531
7712
|
URLCitation,
|
|
7532
7713
|
URLContextCallArguments,
|
|
7533
7714
|
URLContextCallDelta,
|
|
7534
|
-
Arguments,
|
|
7535
7715
|
URLContextCallStep,
|
|
7536
7716
|
URLContextResultDelta,
|
|
7537
7717
|
URLContextResultStep,
|
|
@@ -7541,10 +7721,15 @@ declare namespace interactions {
|
|
|
7541
7721
|
Usage,
|
|
7542
7722
|
UserInputStep,
|
|
7543
7723
|
VertexAISearchConfig,
|
|
7724
|
+
Task,
|
|
7725
|
+
VideoConfig,
|
|
7544
7726
|
VideoContentMimeType,
|
|
7545
7727
|
VideoContent,
|
|
7546
7728
|
VideoDeltaMimeType,
|
|
7547
7729
|
VideoDelta,
|
|
7730
|
+
VideoResponseFormatAspectRatio,
|
|
7731
|
+
VideoResponseFormatDelivery,
|
|
7732
|
+
VideoResponseFormat_2 as VideoResponseFormat,
|
|
7548
7733
|
WebhookConfig_2 as WebhookConfig
|
|
7549
7734
|
}
|
|
7550
7735
|
}
|
|
@@ -7622,9 +7807,6 @@ declare type InteractionStatus = "in_progress" | "requires_action" | "completed"
|
|
|
7622
7807
|
declare type InteractionStatusUpdate$ = InteractionStatusUpdate;
|
|
7623
7808
|
|
|
7624
7809
|
declare type InteractionStatusUpdate = {
|
|
7625
|
-
event_type: "interaction.status_update";
|
|
7626
|
-
interaction_id: string;
|
|
7627
|
-
status: InteractionStatusUpdateStatus;
|
|
7628
7810
|
/**
|
|
7629
7811
|
* The event_id token to be used to resume the interaction stream, from
|
|
7630
7812
|
*
|
|
@@ -7632,7 +7814,10 @@ declare type InteractionStatusUpdate = {
|
|
|
7632
7814
|
* this event.
|
|
7633
7815
|
*/
|
|
7634
7816
|
event_id?: string | undefined;
|
|
7817
|
+
event_type: "interaction.status_update";
|
|
7818
|
+
interaction_id: string;
|
|
7635
7819
|
metadata?: StreamMetadata | undefined;
|
|
7820
|
+
status: InteractionStatusUpdateStatus;
|
|
7636
7821
|
};
|
|
7637
7822
|
|
|
7638
7823
|
declare type InteractionStatusUpdateStatus = "in_progress" | "requires_action" | "completed" | "failed" | "cancelled" | "incomplete" | "budget_exceeded" | (string & {});
|
|
@@ -8771,9 +8956,9 @@ export declare interface LiveServerSessionResumptionUpdate {
|
|
|
8771
8956
|
resumable?: boolean;
|
|
8772
8957
|
/** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.
|
|
8773
8958
|
|
|
8774
|
-
Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `
|
|
8959
|
+
Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).
|
|
8775
8960
|
|
|
8776
|
-
Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames
|
|
8961
|
+
Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames are likely not needed. */
|
|
8777
8962
|
lastConsumedClientMessageIndex?: string;
|
|
8778
8963
|
}
|
|
8779
8964
|
|
|
@@ -8781,6 +8966,11 @@ export declare interface LiveServerSessionResumptionUpdate {
|
|
|
8781
8966
|
export declare interface LiveServerSetupComplete {
|
|
8782
8967
|
/** The session id of the live session. */
|
|
8783
8968
|
sessionId?: string;
|
|
8969
|
+
/** Signature of the verified consent audio. This is populated when the
|
|
8970
|
+
request has a ReplicatedVoiceConfig with consent_audio set, if the consent
|
|
8971
|
+
verification was successful. This may be used in a subsequent request
|
|
8972
|
+
instead of the consent_audio to verify the same consent. */
|
|
8973
|
+
voiceConsentSignature?: VoiceConsentSignature;
|
|
8784
8974
|
}
|
|
8785
8975
|
|
|
8786
8976
|
/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */
|
|
@@ -8869,22 +9059,22 @@ export declare enum MaskReferenceMode {
|
|
|
8869
9059
|
MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
|
|
8870
9060
|
}
|
|
8871
9061
|
|
|
8872
|
-
/** Match operation to use for
|
|
9062
|
+
/** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
|
|
8873
9063
|
export declare enum MatchOperation {
|
|
8874
9064
|
/**
|
|
8875
|
-
* Default value.
|
|
9065
|
+
* Default value. A user error will be returned if not set.
|
|
8876
9066
|
*/
|
|
8877
9067
|
MATCH_OPERATION_UNSPECIFIED = "MATCH_OPERATION_UNSPECIFIED",
|
|
8878
9068
|
/**
|
|
8879
|
-
* Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
|
|
9069
|
+
* Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
|
|
8880
9070
|
*/
|
|
8881
9071
|
REGEX_CONTAINS = "REGEX_CONTAINS",
|
|
8882
9072
|
/**
|
|
8883
|
-
* `
|
|
9073
|
+
* The match operation returns `true` if expression is a substring of the target.
|
|
8884
9074
|
*/
|
|
8885
9075
|
PARTIAL_MATCH = "PARTIAL_MATCH",
|
|
8886
9076
|
/**
|
|
8887
|
-
* `
|
|
9077
|
+
* The match operation returns `true` expression is an exact match of the target.
|
|
8888
9078
|
*/
|
|
8889
9079
|
EXACT_MATCH = "EXACT_MATCH"
|
|
8890
9080
|
}
|
|
@@ -8895,11 +9085,21 @@ declare type MCPServer$ = MCPServer;
|
|
|
8895
9085
|
* A MCPServer is a server that can be called by the model to perform actions.
|
|
8896
9086
|
*/
|
|
8897
9087
|
declare type MCPServer = {
|
|
8898
|
-
|
|
9088
|
+
/**
|
|
9089
|
+
* The allowed tools.
|
|
9090
|
+
*/
|
|
9091
|
+
allowed_tools?: Array<AllowedTools> | undefined;
|
|
9092
|
+
/**
|
|
9093
|
+
* Optional: Fields for authentication headers, timeouts, etc., if needed.
|
|
9094
|
+
*/
|
|
9095
|
+
headers?: {
|
|
9096
|
+
[k: string]: string;
|
|
9097
|
+
} | undefined;
|
|
8899
9098
|
/**
|
|
8900
9099
|
* The name of the MCPServer.
|
|
8901
9100
|
*/
|
|
8902
9101
|
name?: string | undefined;
|
|
9102
|
+
type: "mcp_server";
|
|
8903
9103
|
/**
|
|
8904
9104
|
* The full URL for the MCPServer endpoint.
|
|
8905
9105
|
*
|
|
@@ -8907,16 +9107,6 @@ declare type MCPServer = {
|
|
|
8907
9107
|
* Example: "https://api.example.com/mcp"
|
|
8908
9108
|
*/
|
|
8909
9109
|
url?: string | undefined;
|
|
8910
|
-
/**
|
|
8911
|
-
* Optional: Fields for authentication headers, timeouts, etc., if needed.
|
|
8912
|
-
*/
|
|
8913
|
-
headers?: {
|
|
8914
|
-
[k: string]: string;
|
|
8915
|
-
} | undefined;
|
|
8916
|
-
/**
|
|
8917
|
-
* The allowed tools.
|
|
8918
|
-
*/
|
|
8919
|
-
allowed_tools?: Array<AllowedTools> | undefined;
|
|
8920
9110
|
};
|
|
8921
9111
|
|
|
8922
9112
|
/** A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 6. This data type is not supported in Vertex AI. */
|
|
@@ -8937,12 +9127,12 @@ declare type MCPServerToolCall$ = MCPServerToolCallDelta;
|
|
|
8937
9127
|
* g3-prettier-ignore-file
|
|
8938
9128
|
*/
|
|
8939
9129
|
declare type MCPServerToolCallDelta = {
|
|
8940
|
-
type: "mcp_server_tool_call";
|
|
8941
|
-
name: string;
|
|
8942
|
-
server_name: string;
|
|
8943
9130
|
arguments: {
|
|
8944
9131
|
[k: string]: any;
|
|
8945
9132
|
};
|
|
9133
|
+
name: string;
|
|
9134
|
+
server_name: string;
|
|
9135
|
+
type: "mcp_server_tool_call";
|
|
8946
9136
|
};
|
|
8947
9137
|
|
|
8948
9138
|
declare type MCPServerToolCallStep$ = MCPServerToolCallStep;
|
|
@@ -8958,15 +9148,6 @@ declare type MCPServerToolCallStep$ = MCPServerToolCallStep;
|
|
|
8958
9148
|
* MCPServer tool call step.
|
|
8959
9149
|
*/
|
|
8960
9150
|
declare type MCPServerToolCallStep = {
|
|
8961
|
-
type: "mcp_server_tool_call";
|
|
8962
|
-
/**
|
|
8963
|
-
* Required. The name of the tool which was called.
|
|
8964
|
-
*/
|
|
8965
|
-
name: string;
|
|
8966
|
-
/**
|
|
8967
|
-
* Required. The name of the used MCP server.
|
|
8968
|
-
*/
|
|
8969
|
-
server_name: string;
|
|
8970
9151
|
/**
|
|
8971
9152
|
* Required. The JSON object of arguments for the function.
|
|
8972
9153
|
*/
|
|
@@ -8977,15 +9158,24 @@ declare type MCPServerToolCallStep = {
|
|
|
8977
9158
|
* Required. A unique ID for this specific tool call.
|
|
8978
9159
|
*/
|
|
8979
9160
|
id: string;
|
|
9161
|
+
/**
|
|
9162
|
+
* Required. The name of the tool which was called.
|
|
9163
|
+
*/
|
|
9164
|
+
name: string;
|
|
9165
|
+
/**
|
|
9166
|
+
* Required. The name of the used MCP server.
|
|
9167
|
+
*/
|
|
9168
|
+
server_name: string;
|
|
9169
|
+
type: "mcp_server_tool_call";
|
|
8980
9170
|
};
|
|
8981
9171
|
|
|
8982
9172
|
declare type MCPServerToolResult$ = MCPServerToolResultDelta;
|
|
8983
9173
|
|
|
8984
9174
|
declare type MCPServerToolResultDelta = {
|
|
8985
|
-
type: "mcp_server_tool_result";
|
|
8986
9175
|
name?: string | undefined;
|
|
8987
|
-
server_name?: string | undefined;
|
|
8988
9176
|
result: MCPServerToolResultDeltaResult | Array<FunctionResultSubcontent> | string;
|
|
9177
|
+
server_name?: string | undefined;
|
|
9178
|
+
type: "mcp_server_tool_result";
|
|
8989
9179
|
};
|
|
8990
9180
|
|
|
8991
9181
|
declare type MCPServerToolResultDeltaResult = {};
|
|
@@ -8998,23 +9188,23 @@ declare type MCPServerToolResultStep$ = MCPServerToolResultStep;
|
|
|
8998
9188
|
* MCPServer tool result step.
|
|
8999
9189
|
*/
|
|
9000
9190
|
declare type MCPServerToolResultStep = {
|
|
9001
|
-
type: "mcp_server_tool_result";
|
|
9002
|
-
/**
|
|
9003
|
-
* Name of the tool which is called for this specific tool call.
|
|
9004
|
-
*/
|
|
9005
|
-
name?: string | undefined;
|
|
9006
|
-
/**
|
|
9007
|
-
* The name of the used MCP server.
|
|
9008
|
-
*/
|
|
9009
|
-
server_name?: string | undefined;
|
|
9010
9191
|
/**
|
|
9011
9192
|
* Required. ID to match the ID from the function call block.
|
|
9012
9193
|
*/
|
|
9013
9194
|
call_id: string;
|
|
9195
|
+
/**
|
|
9196
|
+
* Name of the tool which is called for this specific tool call.
|
|
9197
|
+
*/
|
|
9198
|
+
name?: string | undefined;
|
|
9014
9199
|
/**
|
|
9015
9200
|
* The output from the MCP server call. Can be simple text or rich content.
|
|
9016
9201
|
*/
|
|
9017
9202
|
result: MCPServerToolResultStepResult | string | Array<FunctionResultSubcontent>;
|
|
9203
|
+
/**
|
|
9204
|
+
* The name of the used MCP server.
|
|
9205
|
+
*/
|
|
9206
|
+
server_name?: string | undefined;
|
|
9207
|
+
type: "mcp_server_tool_result";
|
|
9018
9208
|
};
|
|
9019
9209
|
|
|
9020
9210
|
declare type MCPServerToolResultStepResult = {};
|
|
@@ -9107,6 +9297,14 @@ declare type Metadata$6 = StreamMetadata;
|
|
|
9107
9297
|
|
|
9108
9298
|
declare type Metadata$7 = StreamMetadata;
|
|
9109
9299
|
|
|
9300
|
+
/**
|
|
9301
|
+
* Optional. The method for blocking content. If not specified, the default
|
|
9302
|
+
*
|
|
9303
|
+
* @remarks
|
|
9304
|
+
* behavior is to use the probability score.
|
|
9305
|
+
*/
|
|
9306
|
+
declare type Method = "severity" | "probability" | (string & {});
|
|
9307
|
+
|
|
9110
9308
|
/** Server content modalities. */
|
|
9111
9309
|
export declare enum Modality {
|
|
9112
9310
|
/**
|
|
@@ -9233,8 +9431,20 @@ declare type ModelOutputStep$ = ModelOutputStep;
|
|
|
9233
9431
|
* Output generated by the model.
|
|
9234
9432
|
*/
|
|
9235
9433
|
declare type ModelOutputStep = {
|
|
9236
|
-
type: "model_output";
|
|
9237
9434
|
content?: Array<Content_2> | undefined;
|
|
9435
|
+
/**
|
|
9436
|
+
* The `Status` type defines a logical error model that is suitable for
|
|
9437
|
+
*
|
|
9438
|
+
* @remarks
|
|
9439
|
+
* different programming environments, including REST APIs and RPC APIs. It is
|
|
9440
|
+
* used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
|
9441
|
+
* three pieces of data: error code, error message, and error details.
|
|
9442
|
+
*
|
|
9443
|
+
* You can find out more about this error model and how to work with it in the
|
|
9444
|
+
* [API Design Guide](https://cloud.google.com/apis/design/errors).
|
|
9445
|
+
*/
|
|
9446
|
+
error?: Status | undefined;
|
|
9447
|
+
type: "model_output";
|
|
9238
9448
|
};
|
|
9239
9449
|
|
|
9240
9450
|
export declare class Models extends BaseModule {
|
|
@@ -9308,7 +9518,7 @@ export declare class Models extends BaseModule {
|
|
|
9308
9518
|
* To maintain backward compatibility, we move the data that was treated as
|
|
9309
9519
|
* JSON schema from the responseSchema field to the responseJsonSchema field.
|
|
9310
9520
|
*/
|
|
9311
|
-
private
|
|
9521
|
+
private maybeMoveToResponseJsonSchema;
|
|
9312
9522
|
/**
|
|
9313
9523
|
* Makes an API request to generate content with a given model and yields the
|
|
9314
9524
|
* response in chunks.
|
|
@@ -10143,19 +10353,18 @@ declare type PlaceCitation$ = PlaceCitation;
|
|
|
10143
10353
|
* A place citation annotation.
|
|
10144
10354
|
*/
|
|
10145
10355
|
declare type PlaceCitation = {
|
|
10146
|
-
type: "place_citation";
|
|
10147
10356
|
/**
|
|
10148
|
-
*
|
|
10357
|
+
* End of the attributed segment, exclusive.
|
|
10149
10358
|
*/
|
|
10150
|
-
|
|
10359
|
+
end_index?: number | undefined;
|
|
10151
10360
|
/**
|
|
10152
10361
|
* Title of the place.
|
|
10153
10362
|
*/
|
|
10154
10363
|
name?: string | undefined;
|
|
10155
10364
|
/**
|
|
10156
|
-
*
|
|
10365
|
+
* The ID of the place, in `places/{place_id}` format.
|
|
10157
10366
|
*/
|
|
10158
|
-
|
|
10367
|
+
place_id?: string | undefined;
|
|
10159
10368
|
/**
|
|
10160
10369
|
* Snippets of reviews that are used to generate answers about the
|
|
10161
10370
|
*
|
|
@@ -10171,10 +10380,11 @@ declare type PlaceCitation = {
|
|
|
10171
10380
|
* Index indicates the start of the segment, measured in bytes.
|
|
10172
10381
|
*/
|
|
10173
10382
|
start_index?: number | undefined;
|
|
10383
|
+
type: "place_citation";
|
|
10174
10384
|
/**
|
|
10175
|
-
*
|
|
10385
|
+
* URI reference of the place.
|
|
10176
10386
|
*/
|
|
10177
|
-
|
|
10387
|
+
url?: string | undefined;
|
|
10178
10388
|
};
|
|
10179
10389
|
|
|
10180
10390
|
/** Spec for pointwise metric result. This data type is not supported in Gemini API. */
|
|
@@ -10342,21 +10552,21 @@ export declare interface RagRetrievalConfig {
|
|
|
10342
10552
|
*/
|
|
10343
10553
|
declare type RagRetrievalConfig_2 = {
|
|
10344
10554
|
/**
|
|
10345
|
-
*
|
|
10555
|
+
* Config for filters.
|
|
10346
10556
|
*/
|
|
10347
|
-
|
|
10557
|
+
filter?: Filter | undefined;
|
|
10348
10558
|
/**
|
|
10349
10559
|
* Config for Hybrid Search.
|
|
10350
10560
|
*/
|
|
10351
10561
|
hybrid_search?: HybridSearch | undefined;
|
|
10352
|
-
/**
|
|
10353
|
-
* Config for filters.
|
|
10354
|
-
*/
|
|
10355
|
-
filter?: Filter | undefined;
|
|
10356
10562
|
/**
|
|
10357
10563
|
* Config for Rank Service.
|
|
10358
10564
|
*/
|
|
10359
10565
|
ranking?: Ranking | undefined;
|
|
10566
|
+
/**
|
|
10567
|
+
* Optional. The number of contexts to retrieve.
|
|
10568
|
+
*/
|
|
10569
|
+
top_k?: number | undefined;
|
|
10360
10570
|
};
|
|
10361
10571
|
|
|
10362
10572
|
/** Config for filters. This data type is not supported in Gemini API. */
|
|
@@ -10403,6 +10613,10 @@ declare type RagStoreConfig = {
|
|
|
10403
10613
|
* Optional. The representation of the rag source.
|
|
10404
10614
|
*/
|
|
10405
10615
|
rag_resources?: Array<RagResource> | undefined;
|
|
10616
|
+
/**
|
|
10617
|
+
* Specifies the context retrieval config.
|
|
10618
|
+
*/
|
|
10619
|
+
rag_retrieval_config?: RagRetrievalConfig_2 | undefined;
|
|
10406
10620
|
/**
|
|
10407
10621
|
* Optional. Number of top k results to return from the selected corpora.
|
|
10408
10622
|
*
|
|
@@ -10415,10 +10629,6 @@ declare type RagStoreConfig = {
|
|
|
10415
10629
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
10416
10630
|
*/
|
|
10417
10631
|
vector_distance_threshold?: number | undefined;
|
|
10418
|
-
/**
|
|
10419
|
-
* Specifies the context retrieval config.
|
|
10420
|
-
*/
|
|
10421
|
-
rag_retrieval_config?: RagRetrievalConfig_2 | undefined;
|
|
10422
10632
|
};
|
|
10423
10633
|
|
|
10424
10634
|
/**
|
|
@@ -10432,11 +10642,11 @@ declare type RagStoreConfig = {
|
|
|
10432
10642
|
* Config for Rank Service.
|
|
10433
10643
|
*/
|
|
10434
10644
|
declare type Ranking = {
|
|
10435
|
-
ranking_config: "rank_service";
|
|
10436
10645
|
/**
|
|
10437
10646
|
* Optional. The model name of the rank service.
|
|
10438
10647
|
*/
|
|
10439
10648
|
model_name?: string | undefined;
|
|
10649
|
+
ranking_config: "rank_service";
|
|
10440
10650
|
};
|
|
10441
10651
|
|
|
10442
10652
|
/** Raw output. This data type is not supported in Gemini API. */
|
|
@@ -10600,39 +10810,39 @@ export declare class RegisterFilesResponse {
|
|
|
10600
10810
|
export declare interface ReinforcementTuningAutoraterScorer {
|
|
10601
10811
|
/** Autorater config for evaluation. */
|
|
10602
10812
|
autoraterConfig?: AutoraterConfig;
|
|
10603
|
-
/**
|
|
10813
|
+
/** The prompt for an autorater to scorer the parsed sample response. This field supports the following placeholders that will be replaced before scoring: - {{prompt}} - {{response}} - {{system_instruction}} - {{references.key}} */
|
|
10604
10814
|
autoraterPrompt?: string;
|
|
10605
|
-
/** Parses autorater returned response. */
|
|
10815
|
+
/** Parses autorater returned response for scoring. For example, if the autorater response has reward stored in the `2.0` block, defining a parsing response config using regex `".*(.*?)"` will return a score `"2.0"`. */
|
|
10606
10816
|
autoraterResponseParseConfig?: ReinforcementTuningParseResponseConfig;
|
|
10607
|
-
/** Scores autorater responses by directly converting parsed autorater response to float reward. */
|
|
10817
|
+
/** Scores autorater responses by directly converting parsed autorater response to a float reward. Note: Reward is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. */
|
|
10608
10818
|
parsedResponseConversionScorer?: ReinforcementTuningAutoraterScorerParsedResponseConversionScorer;
|
|
10609
|
-
/** Scores autorater responses by using
|
|
10819
|
+
/** Scores autorater responses by using string match reward scorer. */
|
|
10610
10820
|
exactMatchScorer?: ReinforcementTuningAutoraterScorerExactMatchScorer;
|
|
10611
10821
|
}
|
|
10612
10822
|
|
|
10613
|
-
/** Scores autorater responses by using exact string match reward scorer. */
|
|
10823
|
+
/** Scores autorater responses by using exact string match reward scorer. This data type is not supported in Gemini API. */
|
|
10614
10824
|
export declare interface ReinforcementTuningAutoraterScorerExactMatchScorer {
|
|
10615
|
-
/** Assigns this reward score if parsed response string equals the expression. */
|
|
10825
|
+
/** Assigns this reward score if the parsed response string equals the expression. */
|
|
10616
10826
|
correctAnswerReward?: number;
|
|
10617
|
-
/** Assigns this reward score if parsed reward value does not equal the expression. */
|
|
10827
|
+
/** Assigns this reward score if the parsed reward value does not equal the expression. */
|
|
10618
10828
|
wrongAnswerReward?: number;
|
|
10619
|
-
/** The string expression to match against.
|
|
10829
|
+
/** The string expression to match against for scoring. This field supports placeholders in the format of {{references.key}} that will be replaced before matching. Regex is not supported for this expression. For example, users can define an ExactMatchScorer as follows: { "correctAnswerReward": 1.0, "wrongAnswerReward": -1.0, "expression": "{{references.concise_answer}}" } When evaluating the reward for each parsed autorater response, if the prompt references in the training/validation dataset has the following fields: ``` { "example": ..., "references": { "concise_ansser": "Yes", "verbose_answer": "The answer is Yes" } } ``` The above ExactMatchScorer will be replaced as follows for scoring: ``` { "correctAnswerReward": 1.0, "wrongAnswerReward": -1.0, "expression": "Yes" } ``` If the *parsed* autorater response is equal to the string `"Yes"`, then the reward is `1.0`, otherwise the reward is `-1.0`. */
|
|
10620
10830
|
expression?: string;
|
|
10621
10831
|
}
|
|
10622
10832
|
|
|
10623
|
-
/** Scores responses by directly converting parsed autorater response to float reward
|
|
10833
|
+
/** Scores responses by directly converting the parsed autorater response to a float reward. Note: Reward is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. This data type is not supported in Gemini API. */
|
|
10624
10834
|
export declare class ReinforcementTuningAutoraterScorerParsedResponseConversionScorer {
|
|
10625
10835
|
}
|
|
10626
10836
|
|
|
10627
|
-
/**
|
|
10837
|
+
/** ReinforcementTuningCloudRunRewardScorer allows users to implement a reward function through GCP Cloud Run. Comparing with ReinforcementTuningCodeExecutionRewardScorer that runs in a Sandbox and has no internet access, Cloud Run reward scorer is fully controlled by users. The Cloud Run service should implement the following HTTP API: HTTP method: `POST` HTTP request body: ``` { "example": ReinforcementTuningExample, "response": Content, "metadata": { "step": int "tuning_job_id": int64 } } ``` * `example` is a ReinforcementTuningExample in ProtoJSON format, (i.e., the format is the same as as one line in the training/validation dataset except that the keys must be in camel case). System instructions (i.e., `example.get("systemInstruction")`) and references (i.e., `example.get("references")`) are also included in the `example` provided that they are set in the training/validation dataset. * `response` is a Content in ProtoJSON format (i.e., keys must be in camel case), which is the same as the Online Prediction response for Gemini models. HTTP response body: { "reward": float, "user_requested_aux_info": str // Optional } where the field "user_requested_aux_info" is any (optional) string provided by users for assisting debugging. It's in snake case. This field is mostly useful when calling the GenAiTuningService.ValidateReinforcementTuningReward API, where the proto field (not Cloud Run HTTP response body) userRequestedAuxInfo will be populated if the Cloud Run reward function sets this field in the HTTP response. The following are examples for the HTTP request and response body. Example HTTP request body: ``` { "example": { "contents": [ { "role": "user", "parts": [ { "text": "What is the capital of France?" } ] } ], "references": { "answer": "Paris" } }, "response": { "parts": [ { "text": "London" } ] }, "metadata": { "step": 1, "tuning_job_id": 123456789 } } ``` Example HTTP response body: ``` { "reward": -1.0 } ``` Note: Reward output by Cloud Run reward function is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. This data type is not supported in Gemini API. */
|
|
10628
10838
|
export declare interface ReinforcementTuningCloudRunRewardScorer {
|
|
10629
|
-
/** URI of the Cloud Run service that will be used to compute the reward. The Vertex AI Secure Fine Tuning Service Agent (`service
|
|
10839
|
+
/** URI of the Cloud Run service that will be used to compute the reward. The [Vertex AI Secure Fine Tuning Service Agent](https://docs.cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent) (`service-@gcp-sa-vertex-tune.iam.gserviceaccount.com`) must be granted the permission (e.g. by granting `roles/run.invoker` in IAM) to invoke the Cloud Run service. */
|
|
10630
10840
|
cloudRunUri?: string;
|
|
10631
10841
|
}
|
|
10632
10842
|
|
|
10633
|
-
/**
|
|
10843
|
+
/** ReinforcementTuningCodeExecutionRewardScorer allows users to implement a function to evaluate rewards for the sample response. The function signature is as follows: ``` def evaluate(example: dict[str, Any], response: dict[str, Any]) -> float: ... ``` `example` is a ReinforcementTuningExample in ProtoJSON format, (i.e., the format is the same as as one line in the training/validation dataset except that the keys must be in camel case). System instructions (i.e., `example.get("systemInstruction")`) and references (i.e., `example.get("references")`) are also included in the `example` provided that they are set in the training/validation dataset. `response` is a Content in ProtoJSON format (i.e., keys must be in camel case), which is the same as the Online Prediction response for Gemini models. Note: Reward output by the `evaluate` function is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. This data type is not supported in Gemini API. */
|
|
10634
10844
|
export declare interface ReinforcementTuningCodeExecutionRewardScorer {
|
|
10635
|
-
/**
|
|
10845
|
+
/** The python code snippet as a string for evaluating rewards. The following is an example python code snippet that returns a reward `1.0` for a parsed response matching the user-provided reference answer in per prompt references map. ``` def evaluate(example, response) -> float: response_str = response.get("parts", [])0 references = example.get("references", {}) if response_str == references.get("concise_answer"): return 1.0 return -1.0 ``` Note: Reward output by the evaluate function is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. */
|
|
10636
10846
|
pythonCodeSnippet?: string;
|
|
10637
10847
|
}
|
|
10638
10848
|
|
|
@@ -10642,37 +10852,39 @@ export declare interface ReinforcementTuningExample {
|
|
|
10642
10852
|
contents?: Content[];
|
|
10643
10853
|
/** References for the given prompt. The key is the name of the reference, and the value is the reference itself. */
|
|
10644
10854
|
references?: Record<string, string>;
|
|
10645
|
-
/** Corresponds to
|
|
10855
|
+
/** Corresponds to system_instruction in user-facing GenerateContentRequest. */
|
|
10646
10856
|
systemInstruction?: Content;
|
|
10647
10857
|
}
|
|
10648
10858
|
|
|
10649
10859
|
/** Hyperparameters for Reinforcement Tuning. */
|
|
10650
10860
|
export declare interface ReinforcementTuningHyperParameters {
|
|
10651
|
-
/** Number of training
|
|
10861
|
+
/** Optional. Number of training epoches for the tuning job. */
|
|
10652
10862
|
epochCount?: string;
|
|
10653
10863
|
/** Learning rate multiplier for Reinforcement Learning. */
|
|
10654
10864
|
learningRateMultiplier?: number;
|
|
10655
|
-
/** Adapter size for Reinforcement Tuning. */
|
|
10865
|
+
/** Optional. Adapter size for Reinforcement Tuning. */
|
|
10656
10866
|
adapterSize?: AdapterSize;
|
|
10657
|
-
/** Number of different responses to generate per prompt during tuning. */
|
|
10867
|
+
/** Optional. Number of different responses to generate per prompt during tuning. */
|
|
10658
10868
|
samplesPerPrompt?: number;
|
|
10659
|
-
/** Batch size for the tuning job. How many prompts to process at a train step. If not set, the batch size will be determined automatically. */
|
|
10869
|
+
/** Optional. Batch size for the tuning job. How many prompts to process at a train step. If not set, the batch size will be determined automatically. */
|
|
10660
10870
|
batchSize?: number;
|
|
10661
|
-
/** How often
|
|
10871
|
+
/** Optional. How often at steps to evaluate the tuning job during training. If not set, evel will be run per epoch. `total_steps = epoch_count * samples_per_prompt / total_prompts_in_dataset` */
|
|
10662
10872
|
evaluateInterval?: number;
|
|
10663
|
-
/** How often
|
|
10873
|
+
/** Optional. How often at steps to save checkpoints during training. If not set, one checkpoint per epoch will be set. ```total_steps = epoch_count * samples_per_prompt / total_prompts_in_dataset``` */
|
|
10664
10874
|
checkpointInterval?: number;
|
|
10665
|
-
/** The maximum number of tokens to generate per prompt.
|
|
10875
|
+
/** Optional. The maximum number of tokens to generate per prompt. Default to 32768. */
|
|
10666
10876
|
maxOutputTokens?: number;
|
|
10667
|
-
/** Indicates the maximum thinking depth.
|
|
10877
|
+
/** Indicates the maximum thinking depth during tuning. Starting from Gemini 3.5 models, the old thinking_budget will no longer be supported and will result in a user error if set. Instead, users should use the thinking_level parameter to control the maximum thinking depth. */
|
|
10668
10878
|
thinkingLevel?: ReinforcementTuningThinkingLevel;
|
|
10879
|
+
/** Optional. The thinking budget for the tuning job to optimize for (Gemini 2.5 only). * -1 means dynamic thinking * 0 means no thinking * > 0 means thinking budget in tokens If not set, default to -1 (dynamic thinking). */
|
|
10880
|
+
thinkingBudget?: number;
|
|
10669
10881
|
}
|
|
10670
10882
|
|
|
10671
|
-
/** Defines how to parse sample response for reinforcement tuning. */
|
|
10883
|
+
/** Defines how to parse sample response config for reinforcement tuning. The parsed response (i.e., substring) will be passed to the reward functions. For example, the input prompt might be: > "Perform step-by-step thoughts first to problem A, finally output answer in the <ans> </ans> block." The sample response from the model under tuning might look like: > "<ans>Yes</ans>" Here, users can define the following parse config: ``` { "parseType": "REGEX_EXTRACT", "regexExtractExpression": ".*(.*?)" } ``` The resulting parsed response would be `"Yes"` and will be passed to the reward functions for evaluating rewards. This data type is not supported in Gemini API. */
|
|
10672
10884
|
export declare class ReinforcementTuningParseResponseConfig {
|
|
10673
|
-
/** Defines
|
|
10885
|
+
/** Defines the type for parsing sample response. */
|
|
10674
10886
|
parseType?: ResponseParseType;
|
|
10675
|
-
/** Defines the regex
|
|
10887
|
+
/** Defines the regex for extracting the important part of sample response. This field is only used when parse_type is ResponseParseType.REGEX_EXTRACT. */
|
|
10676
10888
|
regexExtractExpression?: string;
|
|
10677
10889
|
}
|
|
10678
10890
|
|
|
@@ -10680,16 +10892,17 @@ export declare class ReinforcementTuningParseResponseConfig {
|
|
|
10680
10892
|
export declare interface ReinforcementTuningRewardInfo {
|
|
10681
10893
|
/** Output only. The calculated reward for the reward function. */
|
|
10682
10894
|
reward?: number;
|
|
10683
|
-
/** Output only. The user-requested auxiliary info for the reward function. */
|
|
10895
|
+
/** Output only. The user-requested auxiliary info for the reward function. This field is set only if the Cloud Run reward function configured by user returns a "user_requested_aux_info". Refer to ReinforcementTuningCloudRunRewardScorer for more details. */
|
|
10684
10896
|
userRequestedAuxInfo?: string;
|
|
10685
10897
|
}
|
|
10686
10898
|
|
|
10687
10899
|
/** Reinforcement tuning spec for tuning. */
|
|
10688
10900
|
export declare interface ReinforcementTuningSpec {
|
|
10901
|
+
/** Composite reward function configuration for reinforcement tuning. */
|
|
10689
10902
|
compositeRewardConfig?: CompositeReinforcementTuningRewardConfig;
|
|
10690
|
-
/** Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
10903
|
+
/** Cloud Storage path to the file containing training dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
10691
10904
|
trainingDatasetUri?: string;
|
|
10692
|
-
/** Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.
|
|
10905
|
+
/** Cloud Storage path to the file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
10693
10906
|
validationDatasetUri?: string;
|
|
10694
10907
|
/** Additional hyper-parameters to use during tuning. */
|
|
10695
10908
|
hyperParameters?: ReinforcementTuningHyperParameters;
|
|
@@ -10697,11 +10910,11 @@ export declare interface ReinforcementTuningSpec {
|
|
|
10697
10910
|
singleRewardConfig?: SingleReinforcementTuningRewardConfig;
|
|
10698
10911
|
}
|
|
10699
10912
|
|
|
10700
|
-
/**
|
|
10913
|
+
/** ReinforcementTuningStringMatchRewardScorer is used to score parsed responses for string matching use cases. For example, for math problems, users can use string match scorer to check if the correct exact answer is generated. Note: Reward returned by the string match reward function is clipped to be within `[-1, 1]` if wrongAnswerReward or correctAnswerReward are beyond the range, i.e., `reward = max(min(reward, 1.0), -1.0)`. This data type is not supported in Gemini API. */
|
|
10701
10914
|
export declare interface ReinforcementTuningStringMatchRewardScorer {
|
|
10702
|
-
/** Wrong answer reward is returned if
|
|
10915
|
+
/** Wrong answer reward is returned if the parsed response is evaluated as `false`. All wrong answers get the same reward. */
|
|
10703
10916
|
wrongAnswerReward?: number;
|
|
10704
|
-
/** Correct answer
|
|
10917
|
+
/** Correct answer rewawrd is returned if the parsed response is evaluated as `true`. All correct answers get the same reward. */
|
|
10705
10918
|
correctAnswerReward?: number;
|
|
10706
10919
|
/** Uses string match expression to evaluate parsed response. */
|
|
10707
10920
|
stringMatchExpression?: ReinforcementTuningStringMatchRewardScorerStringMatchExpression;
|
|
@@ -10709,19 +10922,19 @@ export declare interface ReinforcementTuningStringMatchRewardScorer {
|
|
|
10709
10922
|
jsonMatchExpression?: ReinforcementTuningStringMatchRewardScorerJsonMatchExpression;
|
|
10710
10923
|
}
|
|
10711
10924
|
|
|
10712
|
-
/**
|
|
10925
|
+
/** JsonMatchExpression supports converting the parsed responses to JSON format, finding the value in the JSON response that matches the key_name in the first level, and performing StringMatchExpression operation on the matched JSON value. This data type is not supported in Gemini API. */
|
|
10713
10926
|
export declare interface ReinforcementTuningStringMatchRewardScorerJsonMatchExpression {
|
|
10714
|
-
/**
|
|
10927
|
+
/** The key name to find the value in the parsed response that's in JSON format. Only first-level key matching is supported. */
|
|
10715
10928
|
keyName?: string;
|
|
10716
|
-
/** String match expression to match against the value of
|
|
10929
|
+
/** String match expression to match against the extracted value from the JSON representation of the parsed response. */
|
|
10717
10930
|
valueStringMatchExpression?: ReinforcementTuningStringMatchRewardScorerStringMatchExpression;
|
|
10718
10931
|
}
|
|
10719
10932
|
|
|
10720
|
-
/** Evaluates parsed response using match type against expression. */
|
|
10933
|
+
/** Evaluates parsed response using match type against the expression. Returns `true` if `MatchOperation(target, expression)` evaluates to `true`, and `false` otherwise. This data type is not supported in Gemini API. */
|
|
10721
10934
|
export declare interface ReinforcementTuningStringMatchRewardScorerStringMatchExpression {
|
|
10722
|
-
/** Match operation to use for
|
|
10935
|
+
/** Match operation to use for evaluating rewards. */
|
|
10723
10936
|
matchOperation?: MatchOperation;
|
|
10724
|
-
/**
|
|
10937
|
+
/** A string or a regular expression to match against for evaluating rewards. Users can also provide a references map of `{key: value}` whose `value` will be used to replace the placeholder {{references.key}} in the expression. For example, if the following `references` are defined in the training / validation dataset: ``` { "systemInstruction": ..., "contents": ..., "references": { "concise_answer": "Yes", "verbose_answer": "The answer is Yes" } } ``` and if users define the following StringMatchExpression: { "matchOperation": "REGEX_CONTAINS", "expression": ".*{{references.concise_answer}}.*" } On evaluating the reward for each sample response, this StringMatchExpression will be substituted as: ``` { "matchOperation": "REGEX_CONTAINS", "expression": ".*Yes.*" } ``` */
|
|
10725
10938
|
expression?: string;
|
|
10726
10939
|
}
|
|
10727
10940
|
|
|
@@ -10741,6 +10954,12 @@ export declare enum ReinforcementTuningThinkingLevel {
|
|
|
10741
10954
|
HIGH = "HIGH"
|
|
10742
10955
|
}
|
|
10743
10956
|
|
|
10957
|
+
/** Sample reinforcement tuning user data in the training dataset. The contents are truncated for better UI showing. This data type is not supported in Gemini API. */
|
|
10958
|
+
export declare interface ReinforcementTuningUserDatasetExamples {
|
|
10959
|
+
/** List of user datasset examples showing to user. */
|
|
10960
|
+
userDatasetExamples?: ReinforcementTuningExample[];
|
|
10961
|
+
}
|
|
10962
|
+
|
|
10744
10963
|
/** Represents a recorded session. */
|
|
10745
10964
|
export declare interface ReplayFile {
|
|
10746
10965
|
replayId?: string;
|
|
@@ -10780,6 +10999,17 @@ export declare interface ReplicatedVoiceConfig {
|
|
|
10780
10999
|
|
|
10781
11000
|
* @remarks Encoded as base64 string. */
|
|
10782
11001
|
voiceSampleAudio?: string;
|
|
11002
|
+
/** Recorded consent verifying ownership of the voice. This
|
|
11003
|
+
represents 16-bit signed little-endian wav data, with a 24kHz sampling
|
|
11004
|
+
rate.
|
|
11005
|
+
* @remarks Encoded as base64 string. */
|
|
11006
|
+
consentAudio?: string;
|
|
11007
|
+
/** Signature of a previously verified consent audio. This should be
|
|
11008
|
+
populated with a signature generated by the server for a previous
|
|
11009
|
+
request containing the consent_audio field. When provided, the
|
|
11010
|
+
signature is verified instead of the consent_audio field to reduce
|
|
11011
|
+
latency. Requests will fail if the signature is invalid or expired. */
|
|
11012
|
+
voiceConsentSignature?: VoiceConsentSignature;
|
|
10783
11013
|
}
|
|
10784
11014
|
|
|
10785
11015
|
declare type RequestOptions = {
|
|
@@ -10836,7 +11066,19 @@ export declare enum ResourceScope {
|
|
|
10836
11066
|
COLLECTION = "COLLECTION"
|
|
10837
11067
|
}
|
|
10838
11068
|
|
|
10839
|
-
|
|
11069
|
+
/** Configuration for the model to configure output formatting and delivery. This data type is not supported in Gemini API. */
|
|
11070
|
+
export declare class ResponseFormat {
|
|
11071
|
+
/** Audio output format. */
|
|
11072
|
+
audio?: AudioResponseFormat;
|
|
11073
|
+
/** Image output format. */
|
|
11074
|
+
image?: ImageResponseFormat;
|
|
11075
|
+
/** Text output format. */
|
|
11076
|
+
text?: TextResponseFormat;
|
|
11077
|
+
/** Video output format. */
|
|
11078
|
+
video?: VideoResponseFormat;
|
|
11079
|
+
}
|
|
11080
|
+
|
|
11081
|
+
declare type ResponseFormat_2 = AudioResponseFormat_2 | TextResponseFormat_2 | ImageResponseFormat_2 | VideoResponseFormat_2 | {
|
|
10840
11082
|
[k: string]: any;
|
|
10841
11083
|
};
|
|
10842
11084
|
|
|
@@ -10849,18 +11091,18 @@ declare type ResponseFormat = AudioResponseFormat | TextResponseFormat | ImageRe
|
|
|
10849
11091
|
*/
|
|
10850
11092
|
declare type ResponseModality = "text" | "image" | "audio" | "video" | "document" | (string & {});
|
|
10851
11093
|
|
|
10852
|
-
/** Defines
|
|
11094
|
+
/** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
|
|
10853
11095
|
export declare enum ResponseParseType {
|
|
10854
11096
|
/**
|
|
10855
|
-
* Default value.
|
|
11097
|
+
* Default value. Fallback to IDENTITY
|
|
10856
11098
|
*/
|
|
10857
11099
|
RESPONSE_PARSE_TYPE_UNSPECIFIED = "RESPONSE_PARSE_TYPE_UNSPECIFIED",
|
|
10858
11100
|
/**
|
|
10859
|
-
*
|
|
11101
|
+
* Returns the sample response as is.
|
|
10860
11102
|
*/
|
|
10861
11103
|
IDENTITY = "IDENTITY",
|
|
10862
11104
|
/**
|
|
10863
|
-
*
|
|
11105
|
+
* Uses regex to extract the important part of sample response. Similar to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_extract) `REGEX_EXTRACT(response, regex_extract_expression)`, but different in that if there are multiple matches, the last match will be returned.
|
|
10864
11106
|
*/
|
|
10865
11107
|
REGEX_EXTRACT = "REGEX_EXTRACT"
|
|
10866
11108
|
}
|
|
@@ -10889,29 +11131,77 @@ export declare interface Retrieval {
|
|
|
10889
11131
|
* A tool that can be used by the model to retrieve files.
|
|
10890
11132
|
*/
|
|
10891
11133
|
declare type Retrieval_2 = {
|
|
10892
|
-
|
|
11134
|
+
/**
|
|
11135
|
+
* Used to specify configuration for ExaAISearch.
|
|
11136
|
+
*/
|
|
11137
|
+
exa_ai_search_config?: ExaAISearchConfig | undefined;
|
|
11138
|
+
/**
|
|
11139
|
+
* Used to specify configuration for ParallelAISearch.
|
|
11140
|
+
*/
|
|
11141
|
+
parallel_ai_search_config?: ParallelAISearchConfig | undefined;
|
|
11142
|
+
/**
|
|
11143
|
+
* Use to specify configuration for RAG Store.
|
|
11144
|
+
*/
|
|
11145
|
+
rag_store_config?: RagStoreConfig | undefined;
|
|
10893
11146
|
/**
|
|
10894
11147
|
* The types of file retrieval to enable.
|
|
10895
11148
|
*/
|
|
10896
|
-
retrieval_types?: Array<
|
|
11149
|
+
retrieval_types?: Array<RetrievalRetrievalType> | undefined;
|
|
11150
|
+
type: "retrieval";
|
|
10897
11151
|
/**
|
|
10898
11152
|
* Used to specify configuration for VertexAISearch.
|
|
10899
11153
|
*/
|
|
10900
11154
|
vertex_ai_search_config?: VertexAISearchConfig | undefined;
|
|
11155
|
+
};
|
|
11156
|
+
|
|
11157
|
+
declare type RetrievalCallArguments$ = RetrievalCallArguments;
|
|
11158
|
+
|
|
11159
|
+
/**
|
|
11160
|
+
* @license
|
|
11161
|
+
* Copyright 2026 Google LLC
|
|
11162
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
11163
|
+
*
|
|
11164
|
+
* g3-prettier-ignore-file
|
|
11165
|
+
*/
|
|
11166
|
+
/**
|
|
11167
|
+
* The arguments to pass to Retrieval tools.
|
|
11168
|
+
*/
|
|
11169
|
+
declare type RetrievalCallArguments = {
|
|
10901
11170
|
/**
|
|
10902
|
-
*
|
|
11171
|
+
* Queries for Retrieval information.
|
|
10903
11172
|
*/
|
|
10904
|
-
|
|
11173
|
+
queries?: Array<string> | undefined;
|
|
11174
|
+
};
|
|
11175
|
+
|
|
11176
|
+
declare type RetrievalCallDelta$ = RetrievalCallDelta;
|
|
11177
|
+
|
|
11178
|
+
/**
|
|
11179
|
+
* Used by Vertex Retrieval tools such as Parallel AI, Exa AI, Vertex AI Search,
|
|
11180
|
+
*
|
|
11181
|
+
* @remarks
|
|
11182
|
+
* etc. RetrievalType decides which tool is used.
|
|
11183
|
+
*/
|
|
11184
|
+
declare type RetrievalCallDelta = {
|
|
10905
11185
|
/**
|
|
10906
|
-
*
|
|
11186
|
+
* The arguments to pass to Retrieval tools.
|
|
10907
11187
|
*/
|
|
10908
|
-
|
|
11188
|
+
arguments: RetrievalCallArguments;
|
|
10909
11189
|
/**
|
|
10910
|
-
*
|
|
11190
|
+
* The type of retrieval tools.
|
|
10911
11191
|
*/
|
|
10912
|
-
|
|
11192
|
+
retrieval_type?: RetrievalCallDeltaRetrievalType | undefined;
|
|
11193
|
+
/**
|
|
11194
|
+
* A signature hash for backend validation.
|
|
11195
|
+
*/
|
|
11196
|
+
signature?: string | undefined;
|
|
11197
|
+
type: "retrieval_call";
|
|
10913
11198
|
};
|
|
10914
11199
|
|
|
11200
|
+
/**
|
|
11201
|
+
* The type of retrieval tools.
|
|
11202
|
+
*/
|
|
11203
|
+
declare type RetrievalCallDeltaRetrievalType = "vertex_ai_search" | "rag_store" | "exa_ai_search" | "parallel_ai_search" | (string & {});
|
|
11204
|
+
|
|
10915
11205
|
/** Retrieval config. */
|
|
10916
11206
|
export declare interface RetrievalConfig {
|
|
10917
11207
|
/** The location of the user. */
|
|
@@ -10931,7 +11221,35 @@ export declare interface RetrievalMetadata {
|
|
|
10931
11221
|
googleSearchDynamicRetrievalScore?: number;
|
|
10932
11222
|
}
|
|
10933
11223
|
|
|
10934
|
-
declare type
|
|
11224
|
+
declare type RetrievalResultDelta$ = RetrievalResultDelta;
|
|
11225
|
+
|
|
11226
|
+
/**
|
|
11227
|
+
* @license
|
|
11228
|
+
* Copyright 2026 Google LLC
|
|
11229
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
11230
|
+
*
|
|
11231
|
+
* g3-prettier-ignore-file
|
|
11232
|
+
*/
|
|
11233
|
+
/**
|
|
11234
|
+
* Used by Vertex Retrieval tools such as Parallel AI, Exa AI, Vertex AI Search,
|
|
11235
|
+
*
|
|
11236
|
+
* @remarks
|
|
11237
|
+
* etc.
|
|
11238
|
+
* ToolResultDelta.type
|
|
11239
|
+
*/
|
|
11240
|
+
declare type RetrievalResultDelta = {
|
|
11241
|
+
/**
|
|
11242
|
+
* Whether the retrieval resulted in an error.
|
|
11243
|
+
*/
|
|
11244
|
+
is_error?: boolean | undefined;
|
|
11245
|
+
/**
|
|
11246
|
+
* A signature hash for backend validation.
|
|
11247
|
+
*/
|
|
11248
|
+
signature?: string | undefined;
|
|
11249
|
+
type: "retrieval_result";
|
|
11250
|
+
};
|
|
11251
|
+
|
|
11252
|
+
declare type RetrievalRetrievalType = "vertex_ai_search" | "rag_store" | "exa_ai_search" | "parallel_ai_search" | (string & {});
|
|
10935
11253
|
|
|
10936
11254
|
declare type RetryConfig = {
|
|
10937
11255
|
strategy: "none";
|
|
@@ -10966,6 +11284,10 @@ declare type ReviewSnippet$3 = ReviewSnippet;
|
|
|
10966
11284
|
* the features of a specific place in Google Maps.
|
|
10967
11285
|
*/
|
|
10968
11286
|
declare type ReviewSnippet = {
|
|
11287
|
+
/**
|
|
11288
|
+
* The ID of the review snippet.
|
|
11289
|
+
*/
|
|
11290
|
+
review_id?: string | undefined;
|
|
10969
11291
|
/**
|
|
10970
11292
|
* Title of the review.
|
|
10971
11293
|
*/
|
|
@@ -10974,10 +11296,6 @@ declare type ReviewSnippet = {
|
|
|
10974
11296
|
* A link that corresponds to the user review on Google Maps.
|
|
10975
11297
|
*/
|
|
10976
11298
|
url?: string | undefined;
|
|
10977
|
-
/**
|
|
10978
|
-
* The ID of the review snippet.
|
|
10979
|
-
*/
|
|
10980
|
-
review_id?: string | undefined;
|
|
10981
11299
|
};
|
|
10982
11300
|
|
|
10983
11301
|
/**
|
|
@@ -11028,8 +11346,44 @@ export declare enum SafetyFilterLevel {
|
|
|
11028
11346
|
BLOCK_NONE = "BLOCK_NONE"
|
|
11029
11347
|
}
|
|
11030
11348
|
|
|
11031
|
-
/**
|
|
11032
|
-
export declare
|
|
11349
|
+
/** SafetyPolicy */
|
|
11350
|
+
export declare enum SafetyPolicy {
|
|
11351
|
+
/**
|
|
11352
|
+
* Unspecified safety policy.
|
|
11353
|
+
*/
|
|
11354
|
+
SAFETY_POLICY_UNSPECIFIED = "SAFETY_POLICY_UNSPECIFIED",
|
|
11355
|
+
/**
|
|
11356
|
+
* Safety policy for financial transactions.
|
|
11357
|
+
*/
|
|
11358
|
+
FINANCIAL_TRANSACTIONS = "FINANCIAL_TRANSACTIONS",
|
|
11359
|
+
/**
|
|
11360
|
+
* Safety policy for sensitive data modification.
|
|
11361
|
+
*/
|
|
11362
|
+
SENSITIVE_DATA_MODIFICATION = "SENSITIVE_DATA_MODIFICATION",
|
|
11363
|
+
/**
|
|
11364
|
+
* Safety policy for communication tools (e.g. Gmail, Chat, Meet).
|
|
11365
|
+
*/
|
|
11366
|
+
COMMUNICATION_TOOL = "COMMUNICATION_TOOL",
|
|
11367
|
+
/**
|
|
11368
|
+
* Safety policy for account creation.
|
|
11369
|
+
*/
|
|
11370
|
+
ACCOUNT_CREATION = "ACCOUNT_CREATION",
|
|
11371
|
+
/**
|
|
11372
|
+
* Safety policy for data modification.
|
|
11373
|
+
*/
|
|
11374
|
+
DATA_MODIFICATION = "DATA_MODIFICATION",
|
|
11375
|
+
/**
|
|
11376
|
+
* Safety policy for user consent management.
|
|
11377
|
+
*/
|
|
11378
|
+
USER_CONSENT_MANAGEMENT = "USER_CONSENT_MANAGEMENT",
|
|
11379
|
+
/**
|
|
11380
|
+
* Safety policy for legal terms and agreements.
|
|
11381
|
+
*/
|
|
11382
|
+
LEGAL_TERMS_AND_AGREEMENTS = "LEGAL_TERMS_AND_AGREEMENTS"
|
|
11383
|
+
}
|
|
11384
|
+
|
|
11385
|
+
/** A safety rating for a piece of content. The safety rating contains the harm category and the harm probability level. */
|
|
11386
|
+
export declare interface SafetyRating {
|
|
11033
11387
|
/** Output only. Indicates whether the content was blocked because of this rating. */
|
|
11034
11388
|
blocked?: boolean;
|
|
11035
11389
|
/** Output only. The harm category of this rating. */
|
|
@@ -11046,6 +11400,8 @@ export declare interface SafetyRating {
|
|
|
11046
11400
|
severityScore?: number;
|
|
11047
11401
|
}
|
|
11048
11402
|
|
|
11403
|
+
declare type SafetySetting$ = SafetySetting_2;
|
|
11404
|
+
|
|
11049
11405
|
/** A safety setting that affects the safety-blocking behavior. A SafetySetting consists of a harm category and a threshold for that category. */
|
|
11050
11406
|
export declare interface SafetySetting {
|
|
11051
11407
|
/** Required. The harm category to be blocked. */
|
|
@@ -11056,6 +11412,34 @@ export declare interface SafetySetting {
|
|
|
11056
11412
|
threshold?: HarmBlockThreshold;
|
|
11057
11413
|
}
|
|
11058
11414
|
|
|
11415
|
+
/**
|
|
11416
|
+
* A safety setting that affects the safety-blocking behavior.
|
|
11417
|
+
*
|
|
11418
|
+
* @remarks
|
|
11419
|
+
*
|
|
11420
|
+
* A SafetySetting consists of a
|
|
11421
|
+
* harm category and a
|
|
11422
|
+
* threshold for that
|
|
11423
|
+
* category.
|
|
11424
|
+
*/
|
|
11425
|
+
declare type SafetySetting_2 = {
|
|
11426
|
+
/**
|
|
11427
|
+
* Optional. The method for blocking content. If not specified, the default
|
|
11428
|
+
*
|
|
11429
|
+
* @remarks
|
|
11430
|
+
* behavior is to use the probability score.
|
|
11431
|
+
*/
|
|
11432
|
+
method?: Method | undefined;
|
|
11433
|
+
/**
|
|
11434
|
+
* Required. The threshold for blocking content. If the harm probability
|
|
11435
|
+
*
|
|
11436
|
+
* @remarks
|
|
11437
|
+
* exceeds this threshold, the content will be blocked.
|
|
11438
|
+
*/
|
|
11439
|
+
threshold: Threshold;
|
|
11440
|
+
type: HarmCategory_2;
|
|
11441
|
+
};
|
|
11442
|
+
|
|
11059
11443
|
/** Scale of the generated music. */
|
|
11060
11444
|
export declare enum Scale {
|
|
11061
11445
|
/**
|
|
@@ -11336,6 +11720,7 @@ declare type ServiceTier_2 = "flex" | "standard" | "priority" | (string & {});
|
|
|
11336
11720
|
export declare class Session {
|
|
11337
11721
|
readonly conn: WebSocket_2;
|
|
11338
11722
|
private readonly apiClient;
|
|
11723
|
+
setupComplete?: types.LiveServerSetupComplete;
|
|
11339
11724
|
constructor(conn: WebSocket_2, apiClient: ApiClient);
|
|
11340
11725
|
private tLiveClientContent;
|
|
11341
11726
|
private tLiveClienttToolResponse;
|
|
@@ -11501,14 +11886,14 @@ declare type SigningSecret$ = SigningSecret;
|
|
|
11501
11886
|
* Represents a signing secret used to verify webhook payloads.
|
|
11502
11887
|
*/
|
|
11503
11888
|
declare type SigningSecret = {
|
|
11504
|
-
/**
|
|
11505
|
-
* Output only. The truncated version of the signing secret.
|
|
11506
|
-
*/
|
|
11507
|
-
truncated_secret?: string | undefined;
|
|
11508
11889
|
/**
|
|
11509
11890
|
* Output only. The expiration date of the signing secret.
|
|
11510
11891
|
*/
|
|
11511
11892
|
expire_time?: string | undefined;
|
|
11893
|
+
/**
|
|
11894
|
+
* Output only. The truncated version of the signing secret.
|
|
11895
|
+
*/
|
|
11896
|
+
truncated_secret?: string | undefined;
|
|
11512
11897
|
};
|
|
11513
11898
|
|
|
11514
11899
|
/** Config for `response` parameter. */
|
|
@@ -11525,15 +11910,15 @@ export declare class SingleEmbedContentResponse {
|
|
|
11525
11910
|
export declare interface SingleReinforcementTuningRewardConfig {
|
|
11526
11911
|
/** Scores parsed responses for autorater use cases by using a model to compute the reward. */
|
|
11527
11912
|
autoraterScorer?: ReinforcementTuningAutoraterScorer;
|
|
11528
|
-
/** A unique reward name
|
|
11913
|
+
/** A unique reward name for identifying each single reinforcement tuning reward. */
|
|
11529
11914
|
rewardName?: string;
|
|
11530
|
-
/** Defines how to parse sample response. */
|
|
11915
|
+
/** Defines how to parse sample response. For example, given a sample response for evaluating the reward, users might want to extract the text only between `` and `` in the sample response, and keeps only the last one in case there are multiple such tags. To achieve such a purpose, they can define a regex `".*(.*?)"` using the ReinforcementTuningParseResponseConfig.ResponseParseType.REGEX_EXTRACT parse type. */
|
|
11531
11916
|
parseResponseConfig?: ReinforcementTuningParseResponseConfig;
|
|
11532
|
-
/**
|
|
11917
|
+
/** ReinforcementTuningCodeExecutionRewardScorer is used to score parsed responses for code execution use cases. */
|
|
11533
11918
|
codeExecutionRewardScorer?: ReinforcementTuningCodeExecutionRewardScorer;
|
|
11534
|
-
/**
|
|
11919
|
+
/** ReinforcementTuningStringMatchRewardScorer is used to score parsed responses for simple string matching use cases against reference answers. */
|
|
11535
11920
|
stringMatchRewardScorer?: ReinforcementTuningStringMatchRewardScorer;
|
|
11536
|
-
/**
|
|
11921
|
+
/** ReinforcementTuningCloudRunRewardScorer is used to score parsed responses by calling a Cloud Run service. */
|
|
11537
11922
|
cloudRunRewardScorer?: ReinforcementTuningCloudRunRewardScorer;
|
|
11538
11923
|
}
|
|
11539
11924
|
|
|
@@ -11554,7 +11939,14 @@ declare type Source$ = Source;
|
|
|
11554
11939
|
* A source to be mounted into the environment.
|
|
11555
11940
|
*/
|
|
11556
11941
|
declare type Source = {
|
|
11557
|
-
|
|
11942
|
+
/**
|
|
11943
|
+
* The inline content if `type` is `INLINE`.
|
|
11944
|
+
*/
|
|
11945
|
+
content?: string | undefined;
|
|
11946
|
+
/**
|
|
11947
|
+
* Optional encoding for inline content (e.g. `base64`).
|
|
11948
|
+
*/
|
|
11949
|
+
encoding?: string | undefined;
|
|
11558
11950
|
/**
|
|
11559
11951
|
* The source of the environment.
|
|
11560
11952
|
*
|
|
@@ -11567,14 +11959,7 @@ declare type Source = {
|
|
|
11567
11959
|
* Where the source should appear in the environment.
|
|
11568
11960
|
*/
|
|
11569
11961
|
target?: string | undefined;
|
|
11570
|
-
|
|
11571
|
-
* The inline content if `type` is `INLINE`.
|
|
11572
|
-
*/
|
|
11573
|
-
content?: string | undefined;
|
|
11574
|
-
/**
|
|
11575
|
-
* Optional encoding for inline content (e.g. `base64`).
|
|
11576
|
-
*/
|
|
11577
|
-
encoding?: string | undefined;
|
|
11962
|
+
type?: SourceType | undefined;
|
|
11578
11963
|
};
|
|
11579
11964
|
|
|
11580
11965
|
/**
|
|
@@ -11617,10 +12002,6 @@ export declare interface SpeechConfig {
|
|
|
11617
12002
|
* The configuration for speech interaction.
|
|
11618
12003
|
*/
|
|
11619
12004
|
declare type SpeechConfig_2 = {
|
|
11620
|
-
/**
|
|
11621
|
-
* The voice of the speaker.
|
|
11622
|
-
*/
|
|
11623
|
-
voice?: string | undefined;
|
|
11624
12005
|
/**
|
|
11625
12006
|
* The language of the speech.
|
|
11626
12007
|
*/
|
|
@@ -11629,6 +12010,10 @@ declare type SpeechConfig_2 = {
|
|
|
11629
12010
|
* The speaker's name, it should match the speaker name given in the prompt.
|
|
11630
12011
|
*/
|
|
11631
12012
|
speaker?: string | undefined;
|
|
12013
|
+
/**
|
|
12014
|
+
* The voice of the speaker.
|
|
12015
|
+
*/
|
|
12016
|
+
voice?: string | undefined;
|
|
11632
12017
|
};
|
|
11633
12018
|
|
|
11634
12019
|
export declare type SpeechConfigUnion = SpeechConfig | string;
|
|
@@ -11656,6 +12041,48 @@ export declare enum StartSensitivity {
|
|
|
11656
12041
|
START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW"
|
|
11657
12042
|
}
|
|
11658
12043
|
|
|
12044
|
+
/**
|
|
12045
|
+
* @license
|
|
12046
|
+
* Copyright 2026 Google LLC
|
|
12047
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
12048
|
+
*
|
|
12049
|
+
* g3-prettier-ignore-file
|
|
12050
|
+
*/
|
|
12051
|
+
/**
|
|
12052
|
+
* The `Status` type defines a logical error model that is suitable for
|
|
12053
|
+
*
|
|
12054
|
+
* @remarks
|
|
12055
|
+
* different programming environments, including REST APIs and RPC APIs. It is
|
|
12056
|
+
* used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
|
12057
|
+
* three pieces of data: error code, error message, and error details.
|
|
12058
|
+
*
|
|
12059
|
+
* You can find out more about this error model and how to work with it in the
|
|
12060
|
+
* [API Design Guide](https://cloud.google.com/apis/design/errors).
|
|
12061
|
+
*/
|
|
12062
|
+
declare type Status = {
|
|
12063
|
+
/**
|
|
12064
|
+
* The status code, which should be an enum value of google.rpc.Code.
|
|
12065
|
+
*/
|
|
12066
|
+
code?: number | undefined;
|
|
12067
|
+
/**
|
|
12068
|
+
* A list of messages that carry the error details. There is a common set of
|
|
12069
|
+
*
|
|
12070
|
+
* @remarks
|
|
12071
|
+
* message types for APIs to use.
|
|
12072
|
+
*/
|
|
12073
|
+
details?: Array<{
|
|
12074
|
+
[k: string]: any;
|
|
12075
|
+
}> | undefined;
|
|
12076
|
+
/**
|
|
12077
|
+
* A developer-facing error message, which should be in English. Any
|
|
12078
|
+
*
|
|
12079
|
+
* @remarks
|
|
12080
|
+
* user-facing error message should be localized and sent in the
|
|
12081
|
+
* google.rpc.Status.details field, or localized by the client.
|
|
12082
|
+
*/
|
|
12083
|
+
message?: string | undefined;
|
|
12084
|
+
};
|
|
12085
|
+
|
|
11659
12086
|
declare type Step$ = Step;
|
|
11660
12087
|
|
|
11661
12088
|
/**
|
|
@@ -11666,8 +12093,6 @@ declare type Step = UserInputStep | ModelOutputStep | ThoughtStep | FunctionCall
|
|
|
11666
12093
|
declare type StepDelta$ = StepDelta;
|
|
11667
12094
|
|
|
11668
12095
|
declare type StepDelta = {
|
|
11669
|
-
event_type: "step.delta";
|
|
11670
|
-
index: number;
|
|
11671
12096
|
delta: StepDeltaData;
|
|
11672
12097
|
/**
|
|
11673
12098
|
* The event_id token to be used to resume the interaction stream, from
|
|
@@ -11676,13 +12101,15 @@ declare type StepDelta = {
|
|
|
11676
12101
|
* this event.
|
|
11677
12102
|
*/
|
|
11678
12103
|
event_id?: string | undefined;
|
|
12104
|
+
event_type: "step.delta";
|
|
12105
|
+
index: number;
|
|
11679
12106
|
/**
|
|
11680
12107
|
* Optional metadata accompanying ANY streamed event.
|
|
11681
12108
|
*/
|
|
11682
12109
|
metadata?: StepDeltaMetadata | undefined;
|
|
11683
12110
|
};
|
|
11684
12111
|
|
|
11685
|
-
declare type StepDeltaData = TextDelta | ImageDelta | AudioDelta | DocumentDelta | VideoDelta | ThoughtSummaryDelta | ThoughtSignatureDelta | TextAnnotationDelta | ArgumentsDelta | CodeExecutionCallDelta | URLContextCallDelta | GoogleSearchCallDelta | MCPServerToolCallDelta | FileSearchCallDelta | GoogleMapsCallDelta | CodeExecutionResultDelta | URLContextResultDelta | GoogleSearchResultDelta | MCPServerToolResultDelta | FileSearchResultDelta | GoogleMapsResultDelta | FunctionResultDelta;
|
|
12112
|
+
declare type StepDeltaData = TextDelta | ImageDelta | AudioDelta | DocumentDelta | VideoDelta | ThoughtSummaryDelta | ThoughtSignatureDelta | TextAnnotationDelta | ArgumentsDelta | CodeExecutionCallDelta | URLContextCallDelta | GoogleSearchCallDelta | MCPServerToolCallDelta | FileSearchCallDelta | GoogleMapsCallDelta | RetrievalCallDelta | CodeExecutionResultDelta | URLContextResultDelta | GoogleSearchResultDelta | MCPServerToolResultDelta | FileSearchResultDelta | GoogleMapsResultDelta | RetrievalResultDelta | FunctionResultDelta;
|
|
11686
12113
|
|
|
11687
12114
|
/**
|
|
11688
12115
|
* Optional metadata accompanying ANY streamed event.
|
|
@@ -11697,12 +12124,6 @@ declare type StepDeltaMetadata = {
|
|
|
11697
12124
|
declare type StepStart$ = StepStart;
|
|
11698
12125
|
|
|
11699
12126
|
declare type StepStart = {
|
|
11700
|
-
event_type: "step.start";
|
|
11701
|
-
index: number;
|
|
11702
|
-
/**
|
|
11703
|
-
* A step in the interaction.
|
|
11704
|
-
*/
|
|
11705
|
-
step: Step;
|
|
11706
12127
|
/**
|
|
11707
12128
|
* The event_id token to be used to resume the interaction stream, from
|
|
11708
12129
|
*
|
|
@@ -11710,14 +12131,18 @@ declare type StepStart = {
|
|
|
11710
12131
|
* this event.
|
|
11711
12132
|
*/
|
|
11712
12133
|
event_id?: string | undefined;
|
|
12134
|
+
event_type: "step.start";
|
|
12135
|
+
index: number;
|
|
11713
12136
|
metadata?: StreamMetadata | undefined;
|
|
12137
|
+
/**
|
|
12138
|
+
* A step in the interaction.
|
|
12139
|
+
*/
|
|
12140
|
+
step: Step;
|
|
11714
12141
|
};
|
|
11715
12142
|
|
|
11716
12143
|
declare type StepStop$ = StepStop;
|
|
11717
12144
|
|
|
11718
12145
|
declare type StepStop = {
|
|
11719
|
-
event_type: "step.stop";
|
|
11720
|
-
index: number;
|
|
11721
12146
|
/**
|
|
11722
12147
|
* The event_id token to be used to resume the interaction stream, from
|
|
11723
12148
|
*
|
|
@@ -11725,7 +12150,17 @@ declare type StepStop = {
|
|
|
11725
12150
|
* this event.
|
|
11726
12151
|
*/
|
|
11727
12152
|
event_id?: string | undefined;
|
|
12153
|
+
event_type: "step.stop";
|
|
12154
|
+
index: number;
|
|
11728
12155
|
metadata?: StreamMetadata | undefined;
|
|
12156
|
+
/**
|
|
12157
|
+
* Statistics on the interaction request's token usage.
|
|
12158
|
+
*/
|
|
12159
|
+
step_usage?: Usage | undefined;
|
|
12160
|
+
/**
|
|
12161
|
+
* Statistics on the interaction request's token usage.
|
|
12162
|
+
*/
|
|
12163
|
+
usage?: Usage | undefined;
|
|
11729
12164
|
};
|
|
11730
12165
|
|
|
11731
12166
|
export declare class Stream<T> extends ReadableStream<T> {
|
|
@@ -11930,6 +12365,22 @@ export declare interface SupervisedTuningSpec {
|
|
|
11930
12365
|
validationDatasetUri?: string;
|
|
11931
12366
|
}
|
|
11932
12367
|
|
|
12368
|
+
/**
|
|
12369
|
+
* @license
|
|
12370
|
+
* Copyright 2026 Google LLC
|
|
12371
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
12372
|
+
*
|
|
12373
|
+
* g3-prettier-ignore-file
|
|
12374
|
+
*/
|
|
12375
|
+
/**
|
|
12376
|
+
* Optional task mode for video generation. If not specified, the model
|
|
12377
|
+
*
|
|
12378
|
+
* @remarks
|
|
12379
|
+
* automatically determines the appropriate mode based on the provided text
|
|
12380
|
+
* prompt and input media.
|
|
12381
|
+
*/
|
|
12382
|
+
declare type Task = "text_to_video" | "image_to_video" | "reference_to_video" | "edit" | (string & {});
|
|
12383
|
+
|
|
11933
12384
|
export declare interface TestTableFile {
|
|
11934
12385
|
comment?: string;
|
|
11935
12386
|
testMethod?: string;
|
|
@@ -11961,11 +12412,11 @@ declare type Text$ = TextDelta;
|
|
|
11961
12412
|
declare type TextAnnotationDelta$ = TextAnnotationDelta;
|
|
11962
12413
|
|
|
11963
12414
|
declare type TextAnnotationDelta = {
|
|
11964
|
-
type: "text_annotation_delta";
|
|
11965
12415
|
/**
|
|
11966
12416
|
* Citation information for model-generated content.
|
|
11967
12417
|
*/
|
|
11968
12418
|
annotations?: Array<Annotation> | undefined;
|
|
12419
|
+
type: "text_annotation_delta";
|
|
11969
12420
|
};
|
|
11970
12421
|
|
|
11971
12422
|
declare type TextContent$ = TextContent;
|
|
@@ -11974,15 +12425,15 @@ declare type TextContent$ = TextContent;
|
|
|
11974
12425
|
* A text content block.
|
|
11975
12426
|
*/
|
|
11976
12427
|
declare type TextContent = {
|
|
11977
|
-
type: "text";
|
|
11978
|
-
/**
|
|
11979
|
-
* Required. The text content.
|
|
11980
|
-
*/
|
|
11981
|
-
text: string;
|
|
11982
12428
|
/**
|
|
11983
12429
|
* Citation information for model-generated content.
|
|
11984
12430
|
*/
|
|
11985
12431
|
annotations?: Array<Annotation> | undefined;
|
|
12432
|
+
/**
|
|
12433
|
+
* Required. The text content.
|
|
12434
|
+
*/
|
|
12435
|
+
text: string;
|
|
12436
|
+
type: "text";
|
|
11986
12437
|
};
|
|
11987
12438
|
|
|
11988
12439
|
/**
|
|
@@ -11993,17 +12444,24 @@ declare type TextContent = {
|
|
|
11993
12444
|
* g3-prettier-ignore-file
|
|
11994
12445
|
*/
|
|
11995
12446
|
declare type TextDelta = {
|
|
11996
|
-
type: "text";
|
|
11997
12447
|
text: string;
|
|
12448
|
+
type: "text";
|
|
11998
12449
|
};
|
|
11999
12450
|
|
|
12000
|
-
declare type TextResponseFormat$ =
|
|
12451
|
+
declare type TextResponseFormat$ = TextResponseFormat_2;
|
|
12452
|
+
|
|
12453
|
+
/** Configuration for text-specific output formatting. */
|
|
12454
|
+
export declare class TextResponseFormat {
|
|
12455
|
+
/** Optional. The IANA standard MIME type of the response. */
|
|
12456
|
+
mimeType?: string;
|
|
12457
|
+
/** Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON. */
|
|
12458
|
+
schema?: unknown;
|
|
12459
|
+
}
|
|
12001
12460
|
|
|
12002
12461
|
/**
|
|
12003
12462
|
* Configuration for text output format.
|
|
12004
12463
|
*/
|
|
12005
|
-
declare type
|
|
12006
|
-
type: "text";
|
|
12464
|
+
declare type TextResponseFormat_2 = {
|
|
12007
12465
|
/**
|
|
12008
12466
|
* The MIME type of the text output.
|
|
12009
12467
|
*/
|
|
@@ -12017,6 +12475,7 @@ declare type TextResponseFormat = {
|
|
|
12017
12475
|
schema?: {
|
|
12018
12476
|
[k: string]: any;
|
|
12019
12477
|
} | undefined;
|
|
12478
|
+
type: "text";
|
|
12020
12479
|
};
|
|
12021
12480
|
|
|
12022
12481
|
/**
|
|
@@ -12097,11 +12556,11 @@ declare type ThoughtSignature$ = ThoughtSignatureDelta;
|
|
|
12097
12556
|
* g3-prettier-ignore-file
|
|
12098
12557
|
*/
|
|
12099
12558
|
declare type ThoughtSignatureDelta = {
|
|
12100
|
-
type: "thought_signature";
|
|
12101
12559
|
/**
|
|
12102
12560
|
* Signature to match the backend source to be part of the generation.
|
|
12103
12561
|
*/
|
|
12104
12562
|
signature?: string | undefined;
|
|
12563
|
+
type: "thought_signature";
|
|
12105
12564
|
};
|
|
12106
12565
|
|
|
12107
12566
|
declare type ThoughtStep$ = ThoughtStep;
|
|
@@ -12110,7 +12569,6 @@ declare type ThoughtStep$ = ThoughtStep;
|
|
|
12110
12569
|
* A thought step.
|
|
12111
12570
|
*/
|
|
12112
12571
|
declare type ThoughtStep = {
|
|
12113
|
-
type: "thought";
|
|
12114
12572
|
/**
|
|
12115
12573
|
* A signature hash for backend validation.
|
|
12116
12574
|
*/
|
|
@@ -12119,6 +12577,7 @@ declare type ThoughtStep = {
|
|
|
12119
12577
|
* A summary of the thought.
|
|
12120
12578
|
*/
|
|
12121
12579
|
summary?: Array<ThoughtSummaryContent> | undefined;
|
|
12580
|
+
type: "thought";
|
|
12122
12581
|
};
|
|
12123
12582
|
|
|
12124
12583
|
declare type ThoughtSummary$ = ThoughtSummaryDelta;
|
|
@@ -12126,13 +12585,21 @@ declare type ThoughtSummary$ = ThoughtSummaryDelta;
|
|
|
12126
12585
|
declare type ThoughtSummaryContent = TextContent | ImageContent;
|
|
12127
12586
|
|
|
12128
12587
|
declare type ThoughtSummaryDelta = {
|
|
12129
|
-
type: "thought_summary";
|
|
12130
12588
|
/**
|
|
12131
12589
|
* The content of the response.
|
|
12132
12590
|
*/
|
|
12133
12591
|
content?: Content_2 | undefined;
|
|
12592
|
+
type: "thought_summary";
|
|
12134
12593
|
};
|
|
12135
12594
|
|
|
12595
|
+
/**
|
|
12596
|
+
* Required. The threshold for blocking content. If the harm probability
|
|
12597
|
+
*
|
|
12598
|
+
* @remarks
|
|
12599
|
+
* exceeds this threshold, the content will be blocked.
|
|
12600
|
+
*/
|
|
12601
|
+
declare type Threshold = "block_low_and_above" | "block_medium_and_above" | "block_only_high" | "block_none" | "off" | (string & {});
|
|
12602
|
+
|
|
12136
12603
|
export declare class Tokens extends BaseModule {
|
|
12137
12604
|
private readonly apiClient;
|
|
12138
12605
|
constructor(apiClient: ApiClient);
|
|
@@ -12239,9 +12706,7 @@ declare type Tool$ = Tool_2;
|
|
|
12239
12706
|
export declare interface Tool {
|
|
12240
12707
|
/** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. This field is not supported in Gemini API. */
|
|
12241
12708
|
retrieval?: Retrieval;
|
|
12242
|
-
/** Optional. Tool to support the model interacting directly with the
|
|
12243
|
-
computer. If enabled, it automatically populates computer-use specific
|
|
12244
|
-
Function Declarations. */
|
|
12709
|
+
/** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
|
|
12245
12710
|
computerUse?: ComputerUse;
|
|
12246
12711
|
/** Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora. This field is not supported in Vertex AI. */
|
|
12247
12712
|
fileSearch?: FileSearch;
|
|
@@ -12264,6 +12729,8 @@ export declare interface Tool {
|
|
|
12264
12729
|
urlContext?: UrlContext;
|
|
12265
12730
|
/** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
|
|
12266
12731
|
mcpServers?: McpServer[];
|
|
12732
|
+
/** Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation. This field is not supported in Gemini API. */
|
|
12733
|
+
exaAiSearch?: ToolExaAiSearch;
|
|
12267
12734
|
}
|
|
12268
12735
|
|
|
12269
12736
|
/**
|
|
@@ -12328,6 +12795,14 @@ export declare interface ToolConfig {
|
|
|
12328
12795
|
includeServerSideToolInvocations?: boolean;
|
|
12329
12796
|
}
|
|
12330
12797
|
|
|
12798
|
+
/** ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. This data type is not supported in Gemini API. */
|
|
12799
|
+
export declare interface ToolExaAiSearch {
|
|
12800
|
+
/** Required. The API key for ExaAiSearch. */
|
|
12801
|
+
apiKey?: string;
|
|
12802
|
+
/** Optional. This field can be used to pass any parameter from the Exa.ai Search API. */
|
|
12803
|
+
customConfigs?: Record<string, unknown>;
|
|
12804
|
+
}
|
|
12805
|
+
|
|
12331
12806
|
export declare type ToolListUnion = ToolUnion[];
|
|
12332
12807
|
|
|
12333
12808
|
/** ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. This data type is not supported in Gemini API. */
|
|
@@ -12419,14 +12894,27 @@ export declare interface Transcription {
|
|
|
12419
12894
|
languageCode?: string;
|
|
12420
12895
|
}
|
|
12421
12896
|
|
|
12897
|
+
/**
|
|
12898
|
+
* @license
|
|
12899
|
+
* Copyright 2026 Google LLC
|
|
12900
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
12901
|
+
*
|
|
12902
|
+
* g3-prettier-ignore-file
|
|
12903
|
+
*/
|
|
12904
|
+
/**
|
|
12905
|
+
* Headers to inject on all outbound requests matching this domain. Accepts a single dict or a list of dicts. The egress proxy injects these automatically.
|
|
12906
|
+
*/
|
|
12907
|
+
declare type Transform = {
|
|
12908
|
+
[k: string]: string;
|
|
12909
|
+
} | Array<{
|
|
12910
|
+
[k: string]: string;
|
|
12911
|
+
}>;
|
|
12912
|
+
|
|
12422
12913
|
/** Config for stream translation. */
|
|
12423
12914
|
export declare interface TranslationConfig {
|
|
12424
|
-
/** If true, the model will generate audio when the target language is
|
|
12425
|
-
spoken, essentially it will parrot the input. If false, we will not produce
|
|
12426
|
-
audio for the target language. */
|
|
12915
|
+
/** Optional. If true, the model will generate audio when the target language is spoken, essentially it will parrot the input. If false, we will not produce audio for the target language. */
|
|
12427
12916
|
echoTargetLanguage?: boolean;
|
|
12428
|
-
/** The target language for translation. Supported values are BCP-47
|
|
12429
|
-
language codes (e.g. "en", "es", "fr"). */
|
|
12917
|
+
/** Required. The target language for translation. Supported values are BCP-47 language codes (e.g. "en", "es", "fr"). */
|
|
12430
12918
|
targetLanguageCode?: string;
|
|
12431
12919
|
}
|
|
12432
12920
|
|
|
@@ -12494,6 +12982,8 @@ export declare interface TuningDataStats {
|
|
|
12494
12982
|
preferenceOptimizationDataStats?: PreferenceOptimizationDataStats;
|
|
12495
12983
|
/** The SFT Tuning data stats. */
|
|
12496
12984
|
supervisedTuningDataStats?: SupervisedTuningDataStats;
|
|
12985
|
+
/** Output only. Statistics for reinforcement tuning. */
|
|
12986
|
+
reinforcementTuningDataStats?: DatasetStats;
|
|
12497
12987
|
}
|
|
12498
12988
|
|
|
12499
12989
|
/** A single example for tuning. This data type is not supported in Vertex AI. */
|
|
@@ -12536,6 +13026,7 @@ export declare interface TuningJob {
|
|
|
12536
13026
|
preferenceOptimizationSpec?: PreferenceOptimizationSpec;
|
|
12537
13027
|
/** Tuning Spec for Distillation. */
|
|
12538
13028
|
distillationSpec?: DistillationSpec;
|
|
13029
|
+
/** Tuning Spec for Reinforcement Tuning. */
|
|
12539
13030
|
reinforcementTuningSpec?: ReinforcementTuningSpec;
|
|
12540
13031
|
/** Output only. The tuning data statistics associated with this TuningJob. */
|
|
12541
13032
|
tuningDataStats?: TuningDataStats;
|
|
@@ -12762,6 +13253,7 @@ export declare interface TuningValidationDataset {
|
|
|
12762
13253
|
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
12763
13254
|
*/
|
|
12764
13255
|
declare type Turn = {
|
|
13256
|
+
content?: Array<Content_2> | string | undefined;
|
|
12765
13257
|
/**
|
|
12766
13258
|
* The originator of this turn. Must be user for input or model for
|
|
12767
13259
|
*
|
|
@@ -12769,7 +13261,6 @@ declare type Turn = {
|
|
|
12769
13261
|
* model output.
|
|
12770
13262
|
*/
|
|
12771
13263
|
role?: string | undefined;
|
|
12772
|
-
content?: Array<Content_2> | string | undefined;
|
|
12773
13264
|
};
|
|
12774
13265
|
|
|
12775
13266
|
/** The reason why the turn is complete. */
|
|
@@ -12963,10 +13454,11 @@ declare namespace types {
|
|
|
12963
13454
|
Language,
|
|
12964
13455
|
FunctionResponseScheduling,
|
|
12965
13456
|
Type,
|
|
12966
|
-
Environment,
|
|
12967
13457
|
AuthType,
|
|
12968
13458
|
HttpElementLocation,
|
|
12969
13459
|
ApiSpec,
|
|
13460
|
+
Environment,
|
|
13461
|
+
SafetyPolicy,
|
|
12970
13462
|
PhishBlockThreshold,
|
|
12971
13463
|
Behavior,
|
|
12972
13464
|
DynamicRetrievalConfigMode,
|
|
@@ -12987,8 +13479,14 @@ declare namespace types {
|
|
|
12987
13479
|
ModelStage,
|
|
12988
13480
|
MediaResolution,
|
|
12989
13481
|
Modality,
|
|
13482
|
+
Delivery,
|
|
13483
|
+
AspectRatio,
|
|
13484
|
+
ImageSize,
|
|
12990
13485
|
TuningMode,
|
|
12991
13486
|
AdapterSize,
|
|
13487
|
+
ResponseParseType,
|
|
13488
|
+
MatchOperation,
|
|
13489
|
+
ReinforcementTuningThinkingLevel,
|
|
12992
13490
|
JobState,
|
|
12993
13491
|
TuningJobState,
|
|
12994
13492
|
AggregationMetric,
|
|
@@ -13014,9 +13512,6 @@ declare namespace types {
|
|
|
13014
13512
|
VideoGenerationMaskMode,
|
|
13015
13513
|
VideoCompressionQuality,
|
|
13016
13514
|
ImageResizeMode,
|
|
13017
|
-
ResponseParseType,
|
|
13018
|
-
MatchOperation,
|
|
13019
|
-
ReinforcementTuningThinkingLevel,
|
|
13020
13515
|
TuningMethod,
|
|
13021
13516
|
FileState,
|
|
13022
13517
|
FileSource,
|
|
@@ -13050,7 +13545,6 @@ declare namespace types {
|
|
|
13050
13545
|
HttpOptions,
|
|
13051
13546
|
Schema,
|
|
13052
13547
|
ModelSelectionConfig,
|
|
13053
|
-
ComputerUse,
|
|
13054
13548
|
ApiKeyConfig,
|
|
13055
13549
|
AuthConfigGoogleServiceAccountConfig,
|
|
13056
13550
|
AuthConfigHttpBasicAuthConfig,
|
|
@@ -13074,6 +13568,7 @@ declare namespace types {
|
|
|
13074
13568
|
RagRetrievalConfig,
|
|
13075
13569
|
VertexRagStore,
|
|
13076
13570
|
Retrieval,
|
|
13571
|
+
ComputerUse,
|
|
13077
13572
|
FileSearch,
|
|
13078
13573
|
WebSearch,
|
|
13079
13574
|
ImageSearch,
|
|
@@ -13089,7 +13584,9 @@ declare namespace types {
|
|
|
13089
13584
|
UrlContext,
|
|
13090
13585
|
StreamableHttpTransport,
|
|
13091
13586
|
McpServer,
|
|
13587
|
+
ToolExaAiSearch,
|
|
13092
13588
|
Tool,
|
|
13589
|
+
VoiceConsentSignature,
|
|
13093
13590
|
ReplicatedVoiceConfig,
|
|
13094
13591
|
PrebuiltVoiceConfig,
|
|
13095
13592
|
VoiceConfig,
|
|
@@ -13194,6 +13691,12 @@ declare namespace types {
|
|
|
13194
13691
|
DeleteModelConfig,
|
|
13195
13692
|
DeleteModelParameters,
|
|
13196
13693
|
DeleteModelResponse,
|
|
13694
|
+
AudioResponseFormat,
|
|
13695
|
+
ImageResponseFormat,
|
|
13696
|
+
TextResponseFormat,
|
|
13697
|
+
VideoResponseFormat,
|
|
13698
|
+
ResponseFormat,
|
|
13699
|
+
TranslationConfig,
|
|
13197
13700
|
GenerationConfig,
|
|
13198
13701
|
CountTokensConfig,
|
|
13199
13702
|
CountTokensParameters,
|
|
@@ -13243,6 +13746,8 @@ declare namespace types {
|
|
|
13243
13746
|
PreTunedModel,
|
|
13244
13747
|
DatasetDistributionDistributionBucket,
|
|
13245
13748
|
DatasetDistribution,
|
|
13749
|
+
ReinforcementTuningExample,
|
|
13750
|
+
ReinforcementTuningUserDatasetExamples,
|
|
13246
13751
|
DatasetStats,
|
|
13247
13752
|
DistillationDataStats,
|
|
13248
13753
|
GeminiPreferenceExampleCompletion,
|
|
@@ -13288,7 +13793,6 @@ declare namespace types {
|
|
|
13288
13793
|
CreateTuningJobConfig,
|
|
13289
13794
|
CreateTuningJobParametersPrivate,
|
|
13290
13795
|
TuningOperation,
|
|
13291
|
-
ReinforcementTuningExample,
|
|
13292
13796
|
ValidateRewardConfig,
|
|
13293
13797
|
ValidateRewardParameters,
|
|
13294
13798
|
ReinforcementTuningRewardInfo,
|
|
@@ -13432,7 +13936,6 @@ declare namespace types {
|
|
|
13432
13936
|
LiveClientRealtimeInput,
|
|
13433
13937
|
LiveClientToolResponse,
|
|
13434
13938
|
LiveClientMessage,
|
|
13435
|
-
TranslationConfig,
|
|
13436
13939
|
LiveConnectConfig,
|
|
13437
13940
|
LiveConnectParameters,
|
|
13438
13941
|
CreateChatParameters,
|
|
@@ -13744,15 +14247,10 @@ declare type URLCitation$ = URLCitation;
|
|
|
13744
14247
|
* A URL citation annotation.
|
|
13745
14248
|
*/
|
|
13746
14249
|
declare type URLCitation = {
|
|
13747
|
-
type: "url_citation";
|
|
13748
14250
|
/**
|
|
13749
|
-
*
|
|
13750
|
-
*/
|
|
13751
|
-
url?: string | undefined;
|
|
13752
|
-
/**
|
|
13753
|
-
* The title of the URL.
|
|
14251
|
+
* End of the attributed segment, exclusive.
|
|
13754
14252
|
*/
|
|
13755
|
-
|
|
14253
|
+
end_index?: number | undefined;
|
|
13756
14254
|
/**
|
|
13757
14255
|
* Start of segment of the response that is attributed to this source.
|
|
13758
14256
|
*
|
|
@@ -13762,9 +14260,14 @@ declare type URLCitation = {
|
|
|
13762
14260
|
*/
|
|
13763
14261
|
start_index?: number | undefined;
|
|
13764
14262
|
/**
|
|
13765
|
-
*
|
|
14263
|
+
* The title of the URL.
|
|
13766
14264
|
*/
|
|
13767
|
-
|
|
14265
|
+
title?: string | undefined;
|
|
14266
|
+
type: "url_citation";
|
|
14267
|
+
/**
|
|
14268
|
+
* The URL.
|
|
14269
|
+
*/
|
|
14270
|
+
url?: string | undefined;
|
|
13768
14271
|
};
|
|
13769
14272
|
|
|
13770
14273
|
declare type URLContext$ = URLContext;
|
|
@@ -13809,7 +14312,6 @@ declare type URLContextCallArguments = {
|
|
|
13809
14312
|
};
|
|
13810
14313
|
|
|
13811
14314
|
declare type URLContextCallDelta = {
|
|
13812
|
-
type: "url_context_call";
|
|
13813
14315
|
/**
|
|
13814
14316
|
* The arguments to pass to the URL context.
|
|
13815
14317
|
*/
|
|
@@ -13818,6 +14320,7 @@ declare type URLContextCallDelta = {
|
|
|
13818
14320
|
* A signature hash for backend validation.
|
|
13819
14321
|
*/
|
|
13820
14322
|
signature?: string | undefined;
|
|
14323
|
+
type: "url_context_call";
|
|
13821
14324
|
};
|
|
13822
14325
|
|
|
13823
14326
|
declare type URLContextCallStep$ = URLContextCallStep;
|
|
@@ -13826,7 +14329,10 @@ declare type URLContextCallStep$ = URLContextCallStep;
|
|
|
13826
14329
|
* URL context call step.
|
|
13827
14330
|
*/
|
|
13828
14331
|
declare type URLContextCallStep = {
|
|
13829
|
-
|
|
14332
|
+
/**
|
|
14333
|
+
* The arguments to pass to the URL context.
|
|
14334
|
+
*/
|
|
14335
|
+
arguments: URLContextCallArguments;
|
|
13830
14336
|
/**
|
|
13831
14337
|
* Required. A unique ID for this specific tool call.
|
|
13832
14338
|
*/
|
|
@@ -13835,10 +14341,7 @@ declare type URLContextCallStep = {
|
|
|
13835
14341
|
* A signature hash for backend validation.
|
|
13836
14342
|
*/
|
|
13837
14343
|
signature?: string | undefined;
|
|
13838
|
-
|
|
13839
|
-
* The arguments to pass to the URL context.
|
|
13840
|
-
*/
|
|
13841
|
-
arguments: Arguments;
|
|
14344
|
+
type: "url_context_call";
|
|
13842
14345
|
};
|
|
13843
14346
|
|
|
13844
14347
|
/** Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL. */
|
|
@@ -13855,24 +14358,24 @@ declare type URLContextResult$2 = URLContextResultDelta;
|
|
|
13855
14358
|
* The result of the URL context.
|
|
13856
14359
|
*/
|
|
13857
14360
|
declare type URLContextResult = {
|
|
13858
|
-
/**
|
|
13859
|
-
* The URL that was fetched.
|
|
13860
|
-
*/
|
|
13861
|
-
url?: string | undefined;
|
|
13862
14361
|
/**
|
|
13863
14362
|
* The status of the URL retrieval.
|
|
13864
14363
|
*/
|
|
13865
14364
|
status?: URLContextResultStatus | undefined;
|
|
14365
|
+
/**
|
|
14366
|
+
* The URL that was fetched.
|
|
14367
|
+
*/
|
|
14368
|
+
url?: string | undefined;
|
|
13866
14369
|
};
|
|
13867
14370
|
|
|
13868
14371
|
declare type URLContextResultDelta = {
|
|
13869
|
-
type: "url_context_result";
|
|
13870
|
-
result: Array<URLContextResult>;
|
|
13871
14372
|
is_error?: boolean | undefined;
|
|
14373
|
+
result: Array<URLContextResult>;
|
|
13872
14374
|
/**
|
|
13873
14375
|
* A signature hash for backend validation.
|
|
13874
14376
|
*/
|
|
13875
14377
|
signature?: string | undefined;
|
|
14378
|
+
type: "url_context_result";
|
|
13876
14379
|
};
|
|
13877
14380
|
|
|
13878
14381
|
/**
|
|
@@ -13893,23 +14396,23 @@ declare type URLContextResultStep$ = URLContextResultStep;
|
|
|
13893
14396
|
* URL context result step.
|
|
13894
14397
|
*/
|
|
13895
14398
|
declare type URLContextResultStep = {
|
|
13896
|
-
type: "url_context_result";
|
|
13897
14399
|
/**
|
|
13898
|
-
* Required.
|
|
14400
|
+
* Required. ID to match the ID from the function call block.
|
|
13899
14401
|
*/
|
|
13900
|
-
|
|
14402
|
+
call_id: string;
|
|
13901
14403
|
/**
|
|
13902
14404
|
* Whether the URL context resulted in an error.
|
|
13903
14405
|
*/
|
|
13904
14406
|
is_error?: boolean | undefined;
|
|
13905
14407
|
/**
|
|
13906
|
-
* Required.
|
|
14408
|
+
* Required. The results of the URL context.
|
|
13907
14409
|
*/
|
|
13908
|
-
|
|
14410
|
+
result: Array<URLContextResult>;
|
|
13909
14411
|
/**
|
|
13910
14412
|
* A signature hash for backend validation.
|
|
13911
14413
|
*/
|
|
13912
14414
|
signature?: string | undefined;
|
|
14415
|
+
type: "url_context_result";
|
|
13913
14416
|
};
|
|
13914
14417
|
|
|
13915
14418
|
/** The metadata for a single URL retrieval. */
|
|
@@ -13951,37 +14454,37 @@ declare type Usage$ = Usage;
|
|
|
13951
14454
|
*/
|
|
13952
14455
|
declare type Usage = {
|
|
13953
14456
|
/**
|
|
13954
|
-
*
|
|
14457
|
+
* A breakdown of cached token usage by modality.
|
|
13955
14458
|
*/
|
|
13956
|
-
|
|
14459
|
+
cached_tokens_by_modality?: Array<ModalityTokens> | undefined;
|
|
13957
14460
|
/**
|
|
13958
|
-
*
|
|
14461
|
+
* Grounding tool count.
|
|
13959
14462
|
*/
|
|
13960
|
-
|
|
14463
|
+
grounding_tool_count?: Array<GroundingToolCount> | undefined;
|
|
13961
14464
|
/**
|
|
13962
|
-
*
|
|
14465
|
+
* A breakdown of input token usage by modality.
|
|
13963
14466
|
*/
|
|
13964
|
-
|
|
14467
|
+
input_tokens_by_modality?: Array<ModalityTokens> | undefined;
|
|
13965
14468
|
/**
|
|
13966
|
-
* A breakdown of
|
|
14469
|
+
* A breakdown of output token usage by modality.
|
|
13967
14470
|
*/
|
|
13968
|
-
|
|
14471
|
+
output_tokens_by_modality?: Array<ModalityTokens> | undefined;
|
|
13969
14472
|
/**
|
|
13970
|
-
*
|
|
14473
|
+
* A breakdown of tool-use token usage by modality.
|
|
13971
14474
|
*/
|
|
13972
|
-
|
|
14475
|
+
tool_use_tokens_by_modality?: Array<ModalityTokens> | undefined;
|
|
13973
14476
|
/**
|
|
13974
|
-
*
|
|
14477
|
+
* Number of tokens in the cached part of the prompt (the cached content).
|
|
13975
14478
|
*/
|
|
13976
|
-
|
|
14479
|
+
total_cached_tokens?: number | undefined;
|
|
13977
14480
|
/**
|
|
13978
|
-
* Number of tokens
|
|
14481
|
+
* Number of tokens in the prompt (context).
|
|
13979
14482
|
*/
|
|
13980
|
-
|
|
14483
|
+
total_input_tokens?: number | undefined;
|
|
13981
14484
|
/**
|
|
13982
|
-
*
|
|
14485
|
+
* Total number of tokens across all the generated responses.
|
|
13983
14486
|
*/
|
|
13984
|
-
|
|
14487
|
+
total_output_tokens?: number | undefined;
|
|
13985
14488
|
/**
|
|
13986
14489
|
* Number of tokens of thoughts for thinking models.
|
|
13987
14490
|
*/
|
|
@@ -13994,9 +14497,9 @@ declare type Usage = {
|
|
|
13994
14497
|
*/
|
|
13995
14498
|
total_tokens?: number | undefined;
|
|
13996
14499
|
/**
|
|
13997
|
-
*
|
|
14500
|
+
* Number of tokens present in tool-use prompt(s).
|
|
13998
14501
|
*/
|
|
13999
|
-
|
|
14502
|
+
total_tool_use_tokens?: number | undefined;
|
|
14000
14503
|
};
|
|
14001
14504
|
|
|
14002
14505
|
/** Usage metadata about response(s). */
|
|
@@ -14165,14 +14668,14 @@ declare type VertexAISearchConfig$ = VertexAISearchConfig;
|
|
|
14165
14668
|
* Used to specify configuration for VertexAISearch.
|
|
14166
14669
|
*/
|
|
14167
14670
|
declare type VertexAISearchConfig = {
|
|
14168
|
-
/**
|
|
14169
|
-
* Optional. Used to specify Vertex AI Search engine.
|
|
14170
|
-
*/
|
|
14171
|
-
engine?: string | undefined;
|
|
14172
14671
|
/**
|
|
14173
14672
|
* Optional. Used to specify Vertex AI Search datastores.
|
|
14174
14673
|
*/
|
|
14175
14674
|
datastores?: Array<string> | undefined;
|
|
14675
|
+
/**
|
|
14676
|
+
* Optional. Used to specify Vertex AI Search engine.
|
|
14677
|
+
*/
|
|
14678
|
+
engine?: string | undefined;
|
|
14176
14679
|
};
|
|
14177
14680
|
|
|
14178
14681
|
/** Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec. This data type is not supported in Gemini API. */
|
|
@@ -14244,26 +14747,42 @@ export declare enum VideoCompressionQuality {
|
|
|
14244
14747
|
LOSSLESS = "LOSSLESS"
|
|
14245
14748
|
}
|
|
14246
14749
|
|
|
14750
|
+
declare type VideoConfig$ = VideoConfig;
|
|
14751
|
+
|
|
14752
|
+
/**
|
|
14753
|
+
* Configuration options for video generation.
|
|
14754
|
+
*/
|
|
14755
|
+
declare type VideoConfig = {
|
|
14756
|
+
/**
|
|
14757
|
+
* Optional task mode for video generation. If not specified, the model
|
|
14758
|
+
*
|
|
14759
|
+
* @remarks
|
|
14760
|
+
* automatically determines the appropriate mode based on the provided text
|
|
14761
|
+
* prompt and input media.
|
|
14762
|
+
*/
|
|
14763
|
+
task?: Task | undefined;
|
|
14764
|
+
};
|
|
14765
|
+
|
|
14247
14766
|
declare type VideoContent$ = VideoContent;
|
|
14248
14767
|
|
|
14249
14768
|
/**
|
|
14250
14769
|
* A video content block.
|
|
14251
14770
|
*/
|
|
14252
14771
|
declare type VideoContent = {
|
|
14253
|
-
type: "video";
|
|
14254
14772
|
/**
|
|
14255
14773
|
* The video content.
|
|
14256
14774
|
*/
|
|
14257
14775
|
data?: string | undefined;
|
|
14258
|
-
/**
|
|
14259
|
-
* The URI of the video.
|
|
14260
|
-
*/
|
|
14261
|
-
uri?: string | undefined;
|
|
14262
14776
|
/**
|
|
14263
14777
|
* The mime type of the video.
|
|
14264
14778
|
*/
|
|
14265
14779
|
mime_type?: VideoContentMimeType | undefined;
|
|
14266
14780
|
resolution?: MediaResolution_2 | undefined;
|
|
14781
|
+
type: "video";
|
|
14782
|
+
/**
|
|
14783
|
+
* The URI of the video.
|
|
14784
|
+
*/
|
|
14785
|
+
uri?: string | undefined;
|
|
14267
14786
|
};
|
|
14268
14787
|
|
|
14269
14788
|
/**
|
|
@@ -14272,11 +14791,11 @@ declare type VideoContent = {
|
|
|
14272
14791
|
declare type VideoContentMimeType = "video/mp4" | "video/mpeg" | "video/mpg" | "video/mov" | "video/avi" | "video/x-flv" | "video/webm" | "video/wmv" | "video/3gpp" | (string & {});
|
|
14273
14792
|
|
|
14274
14793
|
declare type VideoDelta = {
|
|
14275
|
-
type: "video";
|
|
14276
14794
|
data?: string | undefined;
|
|
14277
|
-
uri?: string | undefined;
|
|
14278
14795
|
mime_type?: VideoDeltaMimeType | undefined;
|
|
14279
14796
|
resolution?: MediaResolution_2 | undefined;
|
|
14797
|
+
type: "video";
|
|
14798
|
+
uri?: string | undefined;
|
|
14280
14799
|
};
|
|
14281
14800
|
|
|
14282
14801
|
declare type VideoDeltaMimeType = "video/mp4" | "video/mpeg" | "video/mpg" | "video/mov" | "video/avi" | "video/x-flv" | "video/webm" | "video/wmv" | "video/3gpp" | (string & {});
|
|
@@ -14368,6 +14887,63 @@ export declare enum VideoOrientation {
|
|
|
14368
14887
|
PORTRAIT = "PORTRAIT"
|
|
14369
14888
|
}
|
|
14370
14889
|
|
|
14890
|
+
declare type VideoResponseFormat$ = VideoResponseFormat_2;
|
|
14891
|
+
|
|
14892
|
+
/** Configuration for video-specific output formatting. This data type is not supported in Gemini API. */
|
|
14893
|
+
export declare class VideoResponseFormat {
|
|
14894
|
+
/** The aspect ratio for the video output. */
|
|
14895
|
+
aspectRatio?: AspectRatio;
|
|
14896
|
+
/** Optional. Delivery mode for the generated content. */
|
|
14897
|
+
delivery?: Delivery;
|
|
14898
|
+
/** Optional. The duration for the video output. */
|
|
14899
|
+
duration?: string;
|
|
14900
|
+
/** Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI. */
|
|
14901
|
+
gcsUri?: string;
|
|
14902
|
+
}
|
|
14903
|
+
|
|
14904
|
+
/**
|
|
14905
|
+
* Configuration for video output format.
|
|
14906
|
+
*/
|
|
14907
|
+
declare type VideoResponseFormat_2 = {
|
|
14908
|
+
/**
|
|
14909
|
+
* The aspect ratio for the video output.
|
|
14910
|
+
*/
|
|
14911
|
+
aspect_ratio?: VideoResponseFormatAspectRatio | undefined;
|
|
14912
|
+
/**
|
|
14913
|
+
* The delivery mode for the video output.
|
|
14914
|
+
*/
|
|
14915
|
+
delivery?: VideoResponseFormatDelivery | undefined;
|
|
14916
|
+
/**
|
|
14917
|
+
* The duration for the video output.
|
|
14918
|
+
*/
|
|
14919
|
+
duration?: string | undefined;
|
|
14920
|
+
/**
|
|
14921
|
+
* The GCS URI to store the video output. Required for Vertex if delivery mode
|
|
14922
|
+
*
|
|
14923
|
+
* @remarks
|
|
14924
|
+
* is URI.
|
|
14925
|
+
*/
|
|
14926
|
+
gcs_uri?: string | undefined;
|
|
14927
|
+
type: "video";
|
|
14928
|
+
};
|
|
14929
|
+
|
|
14930
|
+
/**
|
|
14931
|
+
* @license
|
|
14932
|
+
* Copyright 2026 Google LLC
|
|
14933
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
14934
|
+
*
|
|
14935
|
+
* g3-prettier-ignore-file
|
|
14936
|
+
*/
|
|
14937
|
+
/**
|
|
14938
|
+
* The aspect ratio for the video output.
|
|
14939
|
+
*/
|
|
14940
|
+
declare type VideoResponseFormatAspectRatio = "16:9" | "9:16" | (string & {});
|
|
14941
|
+
|
|
14942
|
+
/**
|
|
14943
|
+
* The delivery mode for the video output.
|
|
14944
|
+
*/
|
|
14945
|
+
declare type VideoResponseFormatDelivery = "inline" | "uri" | (string & {});
|
|
14946
|
+
|
|
14371
14947
|
/**
|
|
14372
14948
|
* Whether to include visualizations in the response.
|
|
14373
14949
|
*/
|
|
@@ -14412,20 +14988,43 @@ export declare interface VoiceConfig {
|
|
|
14412
14988
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
14413
14989
|
}
|
|
14414
14990
|
|
|
14991
|
+
/** The signature of the voice consent check. */
|
|
14992
|
+
export declare interface VoiceConsentSignature {
|
|
14993
|
+
/** The signature string.
|
|
14994
|
+
*/
|
|
14995
|
+
signature?: string;
|
|
14996
|
+
}
|
|
14997
|
+
|
|
14415
14998
|
declare type Webhook$ = Webhook;
|
|
14416
14999
|
|
|
14417
15000
|
/**
|
|
14418
15001
|
* A Webhook resource.
|
|
14419
15002
|
*/
|
|
14420
15003
|
declare type Webhook = {
|
|
15004
|
+
/**
|
|
15005
|
+
* Output only. The timestamp when the webhook was created.
|
|
15006
|
+
*/
|
|
15007
|
+
create_time?: string | undefined;
|
|
15008
|
+
/**
|
|
15009
|
+
* Output only. The ID of the webhook.
|
|
15010
|
+
*/
|
|
15011
|
+
id?: string | undefined;
|
|
14421
15012
|
/**
|
|
14422
15013
|
* Optional. The user-provided name of the webhook.
|
|
14423
15014
|
*/
|
|
14424
15015
|
name?: string | undefined;
|
|
14425
15016
|
/**
|
|
14426
|
-
*
|
|
15017
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
14427
15018
|
*/
|
|
14428
|
-
|
|
15019
|
+
new_signing_secret?: string | undefined;
|
|
15020
|
+
/**
|
|
15021
|
+
* Output only. The signing secrets associated with this webhook.
|
|
15022
|
+
*/
|
|
15023
|
+
signing_secrets?: Array<SigningSecret> | undefined;
|
|
15024
|
+
/**
|
|
15025
|
+
* Output only. The state of the webhook.
|
|
15026
|
+
*/
|
|
15027
|
+
state?: WebhookState | undefined;
|
|
14429
15028
|
/**
|
|
14430
15029
|
* Required. The events that the webhook is subscribed to.
|
|
14431
15030
|
*
|
|
@@ -14440,30 +15039,14 @@ declare type Webhook = {
|
|
|
14440
15039
|
* - video.generated
|
|
14441
15040
|
*/
|
|
14442
15041
|
subscribed_events: Array<WebhookSubscribedEvent>;
|
|
14443
|
-
/**
|
|
14444
|
-
* Output only. The timestamp when the webhook was created.
|
|
14445
|
-
*/
|
|
14446
|
-
create_time?: string | undefined;
|
|
14447
15042
|
/**
|
|
14448
15043
|
* Output only. The timestamp when the webhook was last updated.
|
|
14449
15044
|
*/
|
|
14450
15045
|
update_time?: string | undefined;
|
|
14451
15046
|
/**
|
|
14452
|
-
*
|
|
14453
|
-
*/
|
|
14454
|
-
signing_secrets?: Array<SigningSecret> | undefined;
|
|
14455
|
-
/**
|
|
14456
|
-
* Output only. The state of the webhook.
|
|
14457
|
-
*/
|
|
14458
|
-
state?: WebhookState | undefined;
|
|
14459
|
-
/**
|
|
14460
|
-
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
14461
|
-
*/
|
|
14462
|
-
new_signing_secret?: string | undefined;
|
|
14463
|
-
/**
|
|
14464
|
-
* Output only. The ID of the webhook.
|
|
15047
|
+
* Required. The URI to which webhook events will be sent.
|
|
14465
15048
|
*/
|
|
14466
|
-
|
|
15049
|
+
uri: string;
|
|
14467
15050
|
};
|
|
14468
15051
|
|
|
14469
15052
|
declare type WebhookConfig$ = WebhookConfig_2;
|
|
@@ -14529,10 +15112,6 @@ declare type WebhookInput = {
|
|
|
14529
15112
|
* Optional. The user-provided name of the webhook.
|
|
14530
15113
|
*/
|
|
14531
15114
|
name?: string | undefined;
|
|
14532
|
-
/**
|
|
14533
|
-
* Required. The URI to which webhook events will be sent.
|
|
14534
|
-
*/
|
|
14535
|
-
uri: string;
|
|
14536
15115
|
/**
|
|
14537
15116
|
* Required. The events that the webhook is subscribed to.
|
|
14538
15117
|
*
|
|
@@ -14547,6 +15126,10 @@ declare type WebhookInput = {
|
|
|
14547
15126
|
* - video.generated
|
|
14548
15127
|
*/
|
|
14549
15128
|
subscribed_events: Array<WebhookSubscribedEvent>;
|
|
15129
|
+
/**
|
|
15130
|
+
* Required. The URI to which webhook events will be sent.
|
|
15131
|
+
*/
|
|
15132
|
+
uri: string;
|
|
14550
15133
|
};
|
|
14551
15134
|
|
|
14552
15135
|
declare type WebhookListParams$ = ListWebhooksParams;
|
|
@@ -14563,10 +15146,6 @@ declare type WebhookListResponse$ = WebhookListResponse;
|
|
|
14563
15146
|
* Response message for WebhookService.ListWebhooks.
|
|
14564
15147
|
*/
|
|
14565
15148
|
declare type WebhookListResponse = {
|
|
14566
|
-
/**
|
|
14567
|
-
* The webhooks.
|
|
14568
|
-
*/
|
|
14569
|
-
webhooks?: Array<Webhook> | undefined;
|
|
14570
15149
|
/**
|
|
14571
15150
|
* A token, which can be sent as `page_token` to retrieve the next page.
|
|
14572
15151
|
*
|
|
@@ -14574,6 +15153,10 @@ declare type WebhookListResponse = {
|
|
|
14574
15153
|
* If this field is omitted, there are no subsequent pages.
|
|
14575
15154
|
*/
|
|
14576
15155
|
next_page_token?: string | undefined;
|
|
15156
|
+
/**
|
|
15157
|
+
* The webhooks.
|
|
15158
|
+
*/
|
|
15159
|
+
webhooks?: Array<Webhook> | undefined;
|
|
14577
15160
|
};
|
|
14578
15161
|
|
|
14579
15162
|
declare type WebhookPingParams$ = PingWebhookRequest;
|
|
@@ -14651,11 +15234,11 @@ declare namespace webhooks {
|
|
|
14651
15234
|
WebhookListResponse,
|
|
14652
15235
|
WebhookPingResponse,
|
|
14653
15236
|
WebhookRotateSigningSecretResponse,
|
|
14654
|
-
WebhookUpdateSubscribedEvent,
|
|
14655
15237
|
WebhookUpdateState,
|
|
15238
|
+
WebhookUpdateSubscribedEvent,
|
|
14656
15239
|
WebhookUpdate,
|
|
14657
|
-
WebhookSubscribedEvent,
|
|
14658
15240
|
WebhookState,
|
|
15241
|
+
WebhookSubscribedEvent,
|
|
14659
15242
|
Webhook,
|
|
14660
15243
|
WebhookInput
|
|
14661
15244
|
}
|
|
@@ -14676,9 +15259,9 @@ declare type WebhookUpdate = {
|
|
|
14676
15259
|
*/
|
|
14677
15260
|
name?: string | undefined;
|
|
14678
15261
|
/**
|
|
14679
|
-
* Optional. The
|
|
15262
|
+
* Optional. The state of the webhook.
|
|
14680
15263
|
*/
|
|
14681
|
-
|
|
15264
|
+
state?: WebhookUpdateState | undefined;
|
|
14682
15265
|
/**
|
|
14683
15266
|
* Optional. The events that the webhook is subscribed to.
|
|
14684
15267
|
*
|
|
@@ -14694,9 +15277,9 @@ declare type WebhookUpdate = {
|
|
|
14694
15277
|
*/
|
|
14695
15278
|
subscribed_events?: Array<WebhookUpdateSubscribedEvent> | undefined;
|
|
14696
15279
|
/**
|
|
14697
|
-
* Optional. The
|
|
15280
|
+
* Optional. The URI to which webhook events will be sent.
|
|
14698
15281
|
*/
|
|
14699
|
-
|
|
15282
|
+
uri?: string | undefined;
|
|
14700
15283
|
};
|
|
14701
15284
|
|
|
14702
15285
|
declare type WebhookUpdateParams$ = WebhookUpdate;
|
|
@@ -14706,11 +15289,6 @@ declare type WebhookUpdateParams = {
|
|
|
14706
15289
|
update_mask?: string;
|
|
14707
15290
|
} & webhooks.WebhookUpdate;
|
|
14708
15291
|
|
|
14709
|
-
/**
|
|
14710
|
-
* Optional. The state of the webhook.
|
|
14711
|
-
*/
|
|
14712
|
-
declare type WebhookUpdateState = "enabled" | "disabled" | "disabled_due_to_failed_deliveries";
|
|
14713
|
-
|
|
14714
15292
|
/**
|
|
14715
15293
|
* @license
|
|
14716
15294
|
* Copyright 2026 Google LLC
|
|
@@ -14718,6 +15296,11 @@ declare type WebhookUpdateState = "enabled" | "disabled" | "disabled_due_to_fail
|
|
|
14718
15296
|
*
|
|
14719
15297
|
* g3-prettier-ignore-file
|
|
14720
15298
|
*/
|
|
15299
|
+
/**
|
|
15300
|
+
* Optional. The state of the webhook.
|
|
15301
|
+
*/
|
|
15302
|
+
declare type WebhookUpdateState = "enabled" | "disabled" | "disabled_due_to_failed_deliveries";
|
|
15303
|
+
|
|
14721
15304
|
declare type WebhookUpdateSubscribedEvent = "batch.succeeded" | "batch.expired" | "batch.failed" | "interaction.requires_action" | "interaction.completed" | "interaction.failed" | "video.generated" | (string & {});
|
|
14722
15305
|
|
|
14723
15306
|
/** Standard web search for grounding and related configurations. Only text results are returned. */
|