@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/web/web.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. */
|
|
@@ -5819,7 +5921,6 @@ export declare interface GoogleMaps {
|
|
|
5819
5921
|
* A tool that can be used by the model to call Google Maps.
|
|
5820
5922
|
*/
|
|
5821
5923
|
declare type GoogleMaps_2 = {
|
|
5822
|
-
type: "google_maps";
|
|
5823
5924
|
/**
|
|
5824
5925
|
* Whether to return a widget context token in the tool call result of the
|
|
5825
5926
|
*
|
|
@@ -5835,6 +5936,7 @@ declare type GoogleMaps_2 = {
|
|
|
5835
5936
|
* The longitude of the user's location.
|
|
5836
5937
|
*/
|
|
5837
5938
|
longitude?: number | undefined;
|
|
5939
|
+
type: "google_maps";
|
|
5838
5940
|
};
|
|
5839
5941
|
|
|
5840
5942
|
declare type GoogleMapsCall$ = GoogleMapsCallDelta;
|
|
@@ -5859,7 +5961,6 @@ declare type GoogleMapsCallArguments = {
|
|
|
5859
5961
|
};
|
|
5860
5962
|
|
|
5861
5963
|
declare type GoogleMapsCallDelta = {
|
|
5862
|
-
type: "google_maps_call";
|
|
5863
5964
|
/**
|
|
5864
5965
|
* The arguments to pass to the Google Maps tool.
|
|
5865
5966
|
*/
|
|
@@ -5868,6 +5969,7 @@ declare type GoogleMapsCallDelta = {
|
|
|
5868
5969
|
* A signature hash for backend validation.
|
|
5869
5970
|
*/
|
|
5870
5971
|
signature?: string | undefined;
|
|
5972
|
+
type: "google_maps_call";
|
|
5871
5973
|
};
|
|
5872
5974
|
|
|
5873
5975
|
declare type GoogleMapsCallStep$ = GoogleMapsCallStep;
|
|
@@ -5876,7 +5978,6 @@ declare type GoogleMapsCallStep$ = GoogleMapsCallStep;
|
|
|
5876
5978
|
* Google Maps call step.
|
|
5877
5979
|
*/
|
|
5878
5980
|
declare type GoogleMapsCallStep = {
|
|
5879
|
-
type: "google_maps_call";
|
|
5880
5981
|
/**
|
|
5881
5982
|
* The arguments to pass to the Google Maps tool.
|
|
5882
5983
|
*/
|
|
@@ -5889,6 +5990,7 @@ declare type GoogleMapsCallStep = {
|
|
|
5889
5990
|
* A signature hash for backend validation.
|
|
5890
5991
|
*/
|
|
5891
5992
|
signature?: string | undefined;
|
|
5993
|
+
type: "google_maps_call";
|
|
5892
5994
|
};
|
|
5893
5995
|
|
|
5894
5996
|
declare type GoogleMapsResult$ = GoogleMapsResult;
|
|
@@ -5904,7 +6006,6 @@ declare type GoogleMapsResult = {
|
|
|
5904
6006
|
};
|
|
5905
6007
|
|
|
5906
6008
|
declare type GoogleMapsResultDelta = {
|
|
5907
|
-
type: "google_maps_result";
|
|
5908
6009
|
/**
|
|
5909
6010
|
* The results of the Google Maps.
|
|
5910
6011
|
*/
|
|
@@ -5913,13 +6014,14 @@ declare type GoogleMapsResultDelta = {
|
|
|
5913
6014
|
* A signature hash for backend validation.
|
|
5914
6015
|
*/
|
|
5915
6016
|
signature?: string | undefined;
|
|
6017
|
+
type: "google_maps_result";
|
|
5916
6018
|
};
|
|
5917
6019
|
|
|
5918
6020
|
declare type GoogleMapsResultPlaces = {
|
|
5919
|
-
place_id?: string | undefined;
|
|
5920
6021
|
name?: string | undefined;
|
|
5921
|
-
|
|
6022
|
+
place_id?: string | undefined;
|
|
5922
6023
|
review_snippets?: Array<ReviewSnippet> | undefined;
|
|
6024
|
+
url?: string | undefined;
|
|
5923
6025
|
};
|
|
5924
6026
|
|
|
5925
6027
|
declare type GoogleMapsResultStep$ = GoogleMapsResultStep;
|
|
@@ -5928,16 +6030,16 @@ declare type GoogleMapsResultStep$ = GoogleMapsResultStep;
|
|
|
5928
6030
|
* Google Maps result step.
|
|
5929
6031
|
*/
|
|
5930
6032
|
declare type GoogleMapsResultStep = {
|
|
5931
|
-
type: "google_maps_result";
|
|
5932
|
-
result: Array<GoogleMapsResult>;
|
|
5933
6033
|
/**
|
|
5934
6034
|
* Required. ID to match the ID from the function call block.
|
|
5935
6035
|
*/
|
|
5936
6036
|
call_id: string;
|
|
6037
|
+
result: Array<GoogleMapsResult>;
|
|
5937
6038
|
/**
|
|
5938
6039
|
* A signature hash for backend validation.
|
|
5939
6040
|
*/
|
|
5940
6041
|
signature?: string | undefined;
|
|
6042
|
+
type: "google_maps_result";
|
|
5941
6043
|
};
|
|
5942
6044
|
|
|
5943
6045
|
/** 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. */
|
|
@@ -5968,11 +6070,11 @@ export declare interface GoogleSearch {
|
|
|
5968
6070
|
* A tool that can be used by the model to search Google.
|
|
5969
6071
|
*/
|
|
5970
6072
|
declare type GoogleSearch_2 = {
|
|
5971
|
-
type: "google_search";
|
|
5972
6073
|
/**
|
|
5973
6074
|
* The types of search grounding to enable.
|
|
5974
6075
|
*/
|
|
5975
6076
|
search_types?: Array<GoogleSearchSearchType> | undefined;
|
|
6077
|
+
type: "google_search";
|
|
5976
6078
|
};
|
|
5977
6079
|
|
|
5978
6080
|
declare type GoogleSearchCall$ = GoogleSearchCallDelta;
|
|
@@ -5997,7 +6099,6 @@ declare type GoogleSearchCallArguments = {
|
|
|
5997
6099
|
};
|
|
5998
6100
|
|
|
5999
6101
|
declare type GoogleSearchCallDelta = {
|
|
6000
|
-
type: "google_search_call";
|
|
6001
6102
|
/**
|
|
6002
6103
|
* The arguments to pass to Google Search.
|
|
6003
6104
|
*/
|
|
@@ -6006,6 +6107,7 @@ declare type GoogleSearchCallDelta = {
|
|
|
6006
6107
|
* A signature hash for backend validation.
|
|
6007
6108
|
*/
|
|
6008
6109
|
signature?: string | undefined;
|
|
6110
|
+
type: "google_search_call";
|
|
6009
6111
|
};
|
|
6010
6112
|
|
|
6011
6113
|
declare type GoogleSearchCallStep$ = GoogleSearchCallStep;
|
|
@@ -6014,23 +6116,23 @@ declare type GoogleSearchCallStep$ = GoogleSearchCallStep;
|
|
|
6014
6116
|
* Google Search call step.
|
|
6015
6117
|
*/
|
|
6016
6118
|
declare type GoogleSearchCallStep = {
|
|
6017
|
-
type: "google_search_call";
|
|
6018
6119
|
/**
|
|
6019
6120
|
* The arguments to pass to Google Search.
|
|
6020
6121
|
*/
|
|
6021
6122
|
arguments: GoogleSearchCallArguments;
|
|
6022
|
-
/**
|
|
6023
|
-
* The type of search grounding enabled.
|
|
6024
|
-
*/
|
|
6025
|
-
search_type?: GoogleSearchCallStepSearchType | undefined;
|
|
6026
6123
|
/**
|
|
6027
6124
|
* Required. A unique ID for this specific tool call.
|
|
6028
6125
|
*/
|
|
6029
6126
|
id: string;
|
|
6127
|
+
/**
|
|
6128
|
+
* The type of search grounding enabled.
|
|
6129
|
+
*/
|
|
6130
|
+
search_type?: GoogleSearchCallStepSearchType | undefined;
|
|
6030
6131
|
/**
|
|
6031
6132
|
* A signature hash for backend validation.
|
|
6032
6133
|
*/
|
|
6033
6134
|
signature?: string | undefined;
|
|
6135
|
+
type: "google_search_call";
|
|
6034
6136
|
};
|
|
6035
6137
|
|
|
6036
6138
|
/**
|
|
@@ -6060,13 +6162,13 @@ declare type GoogleSearchResult = {
|
|
|
6060
6162
|
};
|
|
6061
6163
|
|
|
6062
6164
|
declare type GoogleSearchResultDelta = {
|
|
6063
|
-
type: "google_search_result";
|
|
6064
|
-
result: Array<GoogleSearchResult>;
|
|
6065
6165
|
is_error?: boolean | undefined;
|
|
6166
|
+
result: Array<GoogleSearchResult>;
|
|
6066
6167
|
/**
|
|
6067
6168
|
* A signature hash for backend validation.
|
|
6068
6169
|
*/
|
|
6069
6170
|
signature?: string | undefined;
|
|
6171
|
+
type: "google_search_result";
|
|
6070
6172
|
};
|
|
6071
6173
|
|
|
6072
6174
|
declare type GoogleSearchResultStep$ = GoogleSearchResultStep;
|
|
@@ -6075,23 +6177,23 @@ declare type GoogleSearchResultStep$ = GoogleSearchResultStep;
|
|
|
6075
6177
|
* Google Search result step.
|
|
6076
6178
|
*/
|
|
6077
6179
|
declare type GoogleSearchResultStep = {
|
|
6078
|
-
type: "google_search_result";
|
|
6079
6180
|
/**
|
|
6080
|
-
* Required.
|
|
6181
|
+
* Required. ID to match the ID from the function call block.
|
|
6081
6182
|
*/
|
|
6082
|
-
|
|
6183
|
+
call_id: string;
|
|
6083
6184
|
/**
|
|
6084
6185
|
* Whether the Google Search resulted in an error.
|
|
6085
6186
|
*/
|
|
6086
6187
|
is_error?: boolean | undefined;
|
|
6087
6188
|
/**
|
|
6088
|
-
* Required.
|
|
6189
|
+
* Required. The results of the Google Search.
|
|
6089
6190
|
*/
|
|
6090
|
-
|
|
6191
|
+
result: Array<GoogleSearchResult>;
|
|
6091
6192
|
/**
|
|
6092
6193
|
* A signature hash for backend validation.
|
|
6093
6194
|
*/
|
|
6094
6195
|
signature?: string | undefined;
|
|
6196
|
+
type: "google_search_result";
|
|
6095
6197
|
};
|
|
6096
6198
|
|
|
6097
6199
|
/** Tool to retrieve public web data for grounding, powered by Google. */
|
|
@@ -6294,7 +6396,7 @@ export declare interface GroundingMetadata {
|
|
|
6294
6396
|
searchEntryPoint?: SearchEntryPoint;
|
|
6295
6397
|
/** Web search queries for the following-up web search. */
|
|
6296
6398
|
webSearchQueries?: string[];
|
|
6297
|
-
/** 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. */
|
|
6399
|
+
/** 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. */
|
|
6298
6400
|
googleMapsWidgetContextToken?: string;
|
|
6299
6401
|
/** 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. */
|
|
6300
6402
|
retrievalQueries?: string[];
|
|
@@ -6334,14 +6436,14 @@ declare type GroundingToolCount$ = GroundingToolCount;
|
|
|
6334
6436
|
* The number of grounding tool counts.
|
|
6335
6437
|
*/
|
|
6336
6438
|
declare type GroundingToolCount = {
|
|
6337
|
-
/**
|
|
6338
|
-
* The grounding tool type associated with the count.
|
|
6339
|
-
*/
|
|
6340
|
-
type?: GroundingToolCountType | undefined;
|
|
6341
6439
|
/**
|
|
6342
6440
|
* The number of grounding tool counts.
|
|
6343
6441
|
*/
|
|
6344
6442
|
count?: number | undefined;
|
|
6443
|
+
/**
|
|
6444
|
+
* The grounding tool type associated with the count.
|
|
6445
|
+
*/
|
|
6446
|
+
type?: GroundingToolCountType | undefined;
|
|
6345
6447
|
};
|
|
6346
6448
|
|
|
6347
6449
|
/**
|
|
@@ -6400,6 +6502,8 @@ export declare enum HarmBlockThreshold {
|
|
|
6400
6502
|
OFF = "OFF"
|
|
6401
6503
|
}
|
|
6402
6504
|
|
|
6505
|
+
declare type HarmCategory$ = HarmCategory_2;
|
|
6506
|
+
|
|
6403
6507
|
/** The harm category to be blocked. */
|
|
6404
6508
|
export declare enum HarmCategory {
|
|
6405
6509
|
/**
|
|
@@ -6448,6 +6552,15 @@ export declare enum HarmCategory {
|
|
|
6448
6552
|
HARM_CATEGORY_JAILBREAK = "HARM_CATEGORY_JAILBREAK"
|
|
6449
6553
|
}
|
|
6450
6554
|
|
|
6555
|
+
/**
|
|
6556
|
+
* @license
|
|
6557
|
+
* Copyright 2026 Google LLC
|
|
6558
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6559
|
+
*
|
|
6560
|
+
* g3-prettier-ignore-file
|
|
6561
|
+
*/
|
|
6562
|
+
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 & {});
|
|
6563
|
+
|
|
6451
6564
|
/** Output only. The probability of harm for this category. */
|
|
6452
6565
|
export declare enum HarmProbability {
|
|
6453
6566
|
/**
|
|
@@ -6707,20 +6820,20 @@ declare type ImageContent$ = ImageContent;
|
|
|
6707
6820
|
* An image content block.
|
|
6708
6821
|
*/
|
|
6709
6822
|
declare type ImageContent = {
|
|
6710
|
-
type: "image";
|
|
6711
6823
|
/**
|
|
6712
6824
|
* The image content.
|
|
6713
6825
|
*/
|
|
6714
6826
|
data?: string | undefined;
|
|
6715
|
-
/**
|
|
6716
|
-
* The URI of the image.
|
|
6717
|
-
*/
|
|
6718
|
-
uri?: string | undefined;
|
|
6719
6827
|
/**
|
|
6720
6828
|
* The mime type of the image.
|
|
6721
6829
|
*/
|
|
6722
6830
|
mime_type?: ImageContentMimeType | undefined;
|
|
6723
6831
|
resolution?: MediaResolution_2 | undefined;
|
|
6832
|
+
type: "image";
|
|
6833
|
+
/**
|
|
6834
|
+
* The URI of the image.
|
|
6835
|
+
*/
|
|
6836
|
+
uri?: string | undefined;
|
|
6724
6837
|
};
|
|
6725
6838
|
|
|
6726
6839
|
/**
|
|
@@ -6729,11 +6842,11 @@ declare type ImageContent = {
|
|
|
6729
6842
|
declare type ImageContentMimeType = "image/png" | "image/jpeg" | "image/webp" | "image/heic" | "image/heif" | "image/gif" | "image/bmp" | "image/tiff" | (string & {});
|
|
6730
6843
|
|
|
6731
6844
|
declare type ImageDelta = {
|
|
6732
|
-
type: "image";
|
|
6733
6845
|
data?: string | undefined;
|
|
6734
|
-
uri?: string | undefined;
|
|
6735
6846
|
mime_type?: ImageDeltaMimeType | undefined;
|
|
6736
6847
|
resolution?: MediaResolution_2 | undefined;
|
|
6848
|
+
type: "image";
|
|
6849
|
+
uri?: string | undefined;
|
|
6737
6850
|
};
|
|
6738
6851
|
|
|
6739
6852
|
declare type ImageDeltaMimeType = "image/png" | "image/jpeg" | "image/webp" | "image/heic" | "image/heif" | "image/gif" | "image/bmp" | "image/tiff" | (string & {});
|
|
@@ -6788,31 +6901,50 @@ export declare enum ImageResizeMode {
|
|
|
6788
6901
|
PAD = "PAD"
|
|
6789
6902
|
}
|
|
6790
6903
|
|
|
6791
|
-
declare type ImageResponseFormat$ =
|
|
6904
|
+
declare type ImageResponseFormat$ = ImageResponseFormat_2;
|
|
6905
|
+
|
|
6906
|
+
/** Configuration for image-specific output formatting. */
|
|
6907
|
+
export declare class ImageResponseFormat {
|
|
6908
|
+
/** Optional. The aspect ratio for the image output. */
|
|
6909
|
+
aspectRatio?: AspectRatio;
|
|
6910
|
+
/** Optional. Delivery mode for the generated content. */
|
|
6911
|
+
delivery?: Delivery;
|
|
6912
|
+
/** Optional. The size of the image output. */
|
|
6913
|
+
imageSize?: ImageSize;
|
|
6914
|
+
/** Optional. The MIME type of the image output. */
|
|
6915
|
+
mimeType?: string;
|
|
6916
|
+
}
|
|
6792
6917
|
|
|
6793
6918
|
/**
|
|
6794
6919
|
* Configuration for image output format.
|
|
6795
6920
|
*/
|
|
6796
|
-
declare type
|
|
6797
|
-
type: "image";
|
|
6921
|
+
declare type ImageResponseFormat_2 = {
|
|
6798
6922
|
/**
|
|
6799
|
-
* The
|
|
6923
|
+
* The aspect ratio for the image output.
|
|
6800
6924
|
*/
|
|
6801
|
-
|
|
6925
|
+
aspect_ratio?: ImageResponseFormatAspectRatio | undefined;
|
|
6802
6926
|
/**
|
|
6803
6927
|
* The delivery mode for the image output.
|
|
6804
6928
|
*/
|
|
6805
6929
|
delivery?: ImageResponseFormatDelivery | undefined;
|
|
6806
|
-
/**
|
|
6807
|
-
* The aspect ratio for the image output.
|
|
6808
|
-
*/
|
|
6809
|
-
aspect_ratio?: ImageResponseFormatAspectRatio | undefined;
|
|
6810
6930
|
/**
|
|
6811
6931
|
* The size of the image output.
|
|
6812
6932
|
*/
|
|
6813
6933
|
image_size?: ImageResponseFormatImageSize | undefined;
|
|
6934
|
+
/**
|
|
6935
|
+
* The MIME type of the image output.
|
|
6936
|
+
*/
|
|
6937
|
+
mime_type?: ImageResponseFormatMimeType | undefined;
|
|
6938
|
+
type: "image";
|
|
6814
6939
|
};
|
|
6815
6940
|
|
|
6941
|
+
/**
|
|
6942
|
+
* @license
|
|
6943
|
+
* Copyright 2026 Google LLC
|
|
6944
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6945
|
+
*
|
|
6946
|
+
* g3-prettier-ignore-file
|
|
6947
|
+
*/
|
|
6816
6948
|
/**
|
|
6817
6949
|
* The aspect ratio for the image output.
|
|
6818
6950
|
*/
|
|
@@ -6828,13 +6960,6 @@ declare type ImageResponseFormatDelivery = "inline" | "uri" | (string & {});
|
|
|
6828
6960
|
*/
|
|
6829
6961
|
declare type ImageResponseFormatImageSize = "512" | "1K" | "2K" | "4K" | (string & {});
|
|
6830
6962
|
|
|
6831
|
-
/**
|
|
6832
|
-
* @license
|
|
6833
|
-
* Copyright 2026 Google LLC
|
|
6834
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
6835
|
-
*
|
|
6836
|
-
* g3-prettier-ignore-file
|
|
6837
|
-
*/
|
|
6838
6963
|
/**
|
|
6839
6964
|
* The MIME type of the image output.
|
|
6840
6965
|
*/
|
|
@@ -6844,16 +6969,40 @@ declare type ImageResponseFormatMimeType = "image/jpeg";
|
|
|
6844
6969
|
export declare interface ImageSearch {
|
|
6845
6970
|
}
|
|
6846
6971
|
|
|
6847
|
-
/**
|
|
6848
|
-
export declare
|
|
6849
|
-
/**
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6972
|
+
/** The size of the image output. */
|
|
6973
|
+
export declare enum ImageSize {
|
|
6974
|
+
/**
|
|
6975
|
+
* Default value. This value is unused.
|
|
6976
|
+
*/
|
|
6977
|
+
IMAGE_SIZE_UNSPECIFIED = "IMAGE_SIZE_UNSPECIFIED",
|
|
6978
|
+
/**
|
|
6979
|
+
* 512px image size.
|
|
6980
|
+
*/
|
|
6981
|
+
IMAGE_SIZE_FIVE_TWELVE = "IMAGE_SIZE_FIVE_TWELVE",
|
|
6982
|
+
/**
|
|
6983
|
+
* 1K image size.
|
|
6984
|
+
*/
|
|
6985
|
+
IMAGE_SIZE_ONE_K = "IMAGE_SIZE_ONE_K",
|
|
6986
|
+
/**
|
|
6987
|
+
* 2K image size.
|
|
6988
|
+
*/
|
|
6989
|
+
IMAGE_SIZE_TWO_K = "IMAGE_SIZE_TWO_K",
|
|
6990
|
+
/**
|
|
6991
|
+
* 4K image size.
|
|
6992
|
+
*/
|
|
6993
|
+
IMAGE_SIZE_FOUR_K = "IMAGE_SIZE_FOUR_K"
|
|
6994
|
+
}
|
|
6995
|
+
|
|
6996
|
+
/** Optional parameters for importing a file. */
|
|
6997
|
+
export declare interface ImportFileConfig {
|
|
6998
|
+
/** Used to override HTTP request options. */
|
|
6999
|
+
httpOptions?: HttpOptions;
|
|
7000
|
+
/** Abort signal which can be used to cancel the request.
|
|
7001
|
+
|
|
7002
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
7003
|
+
operation will not cancel the request in the service. You will still
|
|
7004
|
+
be charged usage for any applicable operations.
|
|
7005
|
+
*/
|
|
6857
7006
|
abortSignal?: AbortSignal;
|
|
6858
7007
|
/** User provided custom metadata stored as key-value pairs used for querying. */
|
|
6859
7008
|
customMetadata?: CustomMetadata[];
|
|
@@ -7021,7 +7170,7 @@ declare type Interaction = {
|
|
|
7021
7170
|
/**
|
|
7022
7171
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
7023
7172
|
*/
|
|
7024
|
-
response_format?: Array<
|
|
7173
|
+
response_format?: Array<ResponseFormat_2> | ResponseFormat_2 | undefined;
|
|
7025
7174
|
/**
|
|
7026
7175
|
* The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
|
|
7027
7176
|
*/
|
|
@@ -7044,6 +7193,16 @@ declare type Interaction = {
|
|
|
7044
7193
|
* Configuration parameters for the agent interaction.
|
|
7045
7194
|
*/
|
|
7046
7195
|
agent_config?: DynamicAgentConfig | DeepResearchAgentConfig | undefined;
|
|
7196
|
+
/**
|
|
7197
|
+
* Safety settings for the interaction.
|
|
7198
|
+
*/
|
|
7199
|
+
safety_settings?: Array<SafetySetting_2> | undefined;
|
|
7200
|
+
/**
|
|
7201
|
+
* The labels with user-defined metadata for the request.
|
|
7202
|
+
*/
|
|
7203
|
+
labels?: {
|
|
7204
|
+
[k: string]: string;
|
|
7205
|
+
} | undefined;
|
|
7047
7206
|
/**
|
|
7048
7207
|
* The input for the interaction.
|
|
7049
7208
|
*/
|
|
@@ -7157,7 +7316,7 @@ declare type InteractionGetParamsStreaming = GetInteractionByIdParamsStreaming;
|
|
|
7157
7316
|
/**
|
|
7158
7317
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
7159
7318
|
*/
|
|
7160
|
-
declare type InteractionResponseFormat = Array<
|
|
7319
|
+
declare type InteractionResponseFormat = Array<ResponseFormat_2> | ResponseFormat_2;
|
|
7161
7320
|
|
|
7162
7321
|
export declare namespace Interactions {
|
|
7163
7322
|
export type AllowedTools = AllowedTools$;
|
|
@@ -7200,6 +7359,7 @@ export declare namespace Interactions {
|
|
|
7200
7359
|
export type GoogleSearchResult = GoogleSearchResult$;
|
|
7201
7360
|
export interface GoogleSearchResultStep extends GoogleSearchResultStep$ {
|
|
7202
7361
|
}
|
|
7362
|
+
export type HarmCategory = HarmCategory$;
|
|
7203
7363
|
export type ImageConfig = ImageConfig$;
|
|
7204
7364
|
export type ImageContent = ImageContent$;
|
|
7205
7365
|
export type ImageResponseFormat = ImageResponseFormat$;
|
|
@@ -7221,9 +7381,15 @@ export declare namespace Interactions {
|
|
|
7221
7381
|
export type MCPServerToolCallStep = MCPServerToolCallStep$;
|
|
7222
7382
|
export type MCPServerToolResultStep = MCPServerToolResultStep$;
|
|
7223
7383
|
export type Model = Model$;
|
|
7224
|
-
export
|
|
7384
|
+
export interface ModelOutputStep extends ModelOutputStep$ {
|
|
7385
|
+
}
|
|
7225
7386
|
export interface PlaceCitation extends PlaceCitation$ {
|
|
7226
7387
|
}
|
|
7388
|
+
export type RetrievalCallArguments = RetrievalCallArguments$;
|
|
7389
|
+
export interface RetrievalCallDelta extends RetrievalCallDelta$ {
|
|
7390
|
+
}
|
|
7391
|
+
export type RetrievalResultDelta = RetrievalResultDelta$;
|
|
7392
|
+
export type SafetySetting = SafetySetting$;
|
|
7227
7393
|
export type SpeechConfig = SpeechConfig$;
|
|
7228
7394
|
export type Step = Step$;
|
|
7229
7395
|
export interface StepDelta extends StepDelta$ {
|
|
@@ -7249,18 +7415,16 @@ export declare namespace Interactions {
|
|
|
7249
7415
|
export interface Usage extends Usage$ {
|
|
7250
7416
|
}
|
|
7251
7417
|
export type UserInputStep = UserInputStep$;
|
|
7418
|
+
export type VideoConfig = VideoConfig$;
|
|
7252
7419
|
export type VideoContent = VideoContent$;
|
|
7420
|
+
export type VideoResponseFormat = VideoResponseFormat$;
|
|
7253
7421
|
export type WebhookConfig = WebhookConfig$;
|
|
7254
7422
|
export namespace CodeExecutionCallStep {
|
|
7255
7423
|
export type Arguments = Arguments$;
|
|
7256
7424
|
}
|
|
7257
7425
|
export namespace Environment {
|
|
7258
|
-
export
|
|
7259
|
-
}
|
|
7426
|
+
export type Allowlist = Allowlist$;
|
|
7260
7427
|
export type Source = Source$;
|
|
7261
|
-
export namespace Allowlist {
|
|
7262
|
-
export type Allowlist = Allowlist$2;
|
|
7263
|
-
}
|
|
7264
7428
|
}
|
|
7265
7429
|
export namespace ErrorEvent {
|
|
7266
7430
|
export type Error = Error$;
|
|
@@ -7306,9 +7470,15 @@ export declare namespace Interactions {
|
|
|
7306
7470
|
export namespace InteractionStatusUpdate {
|
|
7307
7471
|
export type Metadata = Metadata$4;
|
|
7308
7472
|
}
|
|
7473
|
+
export namespace ModelOutputStep {
|
|
7474
|
+
export type Error = Error$2;
|
|
7475
|
+
}
|
|
7309
7476
|
export namespace PlaceCitation {
|
|
7310
7477
|
export type ReviewSnippet = ReviewSnippet$3;
|
|
7311
7478
|
}
|
|
7479
|
+
export namespace RetrievalCallDelta {
|
|
7480
|
+
export type Arguments = Arguments$4;
|
|
7481
|
+
}
|
|
7312
7482
|
export namespace StepDelta {
|
|
7313
7483
|
export type ArgumentsDelta = ArgumentsDelta$;
|
|
7314
7484
|
export type Audio = Audio$;
|
|
@@ -7355,7 +7525,7 @@ export declare namespace Interactions {
|
|
|
7355
7525
|
}
|
|
7356
7526
|
}
|
|
7357
7527
|
export namespace URLContextCallStep {
|
|
7358
|
-
export type Arguments = Arguments$
|
|
7528
|
+
export type Arguments = Arguments$5;
|
|
7359
7529
|
}
|
|
7360
7530
|
export namespace URLContextResultStep {
|
|
7361
7531
|
export type Result = Result$3;
|
|
@@ -7373,6 +7543,7 @@ declare namespace interactions {
|
|
|
7373
7543
|
export {
|
|
7374
7544
|
AgentOption,
|
|
7375
7545
|
AllowedTools,
|
|
7546
|
+
Transform,
|
|
7376
7547
|
AllowlistEntry,
|
|
7377
7548
|
Annotation,
|
|
7378
7549
|
ArgumentsDelta,
|
|
@@ -7380,9 +7551,9 @@ declare namespace interactions {
|
|
|
7380
7551
|
AudioContent,
|
|
7381
7552
|
AudioDeltaMimeType,
|
|
7382
7553
|
AudioDelta,
|
|
7383
|
-
AudioResponseFormatMimeType,
|
|
7384
7554
|
AudioResponseFormatDelivery,
|
|
7385
|
-
|
|
7555
|
+
AudioResponseFormatMimeType,
|
|
7556
|
+
AudioResponseFormat_2 as AudioResponseFormat,
|
|
7386
7557
|
Language_2 as Language,
|
|
7387
7558
|
CodeExecutionCallArguments,
|
|
7388
7559
|
CodeExecutionCallDelta,
|
|
@@ -7390,6 +7561,7 @@ declare namespace interactions {
|
|
|
7390
7561
|
CodeExecutionResultDelta,
|
|
7391
7562
|
CodeExecutionResultStep,
|
|
7392
7563
|
CodeExecution,
|
|
7564
|
+
DisabledSafetyPolicy,
|
|
7393
7565
|
EnvironmentEnum,
|
|
7394
7566
|
ComputerUse_2 as ComputerUse,
|
|
7395
7567
|
Content_2 as Content,
|
|
@@ -7455,6 +7627,7 @@ declare namespace interactions {
|
|
|
7455
7627
|
GoogleSearch_2 as GoogleSearch,
|
|
7456
7628
|
GroundingToolCountType,
|
|
7457
7629
|
GroundingToolCount,
|
|
7630
|
+
HarmCategory_2 as HarmCategory,
|
|
7458
7631
|
HybridSearch,
|
|
7459
7632
|
ImageConfigAspectRatio,
|
|
7460
7633
|
ImageConfigImageSize,
|
|
@@ -7463,11 +7636,11 @@ declare namespace interactions {
|
|
|
7463
7636
|
ImageContent,
|
|
7464
7637
|
ImageDeltaMimeType,
|
|
7465
7638
|
ImageDelta,
|
|
7466
|
-
ImageResponseFormatMimeType,
|
|
7467
|
-
ImageResponseFormatDelivery,
|
|
7468
7639
|
ImageResponseFormatAspectRatio,
|
|
7640
|
+
ImageResponseFormatDelivery,
|
|
7469
7641
|
ImageResponseFormatImageSize,
|
|
7470
|
-
|
|
7642
|
+
ImageResponseFormatMimeType,
|
|
7643
|
+
ImageResponseFormat_2 as ImageResponseFormat,
|
|
7471
7644
|
InteractionCompletedEvent,
|
|
7472
7645
|
InteractionCreatedEvent,
|
|
7473
7646
|
InteractionSseEventInteractionStatus,
|
|
@@ -7501,15 +7674,23 @@ declare namespace interactions {
|
|
|
7501
7674
|
RagRetrievalConfig_2 as RagRetrievalConfig,
|
|
7502
7675
|
RagStoreConfig,
|
|
7503
7676
|
Ranking,
|
|
7504
|
-
ResponseFormat,
|
|
7677
|
+
ResponseFormat_2 as ResponseFormat,
|
|
7505
7678
|
ResponseModality,
|
|
7506
|
-
|
|
7679
|
+
RetrievalCallArguments,
|
|
7680
|
+
RetrievalCallDeltaRetrievalType,
|
|
7681
|
+
RetrievalCallDelta,
|
|
7682
|
+
RetrievalResultDelta,
|
|
7683
|
+
RetrievalRetrievalType,
|
|
7507
7684
|
Retrieval_2 as Retrieval,
|
|
7508
7685
|
ReviewSnippet,
|
|
7686
|
+
Method,
|
|
7687
|
+
Threshold,
|
|
7688
|
+
SafetySetting_2 as SafetySetting,
|
|
7509
7689
|
ServiceTier_2 as ServiceTier,
|
|
7510
7690
|
SourceType,
|
|
7511
7691
|
Source,
|
|
7512
7692
|
SpeechConfig_2 as SpeechConfig,
|
|
7693
|
+
Status,
|
|
7513
7694
|
StepDeltaData,
|
|
7514
7695
|
StepDeltaMetadata,
|
|
7515
7696
|
StepDelta,
|
|
@@ -7521,7 +7702,7 @@ declare namespace interactions {
|
|
|
7521
7702
|
TextContent,
|
|
7522
7703
|
TextDelta,
|
|
7523
7704
|
TextResponseFormatMimeType,
|
|
7524
|
-
TextResponseFormat,
|
|
7705
|
+
TextResponseFormat_2 as TextResponseFormat,
|
|
7525
7706
|
ThinkingLevel_2 as ThinkingLevel,
|
|
7526
7707
|
ThinkingSummaries,
|
|
7527
7708
|
ThoughtSignatureDelta,
|
|
@@ -7536,7 +7717,6 @@ declare namespace interactions {
|
|
|
7536
7717
|
URLCitation,
|
|
7537
7718
|
URLContextCallArguments,
|
|
7538
7719
|
URLContextCallDelta,
|
|
7539
|
-
Arguments,
|
|
7540
7720
|
URLContextCallStep,
|
|
7541
7721
|
URLContextResultDelta,
|
|
7542
7722
|
URLContextResultStep,
|
|
@@ -7546,10 +7726,15 @@ declare namespace interactions {
|
|
|
7546
7726
|
Usage,
|
|
7547
7727
|
UserInputStep,
|
|
7548
7728
|
VertexAISearchConfig,
|
|
7729
|
+
Task,
|
|
7730
|
+
VideoConfig,
|
|
7549
7731
|
VideoContentMimeType,
|
|
7550
7732
|
VideoContent,
|
|
7551
7733
|
VideoDeltaMimeType,
|
|
7552
7734
|
VideoDelta,
|
|
7735
|
+
VideoResponseFormatAspectRatio,
|
|
7736
|
+
VideoResponseFormatDelivery,
|
|
7737
|
+
VideoResponseFormat_2 as VideoResponseFormat,
|
|
7553
7738
|
WebhookConfig_2 as WebhookConfig
|
|
7554
7739
|
}
|
|
7555
7740
|
}
|
|
@@ -7627,9 +7812,6 @@ declare type InteractionStatus = "in_progress" | "requires_action" | "completed"
|
|
|
7627
7812
|
declare type InteractionStatusUpdate$ = InteractionStatusUpdate;
|
|
7628
7813
|
|
|
7629
7814
|
declare type InteractionStatusUpdate = {
|
|
7630
|
-
event_type: "interaction.status_update";
|
|
7631
|
-
interaction_id: string;
|
|
7632
|
-
status: InteractionStatusUpdateStatus;
|
|
7633
7815
|
/**
|
|
7634
7816
|
* The event_id token to be used to resume the interaction stream, from
|
|
7635
7817
|
*
|
|
@@ -7637,7 +7819,10 @@ declare type InteractionStatusUpdate = {
|
|
|
7637
7819
|
* this event.
|
|
7638
7820
|
*/
|
|
7639
7821
|
event_id?: string | undefined;
|
|
7822
|
+
event_type: "interaction.status_update";
|
|
7823
|
+
interaction_id: string;
|
|
7640
7824
|
metadata?: StreamMetadata | undefined;
|
|
7825
|
+
status: InteractionStatusUpdateStatus;
|
|
7641
7826
|
};
|
|
7642
7827
|
|
|
7643
7828
|
declare type InteractionStatusUpdateStatus = "in_progress" | "requires_action" | "completed" | "failed" | "cancelled" | "incomplete" | "budget_exceeded" | (string & {});
|
|
@@ -8776,9 +8961,9 @@ export declare interface LiveServerSessionResumptionUpdate {
|
|
|
8776
8961
|
resumable?: boolean;
|
|
8777
8962
|
/** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.
|
|
8778
8963
|
|
|
8779
|
-
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 `
|
|
8964
|
+
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).
|
|
8780
8965
|
|
|
8781
|
-
Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames
|
|
8966
|
+
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. */
|
|
8782
8967
|
lastConsumedClientMessageIndex?: string;
|
|
8783
8968
|
}
|
|
8784
8969
|
|
|
@@ -8786,6 +8971,11 @@ export declare interface LiveServerSessionResumptionUpdate {
|
|
|
8786
8971
|
export declare interface LiveServerSetupComplete {
|
|
8787
8972
|
/** The session id of the live session. */
|
|
8788
8973
|
sessionId?: string;
|
|
8974
|
+
/** Signature of the verified consent audio. This is populated when the
|
|
8975
|
+
request has a ReplicatedVoiceConfig with consent_audio set, if the consent
|
|
8976
|
+
verification was successful. This may be used in a subsequent request
|
|
8977
|
+
instead of the consent_audio to verify the same consent. */
|
|
8978
|
+
voiceConsentSignature?: VoiceConsentSignature;
|
|
8789
8979
|
}
|
|
8790
8980
|
|
|
8791
8981
|
/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */
|
|
@@ -8874,22 +9064,22 @@ export declare enum MaskReferenceMode {
|
|
|
8874
9064
|
MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
|
|
8875
9065
|
}
|
|
8876
9066
|
|
|
8877
|
-
/** Match operation to use for
|
|
9067
|
+
/** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
|
|
8878
9068
|
export declare enum MatchOperation {
|
|
8879
9069
|
/**
|
|
8880
|
-
* Default value.
|
|
9070
|
+
* Default value. A user error will be returned if not set.
|
|
8881
9071
|
*/
|
|
8882
9072
|
MATCH_OPERATION_UNSPECIFIED = "MATCH_OPERATION_UNSPECIFIED",
|
|
8883
9073
|
/**
|
|
8884
|
-
* Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
|
|
9074
|
+
* Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
|
|
8885
9075
|
*/
|
|
8886
9076
|
REGEX_CONTAINS = "REGEX_CONTAINS",
|
|
8887
9077
|
/**
|
|
8888
|
-
* `
|
|
9078
|
+
* The match operation returns `true` if expression is a substring of the target.
|
|
8889
9079
|
*/
|
|
8890
9080
|
PARTIAL_MATCH = "PARTIAL_MATCH",
|
|
8891
9081
|
/**
|
|
8892
|
-
* `
|
|
9082
|
+
* The match operation returns `true` expression is an exact match of the target.
|
|
8893
9083
|
*/
|
|
8894
9084
|
EXACT_MATCH = "EXACT_MATCH"
|
|
8895
9085
|
}
|
|
@@ -8900,11 +9090,21 @@ declare type MCPServer$ = MCPServer;
|
|
|
8900
9090
|
* A MCPServer is a server that can be called by the model to perform actions.
|
|
8901
9091
|
*/
|
|
8902
9092
|
declare type MCPServer = {
|
|
8903
|
-
|
|
9093
|
+
/**
|
|
9094
|
+
* The allowed tools.
|
|
9095
|
+
*/
|
|
9096
|
+
allowed_tools?: Array<AllowedTools> | undefined;
|
|
9097
|
+
/**
|
|
9098
|
+
* Optional: Fields for authentication headers, timeouts, etc., if needed.
|
|
9099
|
+
*/
|
|
9100
|
+
headers?: {
|
|
9101
|
+
[k: string]: string;
|
|
9102
|
+
} | undefined;
|
|
8904
9103
|
/**
|
|
8905
9104
|
* The name of the MCPServer.
|
|
8906
9105
|
*/
|
|
8907
9106
|
name?: string | undefined;
|
|
9107
|
+
type: "mcp_server";
|
|
8908
9108
|
/**
|
|
8909
9109
|
* The full URL for the MCPServer endpoint.
|
|
8910
9110
|
*
|
|
@@ -8912,16 +9112,6 @@ declare type MCPServer = {
|
|
|
8912
9112
|
* Example: "https://api.example.com/mcp"
|
|
8913
9113
|
*/
|
|
8914
9114
|
url?: string | undefined;
|
|
8915
|
-
/**
|
|
8916
|
-
* Optional: Fields for authentication headers, timeouts, etc., if needed.
|
|
8917
|
-
*/
|
|
8918
|
-
headers?: {
|
|
8919
|
-
[k: string]: string;
|
|
8920
|
-
} | undefined;
|
|
8921
|
-
/**
|
|
8922
|
-
* The allowed tools.
|
|
8923
|
-
*/
|
|
8924
|
-
allowed_tools?: Array<AllowedTools> | undefined;
|
|
8925
9115
|
};
|
|
8926
9116
|
|
|
8927
9117
|
/** 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. */
|
|
@@ -8942,12 +9132,12 @@ declare type MCPServerToolCall$ = MCPServerToolCallDelta;
|
|
|
8942
9132
|
* g3-prettier-ignore-file
|
|
8943
9133
|
*/
|
|
8944
9134
|
declare type MCPServerToolCallDelta = {
|
|
8945
|
-
type: "mcp_server_tool_call";
|
|
8946
|
-
name: string;
|
|
8947
|
-
server_name: string;
|
|
8948
9135
|
arguments: {
|
|
8949
9136
|
[k: string]: any;
|
|
8950
9137
|
};
|
|
9138
|
+
name: string;
|
|
9139
|
+
server_name: string;
|
|
9140
|
+
type: "mcp_server_tool_call";
|
|
8951
9141
|
};
|
|
8952
9142
|
|
|
8953
9143
|
declare type MCPServerToolCallStep$ = MCPServerToolCallStep;
|
|
@@ -8963,15 +9153,6 @@ declare type MCPServerToolCallStep$ = MCPServerToolCallStep;
|
|
|
8963
9153
|
* MCPServer tool call step.
|
|
8964
9154
|
*/
|
|
8965
9155
|
declare type MCPServerToolCallStep = {
|
|
8966
|
-
type: "mcp_server_tool_call";
|
|
8967
|
-
/**
|
|
8968
|
-
* Required. The name of the tool which was called.
|
|
8969
|
-
*/
|
|
8970
|
-
name: string;
|
|
8971
|
-
/**
|
|
8972
|
-
* Required. The name of the used MCP server.
|
|
8973
|
-
*/
|
|
8974
|
-
server_name: string;
|
|
8975
9156
|
/**
|
|
8976
9157
|
* Required. The JSON object of arguments for the function.
|
|
8977
9158
|
*/
|
|
@@ -8982,15 +9163,24 @@ declare type MCPServerToolCallStep = {
|
|
|
8982
9163
|
* Required. A unique ID for this specific tool call.
|
|
8983
9164
|
*/
|
|
8984
9165
|
id: string;
|
|
9166
|
+
/**
|
|
9167
|
+
* Required. The name of the tool which was called.
|
|
9168
|
+
*/
|
|
9169
|
+
name: string;
|
|
9170
|
+
/**
|
|
9171
|
+
* Required. The name of the used MCP server.
|
|
9172
|
+
*/
|
|
9173
|
+
server_name: string;
|
|
9174
|
+
type: "mcp_server_tool_call";
|
|
8985
9175
|
};
|
|
8986
9176
|
|
|
8987
9177
|
declare type MCPServerToolResult$ = MCPServerToolResultDelta;
|
|
8988
9178
|
|
|
8989
9179
|
declare type MCPServerToolResultDelta = {
|
|
8990
|
-
type: "mcp_server_tool_result";
|
|
8991
9180
|
name?: string | undefined;
|
|
8992
|
-
server_name?: string | undefined;
|
|
8993
9181
|
result: MCPServerToolResultDeltaResult | Array<FunctionResultSubcontent> | string;
|
|
9182
|
+
server_name?: string | undefined;
|
|
9183
|
+
type: "mcp_server_tool_result";
|
|
8994
9184
|
};
|
|
8995
9185
|
|
|
8996
9186
|
declare type MCPServerToolResultDeltaResult = {};
|
|
@@ -9003,23 +9193,23 @@ declare type MCPServerToolResultStep$ = MCPServerToolResultStep;
|
|
|
9003
9193
|
* MCPServer tool result step.
|
|
9004
9194
|
*/
|
|
9005
9195
|
declare type MCPServerToolResultStep = {
|
|
9006
|
-
type: "mcp_server_tool_result";
|
|
9007
|
-
/**
|
|
9008
|
-
* Name of the tool which is called for this specific tool call.
|
|
9009
|
-
*/
|
|
9010
|
-
name?: string | undefined;
|
|
9011
|
-
/**
|
|
9012
|
-
* The name of the used MCP server.
|
|
9013
|
-
*/
|
|
9014
|
-
server_name?: string | undefined;
|
|
9015
9196
|
/**
|
|
9016
9197
|
* Required. ID to match the ID from the function call block.
|
|
9017
9198
|
*/
|
|
9018
9199
|
call_id: string;
|
|
9200
|
+
/**
|
|
9201
|
+
* Name of the tool which is called for this specific tool call.
|
|
9202
|
+
*/
|
|
9203
|
+
name?: string | undefined;
|
|
9019
9204
|
/**
|
|
9020
9205
|
* The output from the MCP server call. Can be simple text or rich content.
|
|
9021
9206
|
*/
|
|
9022
9207
|
result: MCPServerToolResultStepResult | string | Array<FunctionResultSubcontent>;
|
|
9208
|
+
/**
|
|
9209
|
+
* The name of the used MCP server.
|
|
9210
|
+
*/
|
|
9211
|
+
server_name?: string | undefined;
|
|
9212
|
+
type: "mcp_server_tool_result";
|
|
9023
9213
|
};
|
|
9024
9214
|
|
|
9025
9215
|
declare type MCPServerToolResultStepResult = {};
|
|
@@ -9112,6 +9302,14 @@ declare type Metadata$6 = StreamMetadata;
|
|
|
9112
9302
|
|
|
9113
9303
|
declare type Metadata$7 = StreamMetadata;
|
|
9114
9304
|
|
|
9305
|
+
/**
|
|
9306
|
+
* Optional. The method for blocking content. If not specified, the default
|
|
9307
|
+
*
|
|
9308
|
+
* @remarks
|
|
9309
|
+
* behavior is to use the probability score.
|
|
9310
|
+
*/
|
|
9311
|
+
declare type Method = "severity" | "probability" | (string & {});
|
|
9312
|
+
|
|
9115
9313
|
/** Server content modalities. */
|
|
9116
9314
|
export declare enum Modality {
|
|
9117
9315
|
/**
|
|
@@ -9238,8 +9436,20 @@ declare type ModelOutputStep$ = ModelOutputStep;
|
|
|
9238
9436
|
* Output generated by the model.
|
|
9239
9437
|
*/
|
|
9240
9438
|
declare type ModelOutputStep = {
|
|
9241
|
-
type: "model_output";
|
|
9242
9439
|
content?: Array<Content_2> | undefined;
|
|
9440
|
+
/**
|
|
9441
|
+
* The `Status` type defines a logical error model that is suitable for
|
|
9442
|
+
*
|
|
9443
|
+
* @remarks
|
|
9444
|
+
* different programming environments, including REST APIs and RPC APIs. It is
|
|
9445
|
+
* used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
|
9446
|
+
* three pieces of data: error code, error message, and error details.
|
|
9447
|
+
*
|
|
9448
|
+
* You can find out more about this error model and how to work with it in the
|
|
9449
|
+
* [API Design Guide](https://cloud.google.com/apis/design/errors).
|
|
9450
|
+
*/
|
|
9451
|
+
error?: Status | undefined;
|
|
9452
|
+
type: "model_output";
|
|
9243
9453
|
};
|
|
9244
9454
|
|
|
9245
9455
|
export declare class Models extends BaseModule {
|
|
@@ -9313,7 +9523,7 @@ export declare class Models extends BaseModule {
|
|
|
9313
9523
|
* To maintain backward compatibility, we move the data that was treated as
|
|
9314
9524
|
* JSON schema from the responseSchema field to the responseJsonSchema field.
|
|
9315
9525
|
*/
|
|
9316
|
-
private
|
|
9526
|
+
private maybeMoveToResponseJsonSchema;
|
|
9317
9527
|
/**
|
|
9318
9528
|
* Makes an API request to generate content with a given model and yields the
|
|
9319
9529
|
* response in chunks.
|
|
@@ -10148,19 +10358,18 @@ declare type PlaceCitation$ = PlaceCitation;
|
|
|
10148
10358
|
* A place citation annotation.
|
|
10149
10359
|
*/
|
|
10150
10360
|
declare type PlaceCitation = {
|
|
10151
|
-
type: "place_citation";
|
|
10152
10361
|
/**
|
|
10153
|
-
*
|
|
10362
|
+
* End of the attributed segment, exclusive.
|
|
10154
10363
|
*/
|
|
10155
|
-
|
|
10364
|
+
end_index?: number | undefined;
|
|
10156
10365
|
/**
|
|
10157
10366
|
* Title of the place.
|
|
10158
10367
|
*/
|
|
10159
10368
|
name?: string | undefined;
|
|
10160
10369
|
/**
|
|
10161
|
-
*
|
|
10370
|
+
* The ID of the place, in `places/{place_id}` format.
|
|
10162
10371
|
*/
|
|
10163
|
-
|
|
10372
|
+
place_id?: string | undefined;
|
|
10164
10373
|
/**
|
|
10165
10374
|
* Snippets of reviews that are used to generate answers about the
|
|
10166
10375
|
*
|
|
@@ -10176,10 +10385,11 @@ declare type PlaceCitation = {
|
|
|
10176
10385
|
* Index indicates the start of the segment, measured in bytes.
|
|
10177
10386
|
*/
|
|
10178
10387
|
start_index?: number | undefined;
|
|
10388
|
+
type: "place_citation";
|
|
10179
10389
|
/**
|
|
10180
|
-
*
|
|
10390
|
+
* URI reference of the place.
|
|
10181
10391
|
*/
|
|
10182
|
-
|
|
10392
|
+
url?: string | undefined;
|
|
10183
10393
|
};
|
|
10184
10394
|
|
|
10185
10395
|
/** Spec for pointwise metric result. This data type is not supported in Gemini API. */
|
|
@@ -10347,21 +10557,21 @@ export declare interface RagRetrievalConfig {
|
|
|
10347
10557
|
*/
|
|
10348
10558
|
declare type RagRetrievalConfig_2 = {
|
|
10349
10559
|
/**
|
|
10350
|
-
*
|
|
10560
|
+
* Config for filters.
|
|
10351
10561
|
*/
|
|
10352
|
-
|
|
10562
|
+
filter?: Filter | undefined;
|
|
10353
10563
|
/**
|
|
10354
10564
|
* Config for Hybrid Search.
|
|
10355
10565
|
*/
|
|
10356
10566
|
hybrid_search?: HybridSearch | undefined;
|
|
10357
|
-
/**
|
|
10358
|
-
* Config for filters.
|
|
10359
|
-
*/
|
|
10360
|
-
filter?: Filter | undefined;
|
|
10361
10567
|
/**
|
|
10362
10568
|
* Config for Rank Service.
|
|
10363
10569
|
*/
|
|
10364
10570
|
ranking?: Ranking | undefined;
|
|
10571
|
+
/**
|
|
10572
|
+
* Optional. The number of contexts to retrieve.
|
|
10573
|
+
*/
|
|
10574
|
+
top_k?: number | undefined;
|
|
10365
10575
|
};
|
|
10366
10576
|
|
|
10367
10577
|
/** Config for filters. This data type is not supported in Gemini API. */
|
|
@@ -10408,6 +10618,10 @@ declare type RagStoreConfig = {
|
|
|
10408
10618
|
* Optional. The representation of the rag source.
|
|
10409
10619
|
*/
|
|
10410
10620
|
rag_resources?: Array<RagResource> | undefined;
|
|
10621
|
+
/**
|
|
10622
|
+
* Specifies the context retrieval config.
|
|
10623
|
+
*/
|
|
10624
|
+
rag_retrieval_config?: RagRetrievalConfig_2 | undefined;
|
|
10411
10625
|
/**
|
|
10412
10626
|
* Optional. Number of top k results to return from the selected corpora.
|
|
10413
10627
|
*
|
|
@@ -10420,10 +10634,6 @@ declare type RagStoreConfig = {
|
|
|
10420
10634
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
10421
10635
|
*/
|
|
10422
10636
|
vector_distance_threshold?: number | undefined;
|
|
10423
|
-
/**
|
|
10424
|
-
* Specifies the context retrieval config.
|
|
10425
|
-
*/
|
|
10426
|
-
rag_retrieval_config?: RagRetrievalConfig_2 | undefined;
|
|
10427
10637
|
};
|
|
10428
10638
|
|
|
10429
10639
|
/**
|
|
@@ -10437,11 +10647,11 @@ declare type RagStoreConfig = {
|
|
|
10437
10647
|
* Config for Rank Service.
|
|
10438
10648
|
*/
|
|
10439
10649
|
declare type Ranking = {
|
|
10440
|
-
ranking_config: "rank_service";
|
|
10441
10650
|
/**
|
|
10442
10651
|
* Optional. The model name of the rank service.
|
|
10443
10652
|
*/
|
|
10444
10653
|
model_name?: string | undefined;
|
|
10654
|
+
ranking_config: "rank_service";
|
|
10445
10655
|
};
|
|
10446
10656
|
|
|
10447
10657
|
/** Raw output. This data type is not supported in Gemini API. */
|
|
@@ -10605,39 +10815,39 @@ export declare class RegisterFilesResponse {
|
|
|
10605
10815
|
export declare interface ReinforcementTuningAutoraterScorer {
|
|
10606
10816
|
/** Autorater config for evaluation. */
|
|
10607
10817
|
autoraterConfig?: AutoraterConfig;
|
|
10608
|
-
/**
|
|
10818
|
+
/** 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}} */
|
|
10609
10819
|
autoraterPrompt?: string;
|
|
10610
|
-
/** Parses autorater returned response. */
|
|
10820
|
+
/** 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"`. */
|
|
10611
10821
|
autoraterResponseParseConfig?: ReinforcementTuningParseResponseConfig;
|
|
10612
|
-
/** Scores autorater responses by directly converting parsed autorater response to float reward. */
|
|
10822
|
+
/** 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)`. */
|
|
10613
10823
|
parsedResponseConversionScorer?: ReinforcementTuningAutoraterScorerParsedResponseConversionScorer;
|
|
10614
|
-
/** Scores autorater responses by using
|
|
10824
|
+
/** Scores autorater responses by using string match reward scorer. */
|
|
10615
10825
|
exactMatchScorer?: ReinforcementTuningAutoraterScorerExactMatchScorer;
|
|
10616
10826
|
}
|
|
10617
10827
|
|
|
10618
|
-
/** Scores autorater responses by using exact string match reward scorer. */
|
|
10828
|
+
/** Scores autorater responses by using exact string match reward scorer. This data type is not supported in Gemini API. */
|
|
10619
10829
|
export declare interface ReinforcementTuningAutoraterScorerExactMatchScorer {
|
|
10620
|
-
/** Assigns this reward score if parsed response string equals the expression. */
|
|
10830
|
+
/** Assigns this reward score if the parsed response string equals the expression. */
|
|
10621
10831
|
correctAnswerReward?: number;
|
|
10622
|
-
/** Assigns this reward score if parsed reward value does not equal the expression. */
|
|
10832
|
+
/** Assigns this reward score if the parsed reward value does not equal the expression. */
|
|
10623
10833
|
wrongAnswerReward?: number;
|
|
10624
|
-
/** The string expression to match against.
|
|
10834
|
+
/** 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`. */
|
|
10625
10835
|
expression?: string;
|
|
10626
10836
|
}
|
|
10627
10837
|
|
|
10628
|
-
/** Scores responses by directly converting parsed autorater response to float reward
|
|
10838
|
+
/** 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. */
|
|
10629
10839
|
export declare class ReinforcementTuningAutoraterScorerParsedResponseConversionScorer {
|
|
10630
10840
|
}
|
|
10631
10841
|
|
|
10632
|
-
/**
|
|
10842
|
+
/** 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. */
|
|
10633
10843
|
export declare interface ReinforcementTuningCloudRunRewardScorer {
|
|
10634
|
-
/** URI of the Cloud Run service that will be used to compute the reward. The Vertex AI Secure Fine Tuning Service Agent (`service
|
|
10844
|
+
/** 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. */
|
|
10635
10845
|
cloudRunUri?: string;
|
|
10636
10846
|
}
|
|
10637
10847
|
|
|
10638
|
-
/**
|
|
10848
|
+
/** 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. */
|
|
10639
10849
|
export declare interface ReinforcementTuningCodeExecutionRewardScorer {
|
|
10640
|
-
/**
|
|
10850
|
+
/** 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)`. */
|
|
10641
10851
|
pythonCodeSnippet?: string;
|
|
10642
10852
|
}
|
|
10643
10853
|
|
|
@@ -10647,37 +10857,39 @@ export declare interface ReinforcementTuningExample {
|
|
|
10647
10857
|
contents?: Content[];
|
|
10648
10858
|
/** References for the given prompt. The key is the name of the reference, and the value is the reference itself. */
|
|
10649
10859
|
references?: Record<string, string>;
|
|
10650
|
-
/** Corresponds to
|
|
10860
|
+
/** Corresponds to system_instruction in user-facing GenerateContentRequest. */
|
|
10651
10861
|
systemInstruction?: Content;
|
|
10652
10862
|
}
|
|
10653
10863
|
|
|
10654
10864
|
/** Hyperparameters for Reinforcement Tuning. */
|
|
10655
10865
|
export declare interface ReinforcementTuningHyperParameters {
|
|
10656
|
-
/** Number of training
|
|
10866
|
+
/** Optional. Number of training epoches for the tuning job. */
|
|
10657
10867
|
epochCount?: string;
|
|
10658
10868
|
/** Learning rate multiplier for Reinforcement Learning. */
|
|
10659
10869
|
learningRateMultiplier?: number;
|
|
10660
|
-
/** Adapter size for Reinforcement Tuning. */
|
|
10870
|
+
/** Optional. Adapter size for Reinforcement Tuning. */
|
|
10661
10871
|
adapterSize?: AdapterSize;
|
|
10662
|
-
/** Number of different responses to generate per prompt during tuning. */
|
|
10872
|
+
/** Optional. Number of different responses to generate per prompt during tuning. */
|
|
10663
10873
|
samplesPerPrompt?: number;
|
|
10664
|
-
/** 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. */
|
|
10874
|
+
/** 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. */
|
|
10665
10875
|
batchSize?: number;
|
|
10666
|
-
/** How often
|
|
10876
|
+
/** 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` */
|
|
10667
10877
|
evaluateInterval?: number;
|
|
10668
|
-
/** How often
|
|
10878
|
+
/** 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``` */
|
|
10669
10879
|
checkpointInterval?: number;
|
|
10670
|
-
/** The maximum number of tokens to generate per prompt.
|
|
10880
|
+
/** Optional. The maximum number of tokens to generate per prompt. Default to 32768. */
|
|
10671
10881
|
maxOutputTokens?: number;
|
|
10672
|
-
/** Indicates the maximum thinking depth.
|
|
10882
|
+
/** 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. */
|
|
10673
10883
|
thinkingLevel?: ReinforcementTuningThinkingLevel;
|
|
10884
|
+
/** 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). */
|
|
10885
|
+
thinkingBudget?: number;
|
|
10674
10886
|
}
|
|
10675
10887
|
|
|
10676
|
-
/** Defines how to parse sample response for reinforcement tuning. */
|
|
10888
|
+
/** 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. */
|
|
10677
10889
|
export declare class ReinforcementTuningParseResponseConfig {
|
|
10678
|
-
/** Defines
|
|
10890
|
+
/** Defines the type for parsing sample response. */
|
|
10679
10891
|
parseType?: ResponseParseType;
|
|
10680
|
-
/** Defines the regex
|
|
10892
|
+
/** Defines the regex for extracting the important part of sample response. This field is only used when parse_type is ResponseParseType.REGEX_EXTRACT. */
|
|
10681
10893
|
regexExtractExpression?: string;
|
|
10682
10894
|
}
|
|
10683
10895
|
|
|
@@ -10685,16 +10897,17 @@ export declare class ReinforcementTuningParseResponseConfig {
|
|
|
10685
10897
|
export declare interface ReinforcementTuningRewardInfo {
|
|
10686
10898
|
/** Output only. The calculated reward for the reward function. */
|
|
10687
10899
|
reward?: number;
|
|
10688
|
-
/** Output only. The user-requested auxiliary info for the reward function. */
|
|
10900
|
+
/** 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. */
|
|
10689
10901
|
userRequestedAuxInfo?: string;
|
|
10690
10902
|
}
|
|
10691
10903
|
|
|
10692
10904
|
/** Reinforcement tuning spec for tuning. */
|
|
10693
10905
|
export declare interface ReinforcementTuningSpec {
|
|
10906
|
+
/** Composite reward function configuration for reinforcement tuning. */
|
|
10694
10907
|
compositeRewardConfig?: CompositeReinforcementTuningRewardConfig;
|
|
10695
|
-
/** Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
10908
|
+
/** Cloud Storage path to the file containing training dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
10696
10909
|
trainingDatasetUri?: string;
|
|
10697
|
-
/** Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.
|
|
10910
|
+
/** Cloud Storage path to the file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
10698
10911
|
validationDatasetUri?: string;
|
|
10699
10912
|
/** Additional hyper-parameters to use during tuning. */
|
|
10700
10913
|
hyperParameters?: ReinforcementTuningHyperParameters;
|
|
@@ -10702,11 +10915,11 @@ export declare interface ReinforcementTuningSpec {
|
|
|
10702
10915
|
singleRewardConfig?: SingleReinforcementTuningRewardConfig;
|
|
10703
10916
|
}
|
|
10704
10917
|
|
|
10705
|
-
/**
|
|
10918
|
+
/** 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. */
|
|
10706
10919
|
export declare interface ReinforcementTuningStringMatchRewardScorer {
|
|
10707
|
-
/** Wrong answer reward is returned if
|
|
10920
|
+
/** Wrong answer reward is returned if the parsed response is evaluated as `false`. All wrong answers get the same reward. */
|
|
10708
10921
|
wrongAnswerReward?: number;
|
|
10709
|
-
/** Correct answer
|
|
10922
|
+
/** Correct answer rewawrd is returned if the parsed response is evaluated as `true`. All correct answers get the same reward. */
|
|
10710
10923
|
correctAnswerReward?: number;
|
|
10711
10924
|
/** Uses string match expression to evaluate parsed response. */
|
|
10712
10925
|
stringMatchExpression?: ReinforcementTuningStringMatchRewardScorerStringMatchExpression;
|
|
@@ -10714,19 +10927,19 @@ export declare interface ReinforcementTuningStringMatchRewardScorer {
|
|
|
10714
10927
|
jsonMatchExpression?: ReinforcementTuningStringMatchRewardScorerJsonMatchExpression;
|
|
10715
10928
|
}
|
|
10716
10929
|
|
|
10717
|
-
/**
|
|
10930
|
+
/** 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. */
|
|
10718
10931
|
export declare interface ReinforcementTuningStringMatchRewardScorerJsonMatchExpression {
|
|
10719
|
-
/**
|
|
10932
|
+
/** The key name to find the value in the parsed response that's in JSON format. Only first-level key matching is supported. */
|
|
10720
10933
|
keyName?: string;
|
|
10721
|
-
/** String match expression to match against the value of
|
|
10934
|
+
/** String match expression to match against the extracted value from the JSON representation of the parsed response. */
|
|
10722
10935
|
valueStringMatchExpression?: ReinforcementTuningStringMatchRewardScorerStringMatchExpression;
|
|
10723
10936
|
}
|
|
10724
10937
|
|
|
10725
|
-
/** Evaluates parsed response using match type against expression. */
|
|
10938
|
+
/** 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. */
|
|
10726
10939
|
export declare interface ReinforcementTuningStringMatchRewardScorerStringMatchExpression {
|
|
10727
|
-
/** Match operation to use for
|
|
10940
|
+
/** Match operation to use for evaluating rewards. */
|
|
10728
10941
|
matchOperation?: MatchOperation;
|
|
10729
|
-
/**
|
|
10942
|
+
/** 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.*" } ``` */
|
|
10730
10943
|
expression?: string;
|
|
10731
10944
|
}
|
|
10732
10945
|
|
|
@@ -10746,6 +10959,12 @@ export declare enum ReinforcementTuningThinkingLevel {
|
|
|
10746
10959
|
HIGH = "HIGH"
|
|
10747
10960
|
}
|
|
10748
10961
|
|
|
10962
|
+
/** 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. */
|
|
10963
|
+
export declare interface ReinforcementTuningUserDatasetExamples {
|
|
10964
|
+
/** List of user datasset examples showing to user. */
|
|
10965
|
+
userDatasetExamples?: ReinforcementTuningExample[];
|
|
10966
|
+
}
|
|
10967
|
+
|
|
10749
10968
|
/** Represents a recorded session. */
|
|
10750
10969
|
export declare interface ReplayFile {
|
|
10751
10970
|
replayId?: string;
|
|
@@ -10785,6 +11004,17 @@ export declare interface ReplicatedVoiceConfig {
|
|
|
10785
11004
|
|
|
10786
11005
|
* @remarks Encoded as base64 string. */
|
|
10787
11006
|
voiceSampleAudio?: string;
|
|
11007
|
+
/** Recorded consent verifying ownership of the voice. This
|
|
11008
|
+
represents 16-bit signed little-endian wav data, with a 24kHz sampling
|
|
11009
|
+
rate.
|
|
11010
|
+
* @remarks Encoded as base64 string. */
|
|
11011
|
+
consentAudio?: string;
|
|
11012
|
+
/** Signature of a previously verified consent audio. This should be
|
|
11013
|
+
populated with a signature generated by the server for a previous
|
|
11014
|
+
request containing the consent_audio field. When provided, the
|
|
11015
|
+
signature is verified instead of the consent_audio field to reduce
|
|
11016
|
+
latency. Requests will fail if the signature is invalid or expired. */
|
|
11017
|
+
voiceConsentSignature?: VoiceConsentSignature;
|
|
10788
11018
|
}
|
|
10789
11019
|
|
|
10790
11020
|
declare type RequestOptions = {
|
|
@@ -10841,7 +11071,19 @@ export declare enum ResourceScope {
|
|
|
10841
11071
|
COLLECTION = "COLLECTION"
|
|
10842
11072
|
}
|
|
10843
11073
|
|
|
10844
|
-
|
|
11074
|
+
/** Configuration for the model to configure output formatting and delivery. This data type is not supported in Gemini API. */
|
|
11075
|
+
export declare class ResponseFormat {
|
|
11076
|
+
/** Audio output format. */
|
|
11077
|
+
audio?: AudioResponseFormat;
|
|
11078
|
+
/** Image output format. */
|
|
11079
|
+
image?: ImageResponseFormat;
|
|
11080
|
+
/** Text output format. */
|
|
11081
|
+
text?: TextResponseFormat;
|
|
11082
|
+
/** Video output format. */
|
|
11083
|
+
video?: VideoResponseFormat;
|
|
11084
|
+
}
|
|
11085
|
+
|
|
11086
|
+
declare type ResponseFormat_2 = AudioResponseFormat_2 | TextResponseFormat_2 | ImageResponseFormat_2 | VideoResponseFormat_2 | {
|
|
10845
11087
|
[k: string]: any;
|
|
10846
11088
|
};
|
|
10847
11089
|
|
|
@@ -10854,18 +11096,18 @@ declare type ResponseFormat = AudioResponseFormat | TextResponseFormat | ImageRe
|
|
|
10854
11096
|
*/
|
|
10855
11097
|
declare type ResponseModality = "text" | "image" | "audio" | "video" | "document" | (string & {});
|
|
10856
11098
|
|
|
10857
|
-
/** Defines
|
|
11099
|
+
/** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
|
|
10858
11100
|
export declare enum ResponseParseType {
|
|
10859
11101
|
/**
|
|
10860
|
-
* Default value.
|
|
11102
|
+
* Default value. Fallback to IDENTITY
|
|
10861
11103
|
*/
|
|
10862
11104
|
RESPONSE_PARSE_TYPE_UNSPECIFIED = "RESPONSE_PARSE_TYPE_UNSPECIFIED",
|
|
10863
11105
|
/**
|
|
10864
|
-
*
|
|
11106
|
+
* Returns the sample response as is.
|
|
10865
11107
|
*/
|
|
10866
11108
|
IDENTITY = "IDENTITY",
|
|
10867
11109
|
/**
|
|
10868
|
-
*
|
|
11110
|
+
* 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.
|
|
10869
11111
|
*/
|
|
10870
11112
|
REGEX_EXTRACT = "REGEX_EXTRACT"
|
|
10871
11113
|
}
|
|
@@ -10894,29 +11136,77 @@ export declare interface Retrieval {
|
|
|
10894
11136
|
* A tool that can be used by the model to retrieve files.
|
|
10895
11137
|
*/
|
|
10896
11138
|
declare type Retrieval_2 = {
|
|
10897
|
-
|
|
11139
|
+
/**
|
|
11140
|
+
* Used to specify configuration for ExaAISearch.
|
|
11141
|
+
*/
|
|
11142
|
+
exa_ai_search_config?: ExaAISearchConfig | undefined;
|
|
11143
|
+
/**
|
|
11144
|
+
* Used to specify configuration for ParallelAISearch.
|
|
11145
|
+
*/
|
|
11146
|
+
parallel_ai_search_config?: ParallelAISearchConfig | undefined;
|
|
11147
|
+
/**
|
|
11148
|
+
* Use to specify configuration for RAG Store.
|
|
11149
|
+
*/
|
|
11150
|
+
rag_store_config?: RagStoreConfig | undefined;
|
|
10898
11151
|
/**
|
|
10899
11152
|
* The types of file retrieval to enable.
|
|
10900
11153
|
*/
|
|
10901
|
-
retrieval_types?: Array<
|
|
11154
|
+
retrieval_types?: Array<RetrievalRetrievalType> | undefined;
|
|
11155
|
+
type: "retrieval";
|
|
10902
11156
|
/**
|
|
10903
11157
|
* Used to specify configuration for VertexAISearch.
|
|
10904
11158
|
*/
|
|
10905
11159
|
vertex_ai_search_config?: VertexAISearchConfig | undefined;
|
|
11160
|
+
};
|
|
11161
|
+
|
|
11162
|
+
declare type RetrievalCallArguments$ = RetrievalCallArguments;
|
|
11163
|
+
|
|
11164
|
+
/**
|
|
11165
|
+
* @license
|
|
11166
|
+
* Copyright 2026 Google LLC
|
|
11167
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
11168
|
+
*
|
|
11169
|
+
* g3-prettier-ignore-file
|
|
11170
|
+
*/
|
|
11171
|
+
/**
|
|
11172
|
+
* The arguments to pass to Retrieval tools.
|
|
11173
|
+
*/
|
|
11174
|
+
declare type RetrievalCallArguments = {
|
|
10906
11175
|
/**
|
|
10907
|
-
*
|
|
11176
|
+
* Queries for Retrieval information.
|
|
10908
11177
|
*/
|
|
10909
|
-
|
|
11178
|
+
queries?: Array<string> | undefined;
|
|
11179
|
+
};
|
|
11180
|
+
|
|
11181
|
+
declare type RetrievalCallDelta$ = RetrievalCallDelta;
|
|
11182
|
+
|
|
11183
|
+
/**
|
|
11184
|
+
* Used by Vertex Retrieval tools such as Parallel AI, Exa AI, Vertex AI Search,
|
|
11185
|
+
*
|
|
11186
|
+
* @remarks
|
|
11187
|
+
* etc. RetrievalType decides which tool is used.
|
|
11188
|
+
*/
|
|
11189
|
+
declare type RetrievalCallDelta = {
|
|
10910
11190
|
/**
|
|
10911
|
-
*
|
|
11191
|
+
* The arguments to pass to Retrieval tools.
|
|
10912
11192
|
*/
|
|
10913
|
-
|
|
11193
|
+
arguments: RetrievalCallArguments;
|
|
10914
11194
|
/**
|
|
10915
|
-
*
|
|
11195
|
+
* The type of retrieval tools.
|
|
10916
11196
|
*/
|
|
10917
|
-
|
|
11197
|
+
retrieval_type?: RetrievalCallDeltaRetrievalType | undefined;
|
|
11198
|
+
/**
|
|
11199
|
+
* A signature hash for backend validation.
|
|
11200
|
+
*/
|
|
11201
|
+
signature?: string | undefined;
|
|
11202
|
+
type: "retrieval_call";
|
|
10918
11203
|
};
|
|
10919
11204
|
|
|
11205
|
+
/**
|
|
11206
|
+
* The type of retrieval tools.
|
|
11207
|
+
*/
|
|
11208
|
+
declare type RetrievalCallDeltaRetrievalType = "vertex_ai_search" | "rag_store" | "exa_ai_search" | "parallel_ai_search" | (string & {});
|
|
11209
|
+
|
|
10920
11210
|
/** Retrieval config. */
|
|
10921
11211
|
export declare interface RetrievalConfig {
|
|
10922
11212
|
/** The location of the user. */
|
|
@@ -10936,7 +11226,35 @@ export declare interface RetrievalMetadata {
|
|
|
10936
11226
|
googleSearchDynamicRetrievalScore?: number;
|
|
10937
11227
|
}
|
|
10938
11228
|
|
|
10939
|
-
declare type
|
|
11229
|
+
declare type RetrievalResultDelta$ = RetrievalResultDelta;
|
|
11230
|
+
|
|
11231
|
+
/**
|
|
11232
|
+
* @license
|
|
11233
|
+
* Copyright 2026 Google LLC
|
|
11234
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
11235
|
+
*
|
|
11236
|
+
* g3-prettier-ignore-file
|
|
11237
|
+
*/
|
|
11238
|
+
/**
|
|
11239
|
+
* Used by Vertex Retrieval tools such as Parallel AI, Exa AI, Vertex AI Search,
|
|
11240
|
+
*
|
|
11241
|
+
* @remarks
|
|
11242
|
+
* etc.
|
|
11243
|
+
* ToolResultDelta.type
|
|
11244
|
+
*/
|
|
11245
|
+
declare type RetrievalResultDelta = {
|
|
11246
|
+
/**
|
|
11247
|
+
* Whether the retrieval resulted in an error.
|
|
11248
|
+
*/
|
|
11249
|
+
is_error?: boolean | undefined;
|
|
11250
|
+
/**
|
|
11251
|
+
* A signature hash for backend validation.
|
|
11252
|
+
*/
|
|
11253
|
+
signature?: string | undefined;
|
|
11254
|
+
type: "retrieval_result";
|
|
11255
|
+
};
|
|
11256
|
+
|
|
11257
|
+
declare type RetrievalRetrievalType = "vertex_ai_search" | "rag_store" | "exa_ai_search" | "parallel_ai_search" | (string & {});
|
|
10940
11258
|
|
|
10941
11259
|
declare type RetryConfig = {
|
|
10942
11260
|
strategy: "none";
|
|
@@ -10971,6 +11289,10 @@ declare type ReviewSnippet$3 = ReviewSnippet;
|
|
|
10971
11289
|
* the features of a specific place in Google Maps.
|
|
10972
11290
|
*/
|
|
10973
11291
|
declare type ReviewSnippet = {
|
|
11292
|
+
/**
|
|
11293
|
+
* The ID of the review snippet.
|
|
11294
|
+
*/
|
|
11295
|
+
review_id?: string | undefined;
|
|
10974
11296
|
/**
|
|
10975
11297
|
* Title of the review.
|
|
10976
11298
|
*/
|
|
@@ -10979,10 +11301,6 @@ declare type ReviewSnippet = {
|
|
|
10979
11301
|
* A link that corresponds to the user review on Google Maps.
|
|
10980
11302
|
*/
|
|
10981
11303
|
url?: string | undefined;
|
|
10982
|
-
/**
|
|
10983
|
-
* The ID of the review snippet.
|
|
10984
|
-
*/
|
|
10985
|
-
review_id?: string | undefined;
|
|
10986
11304
|
};
|
|
10987
11305
|
|
|
10988
11306
|
/**
|
|
@@ -11033,8 +11351,44 @@ export declare enum SafetyFilterLevel {
|
|
|
11033
11351
|
BLOCK_NONE = "BLOCK_NONE"
|
|
11034
11352
|
}
|
|
11035
11353
|
|
|
11036
|
-
/**
|
|
11037
|
-
export declare
|
|
11354
|
+
/** SafetyPolicy */
|
|
11355
|
+
export declare enum SafetyPolicy {
|
|
11356
|
+
/**
|
|
11357
|
+
* Unspecified safety policy.
|
|
11358
|
+
*/
|
|
11359
|
+
SAFETY_POLICY_UNSPECIFIED = "SAFETY_POLICY_UNSPECIFIED",
|
|
11360
|
+
/**
|
|
11361
|
+
* Safety policy for financial transactions.
|
|
11362
|
+
*/
|
|
11363
|
+
FINANCIAL_TRANSACTIONS = "FINANCIAL_TRANSACTIONS",
|
|
11364
|
+
/**
|
|
11365
|
+
* Safety policy for sensitive data modification.
|
|
11366
|
+
*/
|
|
11367
|
+
SENSITIVE_DATA_MODIFICATION = "SENSITIVE_DATA_MODIFICATION",
|
|
11368
|
+
/**
|
|
11369
|
+
* Safety policy for communication tools (e.g. Gmail, Chat, Meet).
|
|
11370
|
+
*/
|
|
11371
|
+
COMMUNICATION_TOOL = "COMMUNICATION_TOOL",
|
|
11372
|
+
/**
|
|
11373
|
+
* Safety policy for account creation.
|
|
11374
|
+
*/
|
|
11375
|
+
ACCOUNT_CREATION = "ACCOUNT_CREATION",
|
|
11376
|
+
/**
|
|
11377
|
+
* Safety policy for data modification.
|
|
11378
|
+
*/
|
|
11379
|
+
DATA_MODIFICATION = "DATA_MODIFICATION",
|
|
11380
|
+
/**
|
|
11381
|
+
* Safety policy for user consent management.
|
|
11382
|
+
*/
|
|
11383
|
+
USER_CONSENT_MANAGEMENT = "USER_CONSENT_MANAGEMENT",
|
|
11384
|
+
/**
|
|
11385
|
+
* Safety policy for legal terms and agreements.
|
|
11386
|
+
*/
|
|
11387
|
+
LEGAL_TERMS_AND_AGREEMENTS = "LEGAL_TERMS_AND_AGREEMENTS"
|
|
11388
|
+
}
|
|
11389
|
+
|
|
11390
|
+
/** A safety rating for a piece of content. The safety rating contains the harm category and the harm probability level. */
|
|
11391
|
+
export declare interface SafetyRating {
|
|
11038
11392
|
/** Output only. Indicates whether the content was blocked because of this rating. */
|
|
11039
11393
|
blocked?: boolean;
|
|
11040
11394
|
/** Output only. The harm category of this rating. */
|
|
@@ -11051,6 +11405,8 @@ export declare interface SafetyRating {
|
|
|
11051
11405
|
severityScore?: number;
|
|
11052
11406
|
}
|
|
11053
11407
|
|
|
11408
|
+
declare type SafetySetting$ = SafetySetting_2;
|
|
11409
|
+
|
|
11054
11410
|
/** A safety setting that affects the safety-blocking behavior. A SafetySetting consists of a harm category and a threshold for that category. */
|
|
11055
11411
|
export declare interface SafetySetting {
|
|
11056
11412
|
/** Required. The harm category to be blocked. */
|
|
@@ -11061,6 +11417,34 @@ export declare interface SafetySetting {
|
|
|
11061
11417
|
threshold?: HarmBlockThreshold;
|
|
11062
11418
|
}
|
|
11063
11419
|
|
|
11420
|
+
/**
|
|
11421
|
+
* A safety setting that affects the safety-blocking behavior.
|
|
11422
|
+
*
|
|
11423
|
+
* @remarks
|
|
11424
|
+
*
|
|
11425
|
+
* A SafetySetting consists of a
|
|
11426
|
+
* harm category and a
|
|
11427
|
+
* threshold for that
|
|
11428
|
+
* category.
|
|
11429
|
+
*/
|
|
11430
|
+
declare type SafetySetting_2 = {
|
|
11431
|
+
/**
|
|
11432
|
+
* Optional. The method for blocking content. If not specified, the default
|
|
11433
|
+
*
|
|
11434
|
+
* @remarks
|
|
11435
|
+
* behavior is to use the probability score.
|
|
11436
|
+
*/
|
|
11437
|
+
method?: Method | undefined;
|
|
11438
|
+
/**
|
|
11439
|
+
* Required. The threshold for blocking content. If the harm probability
|
|
11440
|
+
*
|
|
11441
|
+
* @remarks
|
|
11442
|
+
* exceeds this threshold, the content will be blocked.
|
|
11443
|
+
*/
|
|
11444
|
+
threshold: Threshold;
|
|
11445
|
+
type: HarmCategory_2;
|
|
11446
|
+
};
|
|
11447
|
+
|
|
11064
11448
|
/** Scale of the generated music. */
|
|
11065
11449
|
export declare enum Scale {
|
|
11066
11450
|
/**
|
|
@@ -11341,6 +11725,7 @@ declare type ServiceTier_2 = "flex" | "standard" | "priority" | (string & {});
|
|
|
11341
11725
|
export declare class Session {
|
|
11342
11726
|
readonly conn: WebSocket_2;
|
|
11343
11727
|
private readonly apiClient;
|
|
11728
|
+
setupComplete?: types.LiveServerSetupComplete;
|
|
11344
11729
|
constructor(conn: WebSocket_2, apiClient: ApiClient);
|
|
11345
11730
|
private tLiveClientContent;
|
|
11346
11731
|
private tLiveClienttToolResponse;
|
|
@@ -11506,14 +11891,14 @@ declare type SigningSecret$ = SigningSecret;
|
|
|
11506
11891
|
* Represents a signing secret used to verify webhook payloads.
|
|
11507
11892
|
*/
|
|
11508
11893
|
declare type SigningSecret = {
|
|
11509
|
-
/**
|
|
11510
|
-
* Output only. The truncated version of the signing secret.
|
|
11511
|
-
*/
|
|
11512
|
-
truncated_secret?: string | undefined;
|
|
11513
11894
|
/**
|
|
11514
11895
|
* Output only. The expiration date of the signing secret.
|
|
11515
11896
|
*/
|
|
11516
11897
|
expire_time?: string | undefined;
|
|
11898
|
+
/**
|
|
11899
|
+
* Output only. The truncated version of the signing secret.
|
|
11900
|
+
*/
|
|
11901
|
+
truncated_secret?: string | undefined;
|
|
11517
11902
|
};
|
|
11518
11903
|
|
|
11519
11904
|
/** Config for `response` parameter. */
|
|
@@ -11530,15 +11915,15 @@ export declare class SingleEmbedContentResponse {
|
|
|
11530
11915
|
export declare interface SingleReinforcementTuningRewardConfig {
|
|
11531
11916
|
/** Scores parsed responses for autorater use cases by using a model to compute the reward. */
|
|
11532
11917
|
autoraterScorer?: ReinforcementTuningAutoraterScorer;
|
|
11533
|
-
/** A unique reward name
|
|
11918
|
+
/** A unique reward name for identifying each single reinforcement tuning reward. */
|
|
11534
11919
|
rewardName?: string;
|
|
11535
|
-
/** Defines how to parse sample response. */
|
|
11920
|
+
/** 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. */
|
|
11536
11921
|
parseResponseConfig?: ReinforcementTuningParseResponseConfig;
|
|
11537
|
-
/**
|
|
11922
|
+
/** ReinforcementTuningCodeExecutionRewardScorer is used to score parsed responses for code execution use cases. */
|
|
11538
11923
|
codeExecutionRewardScorer?: ReinforcementTuningCodeExecutionRewardScorer;
|
|
11539
|
-
/**
|
|
11924
|
+
/** ReinforcementTuningStringMatchRewardScorer is used to score parsed responses for simple string matching use cases against reference answers. */
|
|
11540
11925
|
stringMatchRewardScorer?: ReinforcementTuningStringMatchRewardScorer;
|
|
11541
|
-
/**
|
|
11926
|
+
/** ReinforcementTuningCloudRunRewardScorer is used to score parsed responses by calling a Cloud Run service. */
|
|
11542
11927
|
cloudRunRewardScorer?: ReinforcementTuningCloudRunRewardScorer;
|
|
11543
11928
|
}
|
|
11544
11929
|
|
|
@@ -11559,7 +11944,14 @@ declare type Source$ = Source;
|
|
|
11559
11944
|
* A source to be mounted into the environment.
|
|
11560
11945
|
*/
|
|
11561
11946
|
declare type Source = {
|
|
11562
|
-
|
|
11947
|
+
/**
|
|
11948
|
+
* The inline content if `type` is `INLINE`.
|
|
11949
|
+
*/
|
|
11950
|
+
content?: string | undefined;
|
|
11951
|
+
/**
|
|
11952
|
+
* Optional encoding for inline content (e.g. `base64`).
|
|
11953
|
+
*/
|
|
11954
|
+
encoding?: string | undefined;
|
|
11563
11955
|
/**
|
|
11564
11956
|
* The source of the environment.
|
|
11565
11957
|
*
|
|
@@ -11572,14 +11964,7 @@ declare type Source = {
|
|
|
11572
11964
|
* Where the source should appear in the environment.
|
|
11573
11965
|
*/
|
|
11574
11966
|
target?: string | undefined;
|
|
11575
|
-
|
|
11576
|
-
* The inline content if `type` is `INLINE`.
|
|
11577
|
-
*/
|
|
11578
|
-
content?: string | undefined;
|
|
11579
|
-
/**
|
|
11580
|
-
* Optional encoding for inline content (e.g. `base64`).
|
|
11581
|
-
*/
|
|
11582
|
-
encoding?: string | undefined;
|
|
11967
|
+
type?: SourceType | undefined;
|
|
11583
11968
|
};
|
|
11584
11969
|
|
|
11585
11970
|
/**
|
|
@@ -11622,10 +12007,6 @@ export declare interface SpeechConfig {
|
|
|
11622
12007
|
* The configuration for speech interaction.
|
|
11623
12008
|
*/
|
|
11624
12009
|
declare type SpeechConfig_2 = {
|
|
11625
|
-
/**
|
|
11626
|
-
* The voice of the speaker.
|
|
11627
|
-
*/
|
|
11628
|
-
voice?: string | undefined;
|
|
11629
12010
|
/**
|
|
11630
12011
|
* The language of the speech.
|
|
11631
12012
|
*/
|
|
@@ -11634,6 +12015,10 @@ declare type SpeechConfig_2 = {
|
|
|
11634
12015
|
* The speaker's name, it should match the speaker name given in the prompt.
|
|
11635
12016
|
*/
|
|
11636
12017
|
speaker?: string | undefined;
|
|
12018
|
+
/**
|
|
12019
|
+
* The voice of the speaker.
|
|
12020
|
+
*/
|
|
12021
|
+
voice?: string | undefined;
|
|
11637
12022
|
};
|
|
11638
12023
|
|
|
11639
12024
|
export declare type SpeechConfigUnion = SpeechConfig | string;
|
|
@@ -11661,6 +12046,48 @@ export declare enum StartSensitivity {
|
|
|
11661
12046
|
START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW"
|
|
11662
12047
|
}
|
|
11663
12048
|
|
|
12049
|
+
/**
|
|
12050
|
+
* @license
|
|
12051
|
+
* Copyright 2026 Google LLC
|
|
12052
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
12053
|
+
*
|
|
12054
|
+
* g3-prettier-ignore-file
|
|
12055
|
+
*/
|
|
12056
|
+
/**
|
|
12057
|
+
* The `Status` type defines a logical error model that is suitable for
|
|
12058
|
+
*
|
|
12059
|
+
* @remarks
|
|
12060
|
+
* different programming environments, including REST APIs and RPC APIs. It is
|
|
12061
|
+
* used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
|
12062
|
+
* three pieces of data: error code, error message, and error details.
|
|
12063
|
+
*
|
|
12064
|
+
* You can find out more about this error model and how to work with it in the
|
|
12065
|
+
* [API Design Guide](https://cloud.google.com/apis/design/errors).
|
|
12066
|
+
*/
|
|
12067
|
+
declare type Status = {
|
|
12068
|
+
/**
|
|
12069
|
+
* The status code, which should be an enum value of google.rpc.Code.
|
|
12070
|
+
*/
|
|
12071
|
+
code?: number | undefined;
|
|
12072
|
+
/**
|
|
12073
|
+
* A list of messages that carry the error details. There is a common set of
|
|
12074
|
+
*
|
|
12075
|
+
* @remarks
|
|
12076
|
+
* message types for APIs to use.
|
|
12077
|
+
*/
|
|
12078
|
+
details?: Array<{
|
|
12079
|
+
[k: string]: any;
|
|
12080
|
+
}> | undefined;
|
|
12081
|
+
/**
|
|
12082
|
+
* A developer-facing error message, which should be in English. Any
|
|
12083
|
+
*
|
|
12084
|
+
* @remarks
|
|
12085
|
+
* user-facing error message should be localized and sent in the
|
|
12086
|
+
* google.rpc.Status.details field, or localized by the client.
|
|
12087
|
+
*/
|
|
12088
|
+
message?: string | undefined;
|
|
12089
|
+
};
|
|
12090
|
+
|
|
11664
12091
|
declare type Step$ = Step;
|
|
11665
12092
|
|
|
11666
12093
|
/**
|
|
@@ -11671,8 +12098,6 @@ declare type Step = UserInputStep | ModelOutputStep | ThoughtStep | FunctionCall
|
|
|
11671
12098
|
declare type StepDelta$ = StepDelta;
|
|
11672
12099
|
|
|
11673
12100
|
declare type StepDelta = {
|
|
11674
|
-
event_type: "step.delta";
|
|
11675
|
-
index: number;
|
|
11676
12101
|
delta: StepDeltaData;
|
|
11677
12102
|
/**
|
|
11678
12103
|
* The event_id token to be used to resume the interaction stream, from
|
|
@@ -11681,13 +12106,15 @@ declare type StepDelta = {
|
|
|
11681
12106
|
* this event.
|
|
11682
12107
|
*/
|
|
11683
12108
|
event_id?: string | undefined;
|
|
12109
|
+
event_type: "step.delta";
|
|
12110
|
+
index: number;
|
|
11684
12111
|
/**
|
|
11685
12112
|
* Optional metadata accompanying ANY streamed event.
|
|
11686
12113
|
*/
|
|
11687
12114
|
metadata?: StepDeltaMetadata | undefined;
|
|
11688
12115
|
};
|
|
11689
12116
|
|
|
11690
|
-
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;
|
|
12117
|
+
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;
|
|
11691
12118
|
|
|
11692
12119
|
/**
|
|
11693
12120
|
* Optional metadata accompanying ANY streamed event.
|
|
@@ -11702,12 +12129,6 @@ declare type StepDeltaMetadata = {
|
|
|
11702
12129
|
declare type StepStart$ = StepStart;
|
|
11703
12130
|
|
|
11704
12131
|
declare type StepStart = {
|
|
11705
|
-
event_type: "step.start";
|
|
11706
|
-
index: number;
|
|
11707
|
-
/**
|
|
11708
|
-
* A step in the interaction.
|
|
11709
|
-
*/
|
|
11710
|
-
step: Step;
|
|
11711
12132
|
/**
|
|
11712
12133
|
* The event_id token to be used to resume the interaction stream, from
|
|
11713
12134
|
*
|
|
@@ -11715,14 +12136,18 @@ declare type StepStart = {
|
|
|
11715
12136
|
* this event.
|
|
11716
12137
|
*/
|
|
11717
12138
|
event_id?: string | undefined;
|
|
12139
|
+
event_type: "step.start";
|
|
12140
|
+
index: number;
|
|
11718
12141
|
metadata?: StreamMetadata | undefined;
|
|
12142
|
+
/**
|
|
12143
|
+
* A step in the interaction.
|
|
12144
|
+
*/
|
|
12145
|
+
step: Step;
|
|
11719
12146
|
};
|
|
11720
12147
|
|
|
11721
12148
|
declare type StepStop$ = StepStop;
|
|
11722
12149
|
|
|
11723
12150
|
declare type StepStop = {
|
|
11724
|
-
event_type: "step.stop";
|
|
11725
|
-
index: number;
|
|
11726
12151
|
/**
|
|
11727
12152
|
* The event_id token to be used to resume the interaction stream, from
|
|
11728
12153
|
*
|
|
@@ -11730,7 +12155,17 @@ declare type StepStop = {
|
|
|
11730
12155
|
* this event.
|
|
11731
12156
|
*/
|
|
11732
12157
|
event_id?: string | undefined;
|
|
12158
|
+
event_type: "step.stop";
|
|
12159
|
+
index: number;
|
|
11733
12160
|
metadata?: StreamMetadata | undefined;
|
|
12161
|
+
/**
|
|
12162
|
+
* Statistics on the interaction request's token usage.
|
|
12163
|
+
*/
|
|
12164
|
+
step_usage?: Usage | undefined;
|
|
12165
|
+
/**
|
|
12166
|
+
* Statistics on the interaction request's token usage.
|
|
12167
|
+
*/
|
|
12168
|
+
usage?: Usage | undefined;
|
|
11734
12169
|
};
|
|
11735
12170
|
|
|
11736
12171
|
export declare class Stream<T> extends ReadableStream<T> {
|
|
@@ -11935,6 +12370,22 @@ export declare interface SupervisedTuningSpec {
|
|
|
11935
12370
|
validationDatasetUri?: string;
|
|
11936
12371
|
}
|
|
11937
12372
|
|
|
12373
|
+
/**
|
|
12374
|
+
* @license
|
|
12375
|
+
* Copyright 2026 Google LLC
|
|
12376
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
12377
|
+
*
|
|
12378
|
+
* g3-prettier-ignore-file
|
|
12379
|
+
*/
|
|
12380
|
+
/**
|
|
12381
|
+
* Optional task mode for video generation. If not specified, the model
|
|
12382
|
+
*
|
|
12383
|
+
* @remarks
|
|
12384
|
+
* automatically determines the appropriate mode based on the provided text
|
|
12385
|
+
* prompt and input media.
|
|
12386
|
+
*/
|
|
12387
|
+
declare type Task = "text_to_video" | "image_to_video" | "reference_to_video" | "edit" | (string & {});
|
|
12388
|
+
|
|
11938
12389
|
export declare interface TestTableFile {
|
|
11939
12390
|
comment?: string;
|
|
11940
12391
|
testMethod?: string;
|
|
@@ -11966,11 +12417,11 @@ declare type Text$ = TextDelta;
|
|
|
11966
12417
|
declare type TextAnnotationDelta$ = TextAnnotationDelta;
|
|
11967
12418
|
|
|
11968
12419
|
declare type TextAnnotationDelta = {
|
|
11969
|
-
type: "text_annotation_delta";
|
|
11970
12420
|
/**
|
|
11971
12421
|
* Citation information for model-generated content.
|
|
11972
12422
|
*/
|
|
11973
12423
|
annotations?: Array<Annotation> | undefined;
|
|
12424
|
+
type: "text_annotation_delta";
|
|
11974
12425
|
};
|
|
11975
12426
|
|
|
11976
12427
|
declare type TextContent$ = TextContent;
|
|
@@ -11979,15 +12430,15 @@ declare type TextContent$ = TextContent;
|
|
|
11979
12430
|
* A text content block.
|
|
11980
12431
|
*/
|
|
11981
12432
|
declare type TextContent = {
|
|
11982
|
-
type: "text";
|
|
11983
|
-
/**
|
|
11984
|
-
* Required. The text content.
|
|
11985
|
-
*/
|
|
11986
|
-
text: string;
|
|
11987
12433
|
/**
|
|
11988
12434
|
* Citation information for model-generated content.
|
|
11989
12435
|
*/
|
|
11990
12436
|
annotations?: Array<Annotation> | undefined;
|
|
12437
|
+
/**
|
|
12438
|
+
* Required. The text content.
|
|
12439
|
+
*/
|
|
12440
|
+
text: string;
|
|
12441
|
+
type: "text";
|
|
11991
12442
|
};
|
|
11992
12443
|
|
|
11993
12444
|
/**
|
|
@@ -11998,17 +12449,24 @@ declare type TextContent = {
|
|
|
11998
12449
|
* g3-prettier-ignore-file
|
|
11999
12450
|
*/
|
|
12000
12451
|
declare type TextDelta = {
|
|
12001
|
-
type: "text";
|
|
12002
12452
|
text: string;
|
|
12453
|
+
type: "text";
|
|
12003
12454
|
};
|
|
12004
12455
|
|
|
12005
|
-
declare type TextResponseFormat$ =
|
|
12456
|
+
declare type TextResponseFormat$ = TextResponseFormat_2;
|
|
12457
|
+
|
|
12458
|
+
/** Configuration for text-specific output formatting. */
|
|
12459
|
+
export declare class TextResponseFormat {
|
|
12460
|
+
/** Optional. The IANA standard MIME type of the response. */
|
|
12461
|
+
mimeType?: string;
|
|
12462
|
+
/** Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON. */
|
|
12463
|
+
schema?: unknown;
|
|
12464
|
+
}
|
|
12006
12465
|
|
|
12007
12466
|
/**
|
|
12008
12467
|
* Configuration for text output format.
|
|
12009
12468
|
*/
|
|
12010
|
-
declare type
|
|
12011
|
-
type: "text";
|
|
12469
|
+
declare type TextResponseFormat_2 = {
|
|
12012
12470
|
/**
|
|
12013
12471
|
* The MIME type of the text output.
|
|
12014
12472
|
*/
|
|
@@ -12022,6 +12480,7 @@ declare type TextResponseFormat = {
|
|
|
12022
12480
|
schema?: {
|
|
12023
12481
|
[k: string]: any;
|
|
12024
12482
|
} | undefined;
|
|
12483
|
+
type: "text";
|
|
12025
12484
|
};
|
|
12026
12485
|
|
|
12027
12486
|
/**
|
|
@@ -12102,11 +12561,11 @@ declare type ThoughtSignature$ = ThoughtSignatureDelta;
|
|
|
12102
12561
|
* g3-prettier-ignore-file
|
|
12103
12562
|
*/
|
|
12104
12563
|
declare type ThoughtSignatureDelta = {
|
|
12105
|
-
type: "thought_signature";
|
|
12106
12564
|
/**
|
|
12107
12565
|
* Signature to match the backend source to be part of the generation.
|
|
12108
12566
|
*/
|
|
12109
12567
|
signature?: string | undefined;
|
|
12568
|
+
type: "thought_signature";
|
|
12110
12569
|
};
|
|
12111
12570
|
|
|
12112
12571
|
declare type ThoughtStep$ = ThoughtStep;
|
|
@@ -12115,7 +12574,6 @@ declare type ThoughtStep$ = ThoughtStep;
|
|
|
12115
12574
|
* A thought step.
|
|
12116
12575
|
*/
|
|
12117
12576
|
declare type ThoughtStep = {
|
|
12118
|
-
type: "thought";
|
|
12119
12577
|
/**
|
|
12120
12578
|
* A signature hash for backend validation.
|
|
12121
12579
|
*/
|
|
@@ -12124,6 +12582,7 @@ declare type ThoughtStep = {
|
|
|
12124
12582
|
* A summary of the thought.
|
|
12125
12583
|
*/
|
|
12126
12584
|
summary?: Array<ThoughtSummaryContent> | undefined;
|
|
12585
|
+
type: "thought";
|
|
12127
12586
|
};
|
|
12128
12587
|
|
|
12129
12588
|
declare type ThoughtSummary$ = ThoughtSummaryDelta;
|
|
@@ -12131,13 +12590,21 @@ declare type ThoughtSummary$ = ThoughtSummaryDelta;
|
|
|
12131
12590
|
declare type ThoughtSummaryContent = TextContent | ImageContent;
|
|
12132
12591
|
|
|
12133
12592
|
declare type ThoughtSummaryDelta = {
|
|
12134
|
-
type: "thought_summary";
|
|
12135
12593
|
/**
|
|
12136
12594
|
* The content of the response.
|
|
12137
12595
|
*/
|
|
12138
12596
|
content?: Content_2 | undefined;
|
|
12597
|
+
type: "thought_summary";
|
|
12139
12598
|
};
|
|
12140
12599
|
|
|
12600
|
+
/**
|
|
12601
|
+
* Required. The threshold for blocking content. If the harm probability
|
|
12602
|
+
*
|
|
12603
|
+
* @remarks
|
|
12604
|
+
* exceeds this threshold, the content will be blocked.
|
|
12605
|
+
*/
|
|
12606
|
+
declare type Threshold = "block_low_and_above" | "block_medium_and_above" | "block_only_high" | "block_none" | "off" | (string & {});
|
|
12607
|
+
|
|
12141
12608
|
export declare class Tokens extends BaseModule {
|
|
12142
12609
|
private readonly apiClient;
|
|
12143
12610
|
constructor(apiClient: ApiClient);
|
|
@@ -12244,9 +12711,7 @@ declare type Tool$ = Tool_2;
|
|
|
12244
12711
|
export declare interface Tool {
|
|
12245
12712
|
/** 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. */
|
|
12246
12713
|
retrieval?: Retrieval;
|
|
12247
|
-
/** Optional. Tool to support the model interacting directly with the
|
|
12248
|
-
computer. If enabled, it automatically populates computer-use specific
|
|
12249
|
-
Function Declarations. */
|
|
12714
|
+
/** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
|
|
12250
12715
|
computerUse?: ComputerUse;
|
|
12251
12716
|
/** Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora. This field is not supported in Vertex AI. */
|
|
12252
12717
|
fileSearch?: FileSearch;
|
|
@@ -12269,6 +12734,8 @@ export declare interface Tool {
|
|
|
12269
12734
|
urlContext?: UrlContext;
|
|
12270
12735
|
/** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
|
|
12271
12736
|
mcpServers?: McpServer[];
|
|
12737
|
+
/** 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. */
|
|
12738
|
+
exaAiSearch?: ToolExaAiSearch;
|
|
12272
12739
|
}
|
|
12273
12740
|
|
|
12274
12741
|
/**
|
|
@@ -12333,6 +12800,14 @@ export declare interface ToolConfig {
|
|
|
12333
12800
|
includeServerSideToolInvocations?: boolean;
|
|
12334
12801
|
}
|
|
12335
12802
|
|
|
12803
|
+
/** ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. This data type is not supported in Gemini API. */
|
|
12804
|
+
export declare interface ToolExaAiSearch {
|
|
12805
|
+
/** Required. The API key for ExaAiSearch. */
|
|
12806
|
+
apiKey?: string;
|
|
12807
|
+
/** Optional. This field can be used to pass any parameter from the Exa.ai Search API. */
|
|
12808
|
+
customConfigs?: Record<string, unknown>;
|
|
12809
|
+
}
|
|
12810
|
+
|
|
12336
12811
|
export declare type ToolListUnion = ToolUnion[];
|
|
12337
12812
|
|
|
12338
12813
|
/** ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. This data type is not supported in Gemini API. */
|
|
@@ -12424,14 +12899,27 @@ export declare interface Transcription {
|
|
|
12424
12899
|
languageCode?: string;
|
|
12425
12900
|
}
|
|
12426
12901
|
|
|
12902
|
+
/**
|
|
12903
|
+
* @license
|
|
12904
|
+
* Copyright 2026 Google LLC
|
|
12905
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
12906
|
+
*
|
|
12907
|
+
* g3-prettier-ignore-file
|
|
12908
|
+
*/
|
|
12909
|
+
/**
|
|
12910
|
+
* 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.
|
|
12911
|
+
*/
|
|
12912
|
+
declare type Transform = {
|
|
12913
|
+
[k: string]: string;
|
|
12914
|
+
} | Array<{
|
|
12915
|
+
[k: string]: string;
|
|
12916
|
+
}>;
|
|
12917
|
+
|
|
12427
12918
|
/** Config for stream translation. */
|
|
12428
12919
|
export declare interface TranslationConfig {
|
|
12429
|
-
/** If true, the model will generate audio when the target language is
|
|
12430
|
-
spoken, essentially it will parrot the input. If false, we will not produce
|
|
12431
|
-
audio for the target language. */
|
|
12920
|
+
/** 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. */
|
|
12432
12921
|
echoTargetLanguage?: boolean;
|
|
12433
|
-
/** The target language for translation. Supported values are BCP-47
|
|
12434
|
-
language codes (e.g. "en", "es", "fr"). */
|
|
12922
|
+
/** Required. The target language for translation. Supported values are BCP-47 language codes (e.g. "en", "es", "fr"). */
|
|
12435
12923
|
targetLanguageCode?: string;
|
|
12436
12924
|
}
|
|
12437
12925
|
|
|
@@ -12499,6 +12987,8 @@ export declare interface TuningDataStats {
|
|
|
12499
12987
|
preferenceOptimizationDataStats?: PreferenceOptimizationDataStats;
|
|
12500
12988
|
/** The SFT Tuning data stats. */
|
|
12501
12989
|
supervisedTuningDataStats?: SupervisedTuningDataStats;
|
|
12990
|
+
/** Output only. Statistics for reinforcement tuning. */
|
|
12991
|
+
reinforcementTuningDataStats?: DatasetStats;
|
|
12502
12992
|
}
|
|
12503
12993
|
|
|
12504
12994
|
/** A single example for tuning. This data type is not supported in Vertex AI. */
|
|
@@ -12541,6 +13031,7 @@ export declare interface TuningJob {
|
|
|
12541
13031
|
preferenceOptimizationSpec?: PreferenceOptimizationSpec;
|
|
12542
13032
|
/** Tuning Spec for Distillation. */
|
|
12543
13033
|
distillationSpec?: DistillationSpec;
|
|
13034
|
+
/** Tuning Spec for Reinforcement Tuning. */
|
|
12544
13035
|
reinforcementTuningSpec?: ReinforcementTuningSpec;
|
|
12545
13036
|
/** Output only. The tuning data statistics associated with this TuningJob. */
|
|
12546
13037
|
tuningDataStats?: TuningDataStats;
|
|
@@ -12767,6 +13258,7 @@ export declare interface TuningValidationDataset {
|
|
|
12767
13258
|
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
12768
13259
|
*/
|
|
12769
13260
|
declare type Turn = {
|
|
13261
|
+
content?: Array<Content_2> | string | undefined;
|
|
12770
13262
|
/**
|
|
12771
13263
|
* The originator of this turn. Must be user for input or model for
|
|
12772
13264
|
*
|
|
@@ -12774,7 +13266,6 @@ declare type Turn = {
|
|
|
12774
13266
|
* model output.
|
|
12775
13267
|
*/
|
|
12776
13268
|
role?: string | undefined;
|
|
12777
|
-
content?: Array<Content_2> | string | undefined;
|
|
12778
13269
|
};
|
|
12779
13270
|
|
|
12780
13271
|
/** The reason why the turn is complete. */
|
|
@@ -12968,10 +13459,11 @@ declare namespace types {
|
|
|
12968
13459
|
Language,
|
|
12969
13460
|
FunctionResponseScheduling,
|
|
12970
13461
|
Type,
|
|
12971
|
-
Environment,
|
|
12972
13462
|
AuthType,
|
|
12973
13463
|
HttpElementLocation,
|
|
12974
13464
|
ApiSpec,
|
|
13465
|
+
Environment,
|
|
13466
|
+
SafetyPolicy,
|
|
12975
13467
|
PhishBlockThreshold,
|
|
12976
13468
|
Behavior,
|
|
12977
13469
|
DynamicRetrievalConfigMode,
|
|
@@ -12992,8 +13484,14 @@ declare namespace types {
|
|
|
12992
13484
|
ModelStage,
|
|
12993
13485
|
MediaResolution,
|
|
12994
13486
|
Modality,
|
|
13487
|
+
Delivery,
|
|
13488
|
+
AspectRatio,
|
|
13489
|
+
ImageSize,
|
|
12995
13490
|
TuningMode,
|
|
12996
13491
|
AdapterSize,
|
|
13492
|
+
ResponseParseType,
|
|
13493
|
+
MatchOperation,
|
|
13494
|
+
ReinforcementTuningThinkingLevel,
|
|
12997
13495
|
JobState,
|
|
12998
13496
|
TuningJobState,
|
|
12999
13497
|
AggregationMetric,
|
|
@@ -13019,9 +13517,6 @@ declare namespace types {
|
|
|
13019
13517
|
VideoGenerationMaskMode,
|
|
13020
13518
|
VideoCompressionQuality,
|
|
13021
13519
|
ImageResizeMode,
|
|
13022
|
-
ResponseParseType,
|
|
13023
|
-
MatchOperation,
|
|
13024
|
-
ReinforcementTuningThinkingLevel,
|
|
13025
13520
|
TuningMethod,
|
|
13026
13521
|
FileState,
|
|
13027
13522
|
FileSource,
|
|
@@ -13055,7 +13550,6 @@ declare namespace types {
|
|
|
13055
13550
|
HttpOptions,
|
|
13056
13551
|
Schema,
|
|
13057
13552
|
ModelSelectionConfig,
|
|
13058
|
-
ComputerUse,
|
|
13059
13553
|
ApiKeyConfig,
|
|
13060
13554
|
AuthConfigGoogleServiceAccountConfig,
|
|
13061
13555
|
AuthConfigHttpBasicAuthConfig,
|
|
@@ -13079,6 +13573,7 @@ declare namespace types {
|
|
|
13079
13573
|
RagRetrievalConfig,
|
|
13080
13574
|
VertexRagStore,
|
|
13081
13575
|
Retrieval,
|
|
13576
|
+
ComputerUse,
|
|
13082
13577
|
FileSearch,
|
|
13083
13578
|
WebSearch,
|
|
13084
13579
|
ImageSearch,
|
|
@@ -13094,7 +13589,9 @@ declare namespace types {
|
|
|
13094
13589
|
UrlContext,
|
|
13095
13590
|
StreamableHttpTransport,
|
|
13096
13591
|
McpServer,
|
|
13592
|
+
ToolExaAiSearch,
|
|
13097
13593
|
Tool,
|
|
13594
|
+
VoiceConsentSignature,
|
|
13098
13595
|
ReplicatedVoiceConfig,
|
|
13099
13596
|
PrebuiltVoiceConfig,
|
|
13100
13597
|
VoiceConfig,
|
|
@@ -13199,6 +13696,12 @@ declare namespace types {
|
|
|
13199
13696
|
DeleteModelConfig,
|
|
13200
13697
|
DeleteModelParameters,
|
|
13201
13698
|
DeleteModelResponse,
|
|
13699
|
+
AudioResponseFormat,
|
|
13700
|
+
ImageResponseFormat,
|
|
13701
|
+
TextResponseFormat,
|
|
13702
|
+
VideoResponseFormat,
|
|
13703
|
+
ResponseFormat,
|
|
13704
|
+
TranslationConfig,
|
|
13202
13705
|
GenerationConfig,
|
|
13203
13706
|
CountTokensConfig,
|
|
13204
13707
|
CountTokensParameters,
|
|
@@ -13248,6 +13751,8 @@ declare namespace types {
|
|
|
13248
13751
|
PreTunedModel,
|
|
13249
13752
|
DatasetDistributionDistributionBucket,
|
|
13250
13753
|
DatasetDistribution,
|
|
13754
|
+
ReinforcementTuningExample,
|
|
13755
|
+
ReinforcementTuningUserDatasetExamples,
|
|
13251
13756
|
DatasetStats,
|
|
13252
13757
|
DistillationDataStats,
|
|
13253
13758
|
GeminiPreferenceExampleCompletion,
|
|
@@ -13293,7 +13798,6 @@ declare namespace types {
|
|
|
13293
13798
|
CreateTuningJobConfig,
|
|
13294
13799
|
CreateTuningJobParametersPrivate,
|
|
13295
13800
|
TuningOperation,
|
|
13296
|
-
ReinforcementTuningExample,
|
|
13297
13801
|
ValidateRewardConfig,
|
|
13298
13802
|
ValidateRewardParameters,
|
|
13299
13803
|
ReinforcementTuningRewardInfo,
|
|
@@ -13437,7 +13941,6 @@ declare namespace types {
|
|
|
13437
13941
|
LiveClientRealtimeInput,
|
|
13438
13942
|
LiveClientToolResponse,
|
|
13439
13943
|
LiveClientMessage,
|
|
13440
|
-
TranslationConfig,
|
|
13441
13944
|
LiveConnectConfig,
|
|
13442
13945
|
LiveConnectParameters,
|
|
13443
13946
|
CreateChatParameters,
|
|
@@ -13749,15 +14252,10 @@ declare type URLCitation$ = URLCitation;
|
|
|
13749
14252
|
* A URL citation annotation.
|
|
13750
14253
|
*/
|
|
13751
14254
|
declare type URLCitation = {
|
|
13752
|
-
type: "url_citation";
|
|
13753
14255
|
/**
|
|
13754
|
-
*
|
|
13755
|
-
*/
|
|
13756
|
-
url?: string | undefined;
|
|
13757
|
-
/**
|
|
13758
|
-
* The title of the URL.
|
|
14256
|
+
* End of the attributed segment, exclusive.
|
|
13759
14257
|
*/
|
|
13760
|
-
|
|
14258
|
+
end_index?: number | undefined;
|
|
13761
14259
|
/**
|
|
13762
14260
|
* Start of segment of the response that is attributed to this source.
|
|
13763
14261
|
*
|
|
@@ -13767,9 +14265,14 @@ declare type URLCitation = {
|
|
|
13767
14265
|
*/
|
|
13768
14266
|
start_index?: number | undefined;
|
|
13769
14267
|
/**
|
|
13770
|
-
*
|
|
14268
|
+
* The title of the URL.
|
|
13771
14269
|
*/
|
|
13772
|
-
|
|
14270
|
+
title?: string | undefined;
|
|
14271
|
+
type: "url_citation";
|
|
14272
|
+
/**
|
|
14273
|
+
* The URL.
|
|
14274
|
+
*/
|
|
14275
|
+
url?: string | undefined;
|
|
13773
14276
|
};
|
|
13774
14277
|
|
|
13775
14278
|
declare type URLContext$ = URLContext;
|
|
@@ -13814,7 +14317,6 @@ declare type URLContextCallArguments = {
|
|
|
13814
14317
|
};
|
|
13815
14318
|
|
|
13816
14319
|
declare type URLContextCallDelta = {
|
|
13817
|
-
type: "url_context_call";
|
|
13818
14320
|
/**
|
|
13819
14321
|
* The arguments to pass to the URL context.
|
|
13820
14322
|
*/
|
|
@@ -13823,6 +14325,7 @@ declare type URLContextCallDelta = {
|
|
|
13823
14325
|
* A signature hash for backend validation.
|
|
13824
14326
|
*/
|
|
13825
14327
|
signature?: string | undefined;
|
|
14328
|
+
type: "url_context_call";
|
|
13826
14329
|
};
|
|
13827
14330
|
|
|
13828
14331
|
declare type URLContextCallStep$ = URLContextCallStep;
|
|
@@ -13831,7 +14334,10 @@ declare type URLContextCallStep$ = URLContextCallStep;
|
|
|
13831
14334
|
* URL context call step.
|
|
13832
14335
|
*/
|
|
13833
14336
|
declare type URLContextCallStep = {
|
|
13834
|
-
|
|
14337
|
+
/**
|
|
14338
|
+
* The arguments to pass to the URL context.
|
|
14339
|
+
*/
|
|
14340
|
+
arguments: URLContextCallArguments;
|
|
13835
14341
|
/**
|
|
13836
14342
|
* Required. A unique ID for this specific tool call.
|
|
13837
14343
|
*/
|
|
@@ -13840,10 +14346,7 @@ declare type URLContextCallStep = {
|
|
|
13840
14346
|
* A signature hash for backend validation.
|
|
13841
14347
|
*/
|
|
13842
14348
|
signature?: string | undefined;
|
|
13843
|
-
|
|
13844
|
-
* The arguments to pass to the URL context.
|
|
13845
|
-
*/
|
|
13846
|
-
arguments: Arguments;
|
|
14349
|
+
type: "url_context_call";
|
|
13847
14350
|
};
|
|
13848
14351
|
|
|
13849
14352
|
/** Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL. */
|
|
@@ -13860,24 +14363,24 @@ declare type URLContextResult$2 = URLContextResultDelta;
|
|
|
13860
14363
|
* The result of the URL context.
|
|
13861
14364
|
*/
|
|
13862
14365
|
declare type URLContextResult = {
|
|
13863
|
-
/**
|
|
13864
|
-
* The URL that was fetched.
|
|
13865
|
-
*/
|
|
13866
|
-
url?: string | undefined;
|
|
13867
14366
|
/**
|
|
13868
14367
|
* The status of the URL retrieval.
|
|
13869
14368
|
*/
|
|
13870
14369
|
status?: URLContextResultStatus | undefined;
|
|
14370
|
+
/**
|
|
14371
|
+
* The URL that was fetched.
|
|
14372
|
+
*/
|
|
14373
|
+
url?: string | undefined;
|
|
13871
14374
|
};
|
|
13872
14375
|
|
|
13873
14376
|
declare type URLContextResultDelta = {
|
|
13874
|
-
type: "url_context_result";
|
|
13875
|
-
result: Array<URLContextResult>;
|
|
13876
14377
|
is_error?: boolean | undefined;
|
|
14378
|
+
result: Array<URLContextResult>;
|
|
13877
14379
|
/**
|
|
13878
14380
|
* A signature hash for backend validation.
|
|
13879
14381
|
*/
|
|
13880
14382
|
signature?: string | undefined;
|
|
14383
|
+
type: "url_context_result";
|
|
13881
14384
|
};
|
|
13882
14385
|
|
|
13883
14386
|
/**
|
|
@@ -13898,23 +14401,23 @@ declare type URLContextResultStep$ = URLContextResultStep;
|
|
|
13898
14401
|
* URL context result step.
|
|
13899
14402
|
*/
|
|
13900
14403
|
declare type URLContextResultStep = {
|
|
13901
|
-
type: "url_context_result";
|
|
13902
14404
|
/**
|
|
13903
|
-
* Required.
|
|
14405
|
+
* Required. ID to match the ID from the function call block.
|
|
13904
14406
|
*/
|
|
13905
|
-
|
|
14407
|
+
call_id: string;
|
|
13906
14408
|
/**
|
|
13907
14409
|
* Whether the URL context resulted in an error.
|
|
13908
14410
|
*/
|
|
13909
14411
|
is_error?: boolean | undefined;
|
|
13910
14412
|
/**
|
|
13911
|
-
* Required.
|
|
14413
|
+
* Required. The results of the URL context.
|
|
13912
14414
|
*/
|
|
13913
|
-
|
|
14415
|
+
result: Array<URLContextResult>;
|
|
13914
14416
|
/**
|
|
13915
14417
|
* A signature hash for backend validation.
|
|
13916
14418
|
*/
|
|
13917
14419
|
signature?: string | undefined;
|
|
14420
|
+
type: "url_context_result";
|
|
13918
14421
|
};
|
|
13919
14422
|
|
|
13920
14423
|
/** The metadata for a single URL retrieval. */
|
|
@@ -13956,37 +14459,37 @@ declare type Usage$ = Usage;
|
|
|
13956
14459
|
*/
|
|
13957
14460
|
declare type Usage = {
|
|
13958
14461
|
/**
|
|
13959
|
-
*
|
|
14462
|
+
* A breakdown of cached token usage by modality.
|
|
13960
14463
|
*/
|
|
13961
|
-
|
|
14464
|
+
cached_tokens_by_modality?: Array<ModalityTokens> | undefined;
|
|
13962
14465
|
/**
|
|
13963
|
-
*
|
|
14466
|
+
* Grounding tool count.
|
|
13964
14467
|
*/
|
|
13965
|
-
|
|
14468
|
+
grounding_tool_count?: Array<GroundingToolCount> | undefined;
|
|
13966
14469
|
/**
|
|
13967
|
-
*
|
|
14470
|
+
* A breakdown of input token usage by modality.
|
|
13968
14471
|
*/
|
|
13969
|
-
|
|
14472
|
+
input_tokens_by_modality?: Array<ModalityTokens> | undefined;
|
|
13970
14473
|
/**
|
|
13971
|
-
* A breakdown of
|
|
14474
|
+
* A breakdown of output token usage by modality.
|
|
13972
14475
|
*/
|
|
13973
|
-
|
|
14476
|
+
output_tokens_by_modality?: Array<ModalityTokens> | undefined;
|
|
13974
14477
|
/**
|
|
13975
|
-
*
|
|
14478
|
+
* A breakdown of tool-use token usage by modality.
|
|
13976
14479
|
*/
|
|
13977
|
-
|
|
14480
|
+
tool_use_tokens_by_modality?: Array<ModalityTokens> | undefined;
|
|
13978
14481
|
/**
|
|
13979
|
-
*
|
|
14482
|
+
* Number of tokens in the cached part of the prompt (the cached content).
|
|
13980
14483
|
*/
|
|
13981
|
-
|
|
14484
|
+
total_cached_tokens?: number | undefined;
|
|
13982
14485
|
/**
|
|
13983
|
-
* Number of tokens
|
|
14486
|
+
* Number of tokens in the prompt (context).
|
|
13984
14487
|
*/
|
|
13985
|
-
|
|
14488
|
+
total_input_tokens?: number | undefined;
|
|
13986
14489
|
/**
|
|
13987
|
-
*
|
|
14490
|
+
* Total number of tokens across all the generated responses.
|
|
13988
14491
|
*/
|
|
13989
|
-
|
|
14492
|
+
total_output_tokens?: number | undefined;
|
|
13990
14493
|
/**
|
|
13991
14494
|
* Number of tokens of thoughts for thinking models.
|
|
13992
14495
|
*/
|
|
@@ -13999,9 +14502,9 @@ declare type Usage = {
|
|
|
13999
14502
|
*/
|
|
14000
14503
|
total_tokens?: number | undefined;
|
|
14001
14504
|
/**
|
|
14002
|
-
*
|
|
14505
|
+
* Number of tokens present in tool-use prompt(s).
|
|
14003
14506
|
*/
|
|
14004
|
-
|
|
14507
|
+
total_tool_use_tokens?: number | undefined;
|
|
14005
14508
|
};
|
|
14006
14509
|
|
|
14007
14510
|
/** Usage metadata about response(s). */
|
|
@@ -14170,14 +14673,14 @@ declare type VertexAISearchConfig$ = VertexAISearchConfig;
|
|
|
14170
14673
|
* Used to specify configuration for VertexAISearch.
|
|
14171
14674
|
*/
|
|
14172
14675
|
declare type VertexAISearchConfig = {
|
|
14173
|
-
/**
|
|
14174
|
-
* Optional. Used to specify Vertex AI Search engine.
|
|
14175
|
-
*/
|
|
14176
|
-
engine?: string | undefined;
|
|
14177
14676
|
/**
|
|
14178
14677
|
* Optional. Used to specify Vertex AI Search datastores.
|
|
14179
14678
|
*/
|
|
14180
14679
|
datastores?: Array<string> | undefined;
|
|
14680
|
+
/**
|
|
14681
|
+
* Optional. Used to specify Vertex AI Search engine.
|
|
14682
|
+
*/
|
|
14683
|
+
engine?: string | undefined;
|
|
14181
14684
|
};
|
|
14182
14685
|
|
|
14183
14686
|
/** 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. */
|
|
@@ -14249,26 +14752,42 @@ export declare enum VideoCompressionQuality {
|
|
|
14249
14752
|
LOSSLESS = "LOSSLESS"
|
|
14250
14753
|
}
|
|
14251
14754
|
|
|
14755
|
+
declare type VideoConfig$ = VideoConfig;
|
|
14756
|
+
|
|
14757
|
+
/**
|
|
14758
|
+
* Configuration options for video generation.
|
|
14759
|
+
*/
|
|
14760
|
+
declare type VideoConfig = {
|
|
14761
|
+
/**
|
|
14762
|
+
* Optional task mode for video generation. If not specified, the model
|
|
14763
|
+
*
|
|
14764
|
+
* @remarks
|
|
14765
|
+
* automatically determines the appropriate mode based on the provided text
|
|
14766
|
+
* prompt and input media.
|
|
14767
|
+
*/
|
|
14768
|
+
task?: Task | undefined;
|
|
14769
|
+
};
|
|
14770
|
+
|
|
14252
14771
|
declare type VideoContent$ = VideoContent;
|
|
14253
14772
|
|
|
14254
14773
|
/**
|
|
14255
14774
|
* A video content block.
|
|
14256
14775
|
*/
|
|
14257
14776
|
declare type VideoContent = {
|
|
14258
|
-
type: "video";
|
|
14259
14777
|
/**
|
|
14260
14778
|
* The video content.
|
|
14261
14779
|
*/
|
|
14262
14780
|
data?: string | undefined;
|
|
14263
|
-
/**
|
|
14264
|
-
* The URI of the video.
|
|
14265
|
-
*/
|
|
14266
|
-
uri?: string | undefined;
|
|
14267
14781
|
/**
|
|
14268
14782
|
* The mime type of the video.
|
|
14269
14783
|
*/
|
|
14270
14784
|
mime_type?: VideoContentMimeType | undefined;
|
|
14271
14785
|
resolution?: MediaResolution_2 | undefined;
|
|
14786
|
+
type: "video";
|
|
14787
|
+
/**
|
|
14788
|
+
* The URI of the video.
|
|
14789
|
+
*/
|
|
14790
|
+
uri?: string | undefined;
|
|
14272
14791
|
};
|
|
14273
14792
|
|
|
14274
14793
|
/**
|
|
@@ -14277,11 +14796,11 @@ declare type VideoContent = {
|
|
|
14277
14796
|
declare type VideoContentMimeType = "video/mp4" | "video/mpeg" | "video/mpg" | "video/mov" | "video/avi" | "video/x-flv" | "video/webm" | "video/wmv" | "video/3gpp" | (string & {});
|
|
14278
14797
|
|
|
14279
14798
|
declare type VideoDelta = {
|
|
14280
|
-
type: "video";
|
|
14281
14799
|
data?: string | undefined;
|
|
14282
|
-
uri?: string | undefined;
|
|
14283
14800
|
mime_type?: VideoDeltaMimeType | undefined;
|
|
14284
14801
|
resolution?: MediaResolution_2 | undefined;
|
|
14802
|
+
type: "video";
|
|
14803
|
+
uri?: string | undefined;
|
|
14285
14804
|
};
|
|
14286
14805
|
|
|
14287
14806
|
declare type VideoDeltaMimeType = "video/mp4" | "video/mpeg" | "video/mpg" | "video/mov" | "video/avi" | "video/x-flv" | "video/webm" | "video/wmv" | "video/3gpp" | (string & {});
|
|
@@ -14373,6 +14892,63 @@ export declare enum VideoOrientation {
|
|
|
14373
14892
|
PORTRAIT = "PORTRAIT"
|
|
14374
14893
|
}
|
|
14375
14894
|
|
|
14895
|
+
declare type VideoResponseFormat$ = VideoResponseFormat_2;
|
|
14896
|
+
|
|
14897
|
+
/** Configuration for video-specific output formatting. This data type is not supported in Gemini API. */
|
|
14898
|
+
export declare class VideoResponseFormat {
|
|
14899
|
+
/** The aspect ratio for the video output. */
|
|
14900
|
+
aspectRatio?: AspectRatio;
|
|
14901
|
+
/** Optional. Delivery mode for the generated content. */
|
|
14902
|
+
delivery?: Delivery;
|
|
14903
|
+
/** Optional. The duration for the video output. */
|
|
14904
|
+
duration?: string;
|
|
14905
|
+
/** Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI. */
|
|
14906
|
+
gcsUri?: string;
|
|
14907
|
+
}
|
|
14908
|
+
|
|
14909
|
+
/**
|
|
14910
|
+
* Configuration for video output format.
|
|
14911
|
+
*/
|
|
14912
|
+
declare type VideoResponseFormat_2 = {
|
|
14913
|
+
/**
|
|
14914
|
+
* The aspect ratio for the video output.
|
|
14915
|
+
*/
|
|
14916
|
+
aspect_ratio?: VideoResponseFormatAspectRatio | undefined;
|
|
14917
|
+
/**
|
|
14918
|
+
* The delivery mode for the video output.
|
|
14919
|
+
*/
|
|
14920
|
+
delivery?: VideoResponseFormatDelivery | undefined;
|
|
14921
|
+
/**
|
|
14922
|
+
* The duration for the video output.
|
|
14923
|
+
*/
|
|
14924
|
+
duration?: string | undefined;
|
|
14925
|
+
/**
|
|
14926
|
+
* The GCS URI to store the video output. Required for Vertex if delivery mode
|
|
14927
|
+
*
|
|
14928
|
+
* @remarks
|
|
14929
|
+
* is URI.
|
|
14930
|
+
*/
|
|
14931
|
+
gcs_uri?: string | undefined;
|
|
14932
|
+
type: "video";
|
|
14933
|
+
};
|
|
14934
|
+
|
|
14935
|
+
/**
|
|
14936
|
+
* @license
|
|
14937
|
+
* Copyright 2026 Google LLC
|
|
14938
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
14939
|
+
*
|
|
14940
|
+
* g3-prettier-ignore-file
|
|
14941
|
+
*/
|
|
14942
|
+
/**
|
|
14943
|
+
* The aspect ratio for the video output.
|
|
14944
|
+
*/
|
|
14945
|
+
declare type VideoResponseFormatAspectRatio = "16:9" | "9:16" | (string & {});
|
|
14946
|
+
|
|
14947
|
+
/**
|
|
14948
|
+
* The delivery mode for the video output.
|
|
14949
|
+
*/
|
|
14950
|
+
declare type VideoResponseFormatDelivery = "inline" | "uri" | (string & {});
|
|
14951
|
+
|
|
14376
14952
|
/**
|
|
14377
14953
|
* Whether to include visualizations in the response.
|
|
14378
14954
|
*/
|
|
@@ -14417,20 +14993,43 @@ export declare interface VoiceConfig {
|
|
|
14417
14993
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
14418
14994
|
}
|
|
14419
14995
|
|
|
14996
|
+
/** The signature of the voice consent check. */
|
|
14997
|
+
export declare interface VoiceConsentSignature {
|
|
14998
|
+
/** The signature string.
|
|
14999
|
+
*/
|
|
15000
|
+
signature?: string;
|
|
15001
|
+
}
|
|
15002
|
+
|
|
14420
15003
|
declare type Webhook$ = Webhook;
|
|
14421
15004
|
|
|
14422
15005
|
/**
|
|
14423
15006
|
* A Webhook resource.
|
|
14424
15007
|
*/
|
|
14425
15008
|
declare type Webhook = {
|
|
15009
|
+
/**
|
|
15010
|
+
* Output only. The timestamp when the webhook was created.
|
|
15011
|
+
*/
|
|
15012
|
+
create_time?: string | undefined;
|
|
15013
|
+
/**
|
|
15014
|
+
* Output only. The ID of the webhook.
|
|
15015
|
+
*/
|
|
15016
|
+
id?: string | undefined;
|
|
14426
15017
|
/**
|
|
14427
15018
|
* Optional. The user-provided name of the webhook.
|
|
14428
15019
|
*/
|
|
14429
15020
|
name?: string | undefined;
|
|
14430
15021
|
/**
|
|
14431
|
-
*
|
|
15022
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
14432
15023
|
*/
|
|
14433
|
-
|
|
15024
|
+
new_signing_secret?: string | undefined;
|
|
15025
|
+
/**
|
|
15026
|
+
* Output only. The signing secrets associated with this webhook.
|
|
15027
|
+
*/
|
|
15028
|
+
signing_secrets?: Array<SigningSecret> | undefined;
|
|
15029
|
+
/**
|
|
15030
|
+
* Output only. The state of the webhook.
|
|
15031
|
+
*/
|
|
15032
|
+
state?: WebhookState | undefined;
|
|
14434
15033
|
/**
|
|
14435
15034
|
* Required. The events that the webhook is subscribed to.
|
|
14436
15035
|
*
|
|
@@ -14445,30 +15044,14 @@ declare type Webhook = {
|
|
|
14445
15044
|
* - video.generated
|
|
14446
15045
|
*/
|
|
14447
15046
|
subscribed_events: Array<WebhookSubscribedEvent>;
|
|
14448
|
-
/**
|
|
14449
|
-
* Output only. The timestamp when the webhook was created.
|
|
14450
|
-
*/
|
|
14451
|
-
create_time?: string | undefined;
|
|
14452
15047
|
/**
|
|
14453
15048
|
* Output only. The timestamp when the webhook was last updated.
|
|
14454
15049
|
*/
|
|
14455
15050
|
update_time?: string | undefined;
|
|
14456
15051
|
/**
|
|
14457
|
-
*
|
|
14458
|
-
*/
|
|
14459
|
-
signing_secrets?: Array<SigningSecret> | undefined;
|
|
14460
|
-
/**
|
|
14461
|
-
* Output only. The state of the webhook.
|
|
14462
|
-
*/
|
|
14463
|
-
state?: WebhookState | undefined;
|
|
14464
|
-
/**
|
|
14465
|
-
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
14466
|
-
*/
|
|
14467
|
-
new_signing_secret?: string | undefined;
|
|
14468
|
-
/**
|
|
14469
|
-
* Output only. The ID of the webhook.
|
|
15052
|
+
* Required. The URI to which webhook events will be sent.
|
|
14470
15053
|
*/
|
|
14471
|
-
|
|
15054
|
+
uri: string;
|
|
14472
15055
|
};
|
|
14473
15056
|
|
|
14474
15057
|
declare type WebhookConfig$ = WebhookConfig_2;
|
|
@@ -14534,10 +15117,6 @@ declare type WebhookInput = {
|
|
|
14534
15117
|
* Optional. The user-provided name of the webhook.
|
|
14535
15118
|
*/
|
|
14536
15119
|
name?: string | undefined;
|
|
14537
|
-
/**
|
|
14538
|
-
* Required. The URI to which webhook events will be sent.
|
|
14539
|
-
*/
|
|
14540
|
-
uri: string;
|
|
14541
15120
|
/**
|
|
14542
15121
|
* Required. The events that the webhook is subscribed to.
|
|
14543
15122
|
*
|
|
@@ -14552,6 +15131,10 @@ declare type WebhookInput = {
|
|
|
14552
15131
|
* - video.generated
|
|
14553
15132
|
*/
|
|
14554
15133
|
subscribed_events: Array<WebhookSubscribedEvent>;
|
|
15134
|
+
/**
|
|
15135
|
+
* Required. The URI to which webhook events will be sent.
|
|
15136
|
+
*/
|
|
15137
|
+
uri: string;
|
|
14555
15138
|
};
|
|
14556
15139
|
|
|
14557
15140
|
declare type WebhookListParams$ = ListWebhooksParams;
|
|
@@ -14568,10 +15151,6 @@ declare type WebhookListResponse$ = WebhookListResponse;
|
|
|
14568
15151
|
* Response message for WebhookService.ListWebhooks.
|
|
14569
15152
|
*/
|
|
14570
15153
|
declare type WebhookListResponse = {
|
|
14571
|
-
/**
|
|
14572
|
-
* The webhooks.
|
|
14573
|
-
*/
|
|
14574
|
-
webhooks?: Array<Webhook> | undefined;
|
|
14575
15154
|
/**
|
|
14576
15155
|
* A token, which can be sent as `page_token` to retrieve the next page.
|
|
14577
15156
|
*
|
|
@@ -14579,6 +15158,10 @@ declare type WebhookListResponse = {
|
|
|
14579
15158
|
* If this field is omitted, there are no subsequent pages.
|
|
14580
15159
|
*/
|
|
14581
15160
|
next_page_token?: string | undefined;
|
|
15161
|
+
/**
|
|
15162
|
+
* The webhooks.
|
|
15163
|
+
*/
|
|
15164
|
+
webhooks?: Array<Webhook> | undefined;
|
|
14582
15165
|
};
|
|
14583
15166
|
|
|
14584
15167
|
declare type WebhookPingParams$ = PingWebhookRequest;
|
|
@@ -14656,11 +15239,11 @@ declare namespace webhooks {
|
|
|
14656
15239
|
WebhookListResponse,
|
|
14657
15240
|
WebhookPingResponse,
|
|
14658
15241
|
WebhookRotateSigningSecretResponse,
|
|
14659
|
-
WebhookUpdateSubscribedEvent,
|
|
14660
15242
|
WebhookUpdateState,
|
|
15243
|
+
WebhookUpdateSubscribedEvent,
|
|
14661
15244
|
WebhookUpdate,
|
|
14662
|
-
WebhookSubscribedEvent,
|
|
14663
15245
|
WebhookState,
|
|
15246
|
+
WebhookSubscribedEvent,
|
|
14664
15247
|
Webhook,
|
|
14665
15248
|
WebhookInput
|
|
14666
15249
|
}
|
|
@@ -14681,9 +15264,9 @@ declare type WebhookUpdate = {
|
|
|
14681
15264
|
*/
|
|
14682
15265
|
name?: string | undefined;
|
|
14683
15266
|
/**
|
|
14684
|
-
* Optional. The
|
|
15267
|
+
* Optional. The state of the webhook.
|
|
14685
15268
|
*/
|
|
14686
|
-
|
|
15269
|
+
state?: WebhookUpdateState | undefined;
|
|
14687
15270
|
/**
|
|
14688
15271
|
* Optional. The events that the webhook is subscribed to.
|
|
14689
15272
|
*
|
|
@@ -14699,9 +15282,9 @@ declare type WebhookUpdate = {
|
|
|
14699
15282
|
*/
|
|
14700
15283
|
subscribed_events?: Array<WebhookUpdateSubscribedEvent> | undefined;
|
|
14701
15284
|
/**
|
|
14702
|
-
* Optional. The
|
|
15285
|
+
* Optional. The URI to which webhook events will be sent.
|
|
14703
15286
|
*/
|
|
14704
|
-
|
|
15287
|
+
uri?: string | undefined;
|
|
14705
15288
|
};
|
|
14706
15289
|
|
|
14707
15290
|
declare type WebhookUpdateParams$ = WebhookUpdate;
|
|
@@ -14711,11 +15294,6 @@ declare type WebhookUpdateParams = {
|
|
|
14711
15294
|
update_mask?: string;
|
|
14712
15295
|
} & webhooks.WebhookUpdate;
|
|
14713
15296
|
|
|
14714
|
-
/**
|
|
14715
|
-
* Optional. The state of the webhook.
|
|
14716
|
-
*/
|
|
14717
|
-
declare type WebhookUpdateState = "enabled" | "disabled" | "disabled_due_to_failed_deliveries";
|
|
14718
|
-
|
|
14719
15297
|
/**
|
|
14720
15298
|
* @license
|
|
14721
15299
|
* Copyright 2026 Google LLC
|
|
@@ -14723,6 +15301,11 @@ declare type WebhookUpdateState = "enabled" | "disabled" | "disabled_due_to_fail
|
|
|
14723
15301
|
*
|
|
14724
15302
|
* g3-prettier-ignore-file
|
|
14725
15303
|
*/
|
|
15304
|
+
/**
|
|
15305
|
+
* Optional. The state of the webhook.
|
|
15306
|
+
*/
|
|
15307
|
+
declare type WebhookUpdateState = "enabled" | "disabled" | "disabled_due_to_failed_deliveries";
|
|
15308
|
+
|
|
14726
15309
|
declare type WebhookUpdateSubscribedEvent = "batch.succeeded" | "batch.expired" | "batch.failed" | "interaction.requires_action" | "interaction.completed" | "interaction.failed" | "video.generated" | (string & {});
|
|
14727
15310
|
|
|
14728
15311
|
/** Standard web search for grounding and related configurations. Only text results are returned. */
|