@google/genai 2.10.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 +975 -588
- package/dist/index.cjs +446 -77
- package/dist/index.mjs +442 -78
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +446 -77
- package/dist/node/index.mjs +442 -78
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +975 -588
- package/dist/tokenizer/node.cjs +157 -53
- package/dist/tokenizer/node.d.ts +204 -4
- package/dist/tokenizer/node.mjs +157 -53
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +158 -54
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +292 -67
- package/dist/vertex_internal/index.js +158 -54
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +442 -78
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +975 -588
- package/package.json +2 -9
package/dist/node/node.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
|
*/
|
|
@@ -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
|
|
|
@@ -1764,15 +1820,10 @@ export declare interface ComputerUse {
|
|
|
1764
1820
|
* A tool that can be used by the model to interact with the computer.
|
|
1765
1821
|
*/
|
|
1766
1822
|
declare type ComputerUse_2 = {
|
|
1767
|
-
type: "computer_use";
|
|
1768
|
-
/**
|
|
1769
|
-
* The environment being operated.
|
|
1770
|
-
*/
|
|
1771
|
-
environment?: EnvironmentEnum | undefined;
|
|
1772
1823
|
/**
|
|
1773
|
-
*
|
|
1824
|
+
* Optional. Disabled safety policies for computer use.
|
|
1774
1825
|
*/
|
|
1775
|
-
|
|
1826
|
+
disabled_safety_policies?: Array<DisabledSafetyPolicy> | undefined;
|
|
1776
1827
|
/**
|
|
1777
1828
|
* Whether enable the prompt injection detection check on computer-use
|
|
1778
1829
|
*
|
|
@@ -1781,9 +1832,14 @@ declare type ComputerUse_2 = {
|
|
|
1781
1832
|
*/
|
|
1782
1833
|
enable_prompt_injection_detection?: boolean | undefined;
|
|
1783
1834
|
/**
|
|
1784
|
-
*
|
|
1835
|
+
* The environment being operated.
|
|
1785
1836
|
*/
|
|
1786
|
-
|
|
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";
|
|
1787
1843
|
};
|
|
1788
1844
|
|
|
1789
1845
|
/** Optional parameters for computing tokens. */
|
|
@@ -2032,7 +2088,7 @@ declare type CreateAgentInteraction = {
|
|
|
2032
2088
|
/**
|
|
2033
2089
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
2034
2090
|
*/
|
|
2035
|
-
response_format?: Array<
|
|
2091
|
+
response_format?: Array<ResponseFormat_2> | ResponseFormat_2 | undefined;
|
|
2036
2092
|
/**
|
|
2037
2093
|
* The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
|
|
2038
2094
|
*/
|
|
@@ -2041,6 +2097,16 @@ declare type CreateAgentInteraction = {
|
|
|
2041
2097
|
* Configuration parameters for the agent interaction.
|
|
2042
2098
|
*/
|
|
2043
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;
|
|
2044
2110
|
/**
|
|
2045
2111
|
* The input for the interaction.
|
|
2046
2112
|
*/
|
|
@@ -2074,7 +2140,7 @@ declare type CreateAgentInteractionParamsStreaming = CreateAgentInteractionParam
|
|
|
2074
2140
|
/**
|
|
2075
2141
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
2076
2142
|
*/
|
|
2077
|
-
declare type CreateAgentInteractionResponseFormat = Array<
|
|
2143
|
+
declare type CreateAgentInteractionResponseFormat = Array<ResponseFormat_2> | ResponseFormat_2;
|
|
2078
2144
|
|
|
2079
2145
|
declare type CreateAgentParams = Omit<CreateAgentRequest, "body"> & CreateAgentRequest["body"];
|
|
2080
2146
|
|
|
@@ -2418,7 +2484,7 @@ declare type CreateModelInteraction = {
|
|
|
2418
2484
|
/**
|
|
2419
2485
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
2420
2486
|
*/
|
|
2421
|
-
response_format?: Array<
|
|
2487
|
+
response_format?: Array<ResponseFormat_2> | ResponseFormat_2 | undefined;
|
|
2422
2488
|
/**
|
|
2423
2489
|
* The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
|
|
2424
2490
|
*/
|
|
@@ -2437,6 +2503,16 @@ declare type CreateModelInteraction = {
|
|
|
2437
2503
|
* `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
|
|
2438
2504
|
*/
|
|
2439
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;
|
|
2440
2516
|
/**
|
|
2441
2517
|
* The input for the interaction.
|
|
2442
2518
|
*/
|
|
@@ -2465,7 +2541,7 @@ declare type CreateModelInteractionParamsStreaming = CreateModelInteractionParam
|
|
|
2465
2541
|
/**
|
|
2466
2542
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
2467
2543
|
*/
|
|
2468
|
-
declare type CreateModelInteractionResponseFormat = Array<
|
|
2544
|
+
declare type CreateModelInteractionResponseFormat = Array<ResponseFormat_2> | ResponseFormat_2;
|
|
2469
2545
|
|
|
2470
2546
|
/**
|
|
2471
2547
|
* Creates a `Part` object from a `base64` encoded `string`.
|
|
@@ -2697,6 +2773,12 @@ export declare interface DatasetStats {
|
|
|
2697
2773
|
userMessagePerExampleDistribution?: DatasetDistribution;
|
|
2698
2774
|
/** Output only. Dataset distributions for the user output tokens. */
|
|
2699
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;
|
|
2700
2782
|
}
|
|
2701
2783
|
|
|
2702
2784
|
declare type DeepResearchAgentConfig$ = DeepResearchAgentConfig;
|
|
@@ -2705,12 +2787,6 @@ declare type DeepResearchAgentConfig$ = DeepResearchAgentConfig;
|
|
|
2705
2787
|
* Configuration for the Deep Research agent.
|
|
2706
2788
|
*/
|
|
2707
2789
|
declare type DeepResearchAgentConfig = {
|
|
2708
|
-
type: "deep-research";
|
|
2709
|
-
thinking_summaries?: ThinkingSummaries | undefined;
|
|
2710
|
-
/**
|
|
2711
|
-
* Whether to include visualizations in the response.
|
|
2712
|
-
*/
|
|
2713
|
-
visualization?: Visualization | undefined;
|
|
2714
2790
|
/**
|
|
2715
2791
|
* Enables human-in-the-loop planning for the Deep Research agent. If set to
|
|
2716
2792
|
*
|
|
@@ -2724,6 +2800,12 @@ declare type DeepResearchAgentConfig = {
|
|
|
2724
2800
|
* Enables bigquery tool for the Deep Research agent.
|
|
2725
2801
|
*/
|
|
2726
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;
|
|
2727
2809
|
};
|
|
2728
2810
|
|
|
2729
2811
|
declare type DeleteAgentParams = Omit<DeleteAgentRequest, "id">;
|
|
@@ -2931,11 +3013,34 @@ declare type DeleteWebhookRequest = {
|
|
|
2931
3013
|
id: string;
|
|
2932
3014
|
};
|
|
2933
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
|
+
|
|
2934
3032
|
/**
|
|
2935
3033
|
* Turns all network off.
|
|
2936
3034
|
*/
|
|
2937
3035
|
declare type Disabled = "disabled";
|
|
2938
3036
|
|
|
3037
|
+
/**
|
|
3038
|
+
* @license
|
|
3039
|
+
* Copyright 2026 Google LLC
|
|
3040
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
3041
|
+
*
|
|
3042
|
+
* g3-prettier-ignore-file
|
|
3043
|
+
*/
|
|
2939
3044
|
declare type DisabledSafetyPolicy = "financial_transactions" | "sensitive_data_modification" | "communication_tool" | "account_creation" | "data_modification" | "user_consent_management" | "legal_terms_and_agreements" | (string & {});
|
|
2940
3045
|
|
|
2941
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. */
|
|
@@ -3037,19 +3142,19 @@ declare type DocumentContent$ = DocumentContent;
|
|
|
3037
3142
|
* A document content block.
|
|
3038
3143
|
*/
|
|
3039
3144
|
declare type DocumentContent = {
|
|
3040
|
-
type: "document";
|
|
3041
3145
|
/**
|
|
3042
3146
|
* The document content.
|
|
3043
3147
|
*/
|
|
3044
3148
|
data?: string | undefined;
|
|
3045
|
-
/**
|
|
3046
|
-
* The URI of the document.
|
|
3047
|
-
*/
|
|
3048
|
-
uri?: string | undefined;
|
|
3049
3149
|
/**
|
|
3050
3150
|
* The mime type of the document.
|
|
3051
3151
|
*/
|
|
3052
3152
|
mime_type?: DocumentContentMimeType | undefined;
|
|
3153
|
+
type: "document";
|
|
3154
|
+
/**
|
|
3155
|
+
* The URI of the document.
|
|
3156
|
+
*/
|
|
3157
|
+
uri?: string | undefined;
|
|
3053
3158
|
};
|
|
3054
3159
|
|
|
3055
3160
|
/**
|
|
@@ -3065,10 +3170,10 @@ declare type DocumentContent = {
|
|
|
3065
3170
|
declare type DocumentContentMimeType = "application/pdf" | "text/csv" | (string & {});
|
|
3066
3171
|
|
|
3067
3172
|
declare type DocumentDelta = {
|
|
3068
|
-
type: "document";
|
|
3069
3173
|
data?: string | undefined;
|
|
3070
|
-
uri?: string | undefined;
|
|
3071
3174
|
mime_type?: DocumentDeltaMimeType | undefined;
|
|
3175
|
+
type: "document";
|
|
3176
|
+
uri?: string | undefined;
|
|
3072
3177
|
};
|
|
3073
3178
|
|
|
3074
3179
|
/**
|
|
@@ -3526,21 +3631,21 @@ export declare enum Environment {
|
|
|
3526
3631
|
* Configuration for a custom environment.
|
|
3527
3632
|
*/
|
|
3528
3633
|
declare type Environment_2 = {
|
|
3529
|
-
|
|
3530
|
-
|
|
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;
|
|
3531
3641
|
/**
|
|
3532
3642
|
* Network configuration for the environment.
|
|
3533
3643
|
*/
|
|
3534
3644
|
network?: EnvironmentNetworkEgressAllowlist | NetworkEnum | undefined;
|
|
3645
|
+
sources?: Array<Source> | undefined;
|
|
3646
|
+
type: "remote";
|
|
3535
3647
|
};
|
|
3536
3648
|
|
|
3537
|
-
/**
|
|
3538
|
-
* @license
|
|
3539
|
-
* Copyright 2026 Google LLC
|
|
3540
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
3541
|
-
*
|
|
3542
|
-
* g3-prettier-ignore-file
|
|
3543
|
-
*/
|
|
3544
3649
|
/**
|
|
3545
3650
|
* The environment being operated.
|
|
3546
3651
|
*/
|
|
@@ -3558,7 +3663,6 @@ declare type Error$2 = Status;
|
|
|
3558
3663
|
declare type ErrorEvent$ = ErrorEvent_2;
|
|
3559
3664
|
|
|
3560
3665
|
declare type ErrorEvent_2 = {
|
|
3561
|
-
event_type: "error";
|
|
3562
3666
|
/**
|
|
3563
3667
|
* Error message from an interaction.
|
|
3564
3668
|
*/
|
|
@@ -3570,6 +3674,7 @@ declare type ErrorEvent_2 = {
|
|
|
3570
3674
|
* this event.
|
|
3571
3675
|
*/
|
|
3572
3676
|
event_id?: string | undefined;
|
|
3677
|
+
event_type: "error";
|
|
3573
3678
|
metadata?: StreamMetadata | undefined;
|
|
3574
3679
|
};
|
|
3575
3680
|
|
|
@@ -3768,33 +3873,36 @@ declare type FileCitation$ = FileCitation;
|
|
|
3768
3873
|
* A file citation annotation.
|
|
3769
3874
|
*/
|
|
3770
3875
|
declare type FileCitation = {
|
|
3771
|
-
|
|
3876
|
+
/**
|
|
3877
|
+
* User provided metadata about the retrieved context.
|
|
3878
|
+
*/
|
|
3879
|
+
custom_metadata?: {
|
|
3880
|
+
[k: string]: any;
|
|
3881
|
+
} | undefined;
|
|
3772
3882
|
/**
|
|
3773
3883
|
* The URI of the file.
|
|
3774
3884
|
*/
|
|
3775
3885
|
document_uri?: string | undefined;
|
|
3776
3886
|
/**
|
|
3777
|
-
*
|
|
3887
|
+
* End of the attributed segment, exclusive.
|
|
3778
3888
|
*/
|
|
3779
|
-
|
|
3889
|
+
end_index?: number | undefined;
|
|
3780
3890
|
/**
|
|
3781
|
-
*
|
|
3891
|
+
* The name of the file.
|
|
3782
3892
|
*/
|
|
3783
|
-
|
|
3893
|
+
file_name?: string | undefined;
|
|
3784
3894
|
/**
|
|
3785
|
-
*
|
|
3895
|
+
* Media ID in-case of image citations, if applicable.
|
|
3786
3896
|
*/
|
|
3787
|
-
|
|
3788
|
-
[k: string]: any;
|
|
3789
|
-
} | undefined;
|
|
3897
|
+
media_id?: string | undefined;
|
|
3790
3898
|
/**
|
|
3791
3899
|
* Page number of the cited document, if applicable.
|
|
3792
3900
|
*/
|
|
3793
3901
|
page_number?: number | undefined;
|
|
3794
3902
|
/**
|
|
3795
|
-
*
|
|
3903
|
+
* Source attributed for a portion of the text.
|
|
3796
3904
|
*/
|
|
3797
|
-
|
|
3905
|
+
source?: string | undefined;
|
|
3798
3906
|
/**
|
|
3799
3907
|
* Start of segment of the response that is attributed to this source.
|
|
3800
3908
|
*
|
|
@@ -3803,10 +3911,7 @@ declare type FileCitation = {
|
|
|
3803
3911
|
* Index indicates the start of the segment, measured in bytes.
|
|
3804
3912
|
*/
|
|
3805
3913
|
start_index?: number | undefined;
|
|
3806
|
-
|
|
3807
|
-
* End of the attributed segment, exclusive.
|
|
3808
|
-
*/
|
|
3809
|
-
end_index?: number | undefined;
|
|
3914
|
+
type: "file_citation";
|
|
3810
3915
|
};
|
|
3811
3916
|
|
|
3812
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. */
|
|
@@ -3962,19 +4067,19 @@ export declare interface FileSearch {
|
|
|
3962
4067
|
* A tool that can be used by the model to search files.
|
|
3963
4068
|
*/
|
|
3964
4069
|
declare type FileSearch_2 = {
|
|
3965
|
-
type: "file_search";
|
|
3966
4070
|
/**
|
|
3967
4071
|
* The file search store names to search.
|
|
3968
4072
|
*/
|
|
3969
4073
|
file_search_store_names?: Array<string> | undefined;
|
|
3970
|
-
/**
|
|
3971
|
-
* The number of semantic retrieval chunks to retrieve.
|
|
3972
|
-
*/
|
|
3973
|
-
top_k?: number | undefined;
|
|
3974
4074
|
/**
|
|
3975
4075
|
* Metadata filter to apply to the semantic retrieval documents and chunks.
|
|
3976
4076
|
*/
|
|
3977
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";
|
|
3978
4083
|
};
|
|
3979
4084
|
|
|
3980
4085
|
declare type FileSearchCall$ = FileSearchCallDelta;
|
|
@@ -3987,11 +4092,11 @@ declare type FileSearchCall$ = FileSearchCallDelta;
|
|
|
3987
4092
|
* g3-prettier-ignore-file
|
|
3988
4093
|
*/
|
|
3989
4094
|
declare type FileSearchCallDelta = {
|
|
3990
|
-
type: "file_search_call";
|
|
3991
4095
|
/**
|
|
3992
4096
|
* A signature hash for backend validation.
|
|
3993
4097
|
*/
|
|
3994
4098
|
signature?: string | undefined;
|
|
4099
|
+
type: "file_search_call";
|
|
3995
4100
|
};
|
|
3996
4101
|
|
|
3997
4102
|
declare type FileSearchCallStep$ = FileSearchCallStep;
|
|
@@ -4007,7 +4112,6 @@ declare type FileSearchCallStep$ = FileSearchCallStep;
|
|
|
4007
4112
|
* File Search call step.
|
|
4008
4113
|
*/
|
|
4009
4114
|
declare type FileSearchCallStep = {
|
|
4010
|
-
type: "file_search_call";
|
|
4011
4115
|
/**
|
|
4012
4116
|
* Required. A unique ID for this specific tool call.
|
|
4013
4117
|
*/
|
|
@@ -4016,6 +4120,7 @@ declare type FileSearchCallStep = {
|
|
|
4016
4120
|
* A signature hash for backend validation.
|
|
4017
4121
|
*/
|
|
4018
4122
|
signature?: string | undefined;
|
|
4123
|
+
type: "file_search_call";
|
|
4019
4124
|
};
|
|
4020
4125
|
|
|
4021
4126
|
declare type FileSearchResult$ = FileSearchResultDelta;
|
|
@@ -4033,12 +4138,12 @@ declare type FileSearchResult$ = FileSearchResultDelta;
|
|
|
4033
4138
|
declare type FileSearchResult = {};
|
|
4034
4139
|
|
|
4035
4140
|
declare type FileSearchResultDelta = {
|
|
4036
|
-
type: "file_search_result";
|
|
4037
4141
|
result: Array<FileSearchResult>;
|
|
4038
4142
|
/**
|
|
4039
4143
|
* A signature hash for backend validation.
|
|
4040
4144
|
*/
|
|
4041
4145
|
signature?: string | undefined;
|
|
4146
|
+
type: "file_search_result";
|
|
4042
4147
|
};
|
|
4043
4148
|
|
|
4044
4149
|
declare type FileSearchResultStep$ = FileSearchResultStep;
|
|
@@ -4054,7 +4159,6 @@ declare type FileSearchResultStep$ = FileSearchResultStep;
|
|
|
4054
4159
|
* File Search result step.
|
|
4055
4160
|
*/
|
|
4056
4161
|
declare type FileSearchResultStep = {
|
|
4057
|
-
type: "file_search_result";
|
|
4058
4162
|
/**
|
|
4059
4163
|
* Required. ID to match the ID from the function call block.
|
|
4060
4164
|
*/
|
|
@@ -4063,6 +4167,7 @@ declare type FileSearchResultStep = {
|
|
|
4063
4167
|
* A signature hash for backend validation.
|
|
4064
4168
|
*/
|
|
4065
4169
|
signature?: string | undefined;
|
|
4170
|
+
type: "file_search_result";
|
|
4066
4171
|
};
|
|
4067
4172
|
|
|
4068
4173
|
/** A collection of Documents. */
|
|
@@ -4239,6 +4344,10 @@ export declare interface FileStatus {
|
|
|
4239
4344
|
* Config for filters.
|
|
4240
4345
|
*/
|
|
4241
4346
|
declare type Filter = {
|
|
4347
|
+
/**
|
|
4348
|
+
* Optional. String for metadata filtering.
|
|
4349
|
+
*/
|
|
4350
|
+
metadata_filter?: string | undefined;
|
|
4242
4351
|
/**
|
|
4243
4352
|
* Optional. Only returns contexts with vector distance smaller than the
|
|
4244
4353
|
*
|
|
@@ -4253,10 +4362,6 @@ declare type Filter = {
|
|
|
4253
4362
|
* threshold.
|
|
4254
4363
|
*/
|
|
4255
4364
|
vector_similarity_threshold?: number | undefined;
|
|
4256
|
-
/**
|
|
4257
|
-
* Optional. String for metadata filtering.
|
|
4258
|
-
*/
|
|
4259
|
-
metadata_filter?: string | undefined;
|
|
4260
4365
|
};
|
|
4261
4366
|
|
|
4262
4367
|
/** Output only. The reason why the model stopped generating tokens.
|
|
@@ -4406,11 +4511,6 @@ declare type FunctionCallStep$ = FunctionCallStep;
|
|
|
4406
4511
|
* A function tool call step.
|
|
4407
4512
|
*/
|
|
4408
4513
|
declare type FunctionCallStep = {
|
|
4409
|
-
type: "function_call";
|
|
4410
|
-
/**
|
|
4411
|
-
* Required. The name of the tool to call.
|
|
4412
|
-
*/
|
|
4413
|
-
name: string;
|
|
4414
4514
|
/**
|
|
4415
4515
|
* Required. The arguments to pass to the function.
|
|
4416
4516
|
*/
|
|
@@ -4421,6 +4521,11 @@ declare type FunctionCallStep = {
|
|
|
4421
4521
|
* Required. A unique ID for this specific tool call.
|
|
4422
4522
|
*/
|
|
4423
4523
|
id: string;
|
|
4524
|
+
/**
|
|
4525
|
+
* Required. The name of the tool to call.
|
|
4526
|
+
*/
|
|
4527
|
+
name: string;
|
|
4528
|
+
type: "function_call";
|
|
4424
4529
|
};
|
|
4425
4530
|
|
|
4426
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. */
|
|
@@ -4437,7 +4542,7 @@ export declare interface FunctionDeclaration {
|
|
|
4437
4542
|
response?: Schema;
|
|
4438
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`. */
|
|
4439
4544
|
responseJsonSchema?: unknown;
|
|
4440
|
-
/** 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. */
|
|
4441
4546
|
behavior?: Behavior;
|
|
4442
4547
|
}
|
|
4443
4548
|
|
|
@@ -4509,14 +4614,14 @@ export declare enum FunctionResponseScheduling {
|
|
|
4509
4614
|
declare type FunctionResult$ = FunctionResultDelta;
|
|
4510
4615
|
|
|
4511
4616
|
declare type FunctionResultDelta = {
|
|
4512
|
-
type: "function_result";
|
|
4513
|
-
name?: string | undefined;
|
|
4514
|
-
is_error?: boolean | undefined;
|
|
4515
4617
|
/**
|
|
4516
4618
|
* Required. ID to match the ID from the function call block.
|
|
4517
4619
|
*/
|
|
4518
4620
|
call_id: string;
|
|
4621
|
+
is_error?: boolean | undefined;
|
|
4622
|
+
name?: string | undefined;
|
|
4519
4623
|
result: FunctionResultDeltaResult | Array<FunctionResultSubcontent> | string;
|
|
4624
|
+
type: "function_result";
|
|
4520
4625
|
};
|
|
4521
4626
|
|
|
4522
4627
|
declare type FunctionResultDeltaResult = {};
|
|
@@ -4529,23 +4634,23 @@ declare type FunctionResultStep$ = FunctionResultStep;
|
|
|
4529
4634
|
* Result of a function tool call.
|
|
4530
4635
|
*/
|
|
4531
4636
|
declare type FunctionResultStep = {
|
|
4532
|
-
type: "function_result";
|
|
4533
4637
|
/**
|
|
4534
|
-
*
|
|
4638
|
+
* Required. ID to match the ID from the function call block.
|
|
4535
4639
|
*/
|
|
4536
|
-
|
|
4640
|
+
call_id: string;
|
|
4537
4641
|
/**
|
|
4538
4642
|
* Whether the tool call resulted in an error.
|
|
4539
4643
|
*/
|
|
4540
4644
|
is_error?: boolean | undefined;
|
|
4541
4645
|
/**
|
|
4542
|
-
*
|
|
4646
|
+
* The name of the tool that was called.
|
|
4543
4647
|
*/
|
|
4544
|
-
|
|
4648
|
+
name?: string | undefined;
|
|
4545
4649
|
/**
|
|
4546
4650
|
* The result of the tool call.
|
|
4547
4651
|
*/
|
|
4548
4652
|
result: FunctionResultStepResult | Array<FunctionResultSubcontent> | string;
|
|
4653
|
+
type: "function_result";
|
|
4549
4654
|
};
|
|
4550
4655
|
|
|
4551
4656
|
declare type FunctionResultStepResult = {};
|
|
@@ -4568,19 +4673,19 @@ declare type FunctionResultSubcontent = TextContent | ImageContent;
|
|
|
4568
4673
|
* A tool that can be used by the model.
|
|
4569
4674
|
*/
|
|
4570
4675
|
declare type FunctionT = {
|
|
4571
|
-
type: "function";
|
|
4572
|
-
/**
|
|
4573
|
-
* The name of the function.
|
|
4574
|
-
*/
|
|
4575
|
-
name?: string | undefined;
|
|
4576
4676
|
/**
|
|
4577
4677
|
* A description of the function.
|
|
4578
4678
|
*/
|
|
4579
4679
|
description?: string | undefined;
|
|
4680
|
+
/**
|
|
4681
|
+
* The name of the function.
|
|
4682
|
+
*/
|
|
4683
|
+
name?: string | undefined;
|
|
4580
4684
|
/**
|
|
4581
4685
|
* The JSON Schema for the function's parameters.
|
|
4582
4686
|
*/
|
|
4583
4687
|
parameters?: any | undefined;
|
|
4688
|
+
type: "function";
|
|
4584
4689
|
};
|
|
4585
4690
|
|
|
4586
4691
|
/** The Google Cloud Storage location for the input content. This data type is not supported in Gemini API. */
|
|
@@ -5287,11 +5392,11 @@ export declare interface GenerationConfig {
|
|
|
5287
5392
|
presencePenalty?: number;
|
|
5288
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. */
|
|
5289
5394
|
responseLogprobs?: boolean;
|
|
5290
|
-
/** 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. */
|
|
5291
5396
|
responseMimeType?: string;
|
|
5292
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. */
|
|
5293
5398
|
responseModalities?: Modality[];
|
|
5294
|
-
/** 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. */
|
|
5295
5400
|
responseSchema?: Schema;
|
|
5296
5401
|
/** Optional. Routing configuration. This field is not supported in Gemini API. */
|
|
5297
5402
|
routingConfig?: GenerationConfigRoutingConfig;
|
|
@@ -5311,6 +5416,10 @@ export declare interface GenerationConfig {
|
|
|
5311
5416
|
topP?: number;
|
|
5312
5417
|
/** Optional. Enables enhanced civic answers. It may not be available for all models. This field is not supported in Vertex AI. */
|
|
5313
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;
|
|
5314
5423
|
}
|
|
5315
5424
|
|
|
5316
5425
|
/**
|
|
@@ -5318,61 +5427,45 @@ export declare interface GenerationConfig {
|
|
|
5318
5427
|
*/
|
|
5319
5428
|
declare type GenerationConfig_2 = {
|
|
5320
5429
|
/**
|
|
5321
|
-
*
|
|
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.
|
|
5322
5433
|
*/
|
|
5323
|
-
|
|
5434
|
+
image_config?: ImageConfig_2 | undefined;
|
|
5324
5435
|
/**
|
|
5325
|
-
* The maximum
|
|
5436
|
+
* The maximum number of tokens to include in the response.
|
|
5326
5437
|
*/
|
|
5327
|
-
|
|
5438
|
+
max_output_tokens?: number | undefined;
|
|
5328
5439
|
/**
|
|
5329
5440
|
* Seed used in decoding for reproducibility.
|
|
5330
5441
|
*/
|
|
5331
5442
|
seed?: number | undefined;
|
|
5332
|
-
/**
|
|
5333
|
-
* A list of character sequences that will stop output interaction.
|
|
5334
|
-
*/
|
|
5335
|
-
stop_sequences?: Array<string> | undefined;
|
|
5336
|
-
thinking_level?: ThinkingLevel_2 | undefined;
|
|
5337
|
-
thinking_summaries?: ThinkingSummaries | undefined;
|
|
5338
|
-
/**
|
|
5339
|
-
* The maximum number of tokens to include in the response.
|
|
5340
|
-
*/
|
|
5341
|
-
max_output_tokens?: number | undefined;
|
|
5342
5443
|
/**
|
|
5343
5444
|
* Configuration for speech interaction.
|
|
5344
5445
|
*/
|
|
5345
5446
|
speech_config?: Array<SpeechConfig_2> | undefined;
|
|
5346
5447
|
/**
|
|
5347
|
-
*
|
|
5348
|
-
*
|
|
5349
|
-
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
5448
|
+
* A list of character sequences that will stop output interaction.
|
|
5350
5449
|
*/
|
|
5351
|
-
|
|
5450
|
+
stop_sequences?: Array<string> | undefined;
|
|
5352
5451
|
/**
|
|
5353
|
-
*
|
|
5452
|
+
* Controls the randomness of the output.
|
|
5354
5453
|
*/
|
|
5355
|
-
|
|
5454
|
+
temperature?: number | undefined;
|
|
5455
|
+
thinking_level?: ThinkingLevel_2 | undefined;
|
|
5456
|
+
thinking_summaries?: ThinkingSummaries | undefined;
|
|
5356
5457
|
/**
|
|
5357
|
-
*
|
|
5358
|
-
*
|
|
5359
|
-
* @remarks
|
|
5360
|
-
* text. A positive value encourages the model to generate more diverse and
|
|
5361
|
-
* less repetitive text. Valid values can range from [-2.0, 2.0].
|
|
5458
|
+
* The tool choice configuration.
|
|
5362
5459
|
*/
|
|
5363
|
-
|
|
5460
|
+
tool_choice?: ToolChoiceType | ToolChoiceConfig | undefined;
|
|
5364
5461
|
/**
|
|
5365
|
-
*
|
|
5366
|
-
*
|
|
5367
|
-
* @remarks
|
|
5368
|
-
* A positive value helps to reduce the repetition of words and phrases.
|
|
5369
|
-
* Valid values can range from [-2.0, 2.0].
|
|
5462
|
+
* The maximum cumulative probability of tokens to consider when sampling.
|
|
5370
5463
|
*/
|
|
5371
|
-
|
|
5464
|
+
top_p?: number | undefined;
|
|
5372
5465
|
/**
|
|
5373
|
-
*
|
|
5466
|
+
* Configuration options for video generation.
|
|
5374
5467
|
*/
|
|
5375
|
-
|
|
5468
|
+
video_config?: VideoConfig | undefined;
|
|
5376
5469
|
};
|
|
5377
5470
|
|
|
5378
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. */
|
|
@@ -5835,7 +5928,6 @@ export declare interface GoogleMaps {
|
|
|
5835
5928
|
* A tool that can be used by the model to call Google Maps.
|
|
5836
5929
|
*/
|
|
5837
5930
|
declare type GoogleMaps_2 = {
|
|
5838
|
-
type: "google_maps";
|
|
5839
5931
|
/**
|
|
5840
5932
|
* Whether to return a widget context token in the tool call result of the
|
|
5841
5933
|
*
|
|
@@ -5851,6 +5943,7 @@ declare type GoogleMaps_2 = {
|
|
|
5851
5943
|
* The longitude of the user's location.
|
|
5852
5944
|
*/
|
|
5853
5945
|
longitude?: number | undefined;
|
|
5946
|
+
type: "google_maps";
|
|
5854
5947
|
};
|
|
5855
5948
|
|
|
5856
5949
|
declare type GoogleMapsCall$ = GoogleMapsCallDelta;
|
|
@@ -5875,7 +5968,6 @@ declare type GoogleMapsCallArguments = {
|
|
|
5875
5968
|
};
|
|
5876
5969
|
|
|
5877
5970
|
declare type GoogleMapsCallDelta = {
|
|
5878
|
-
type: "google_maps_call";
|
|
5879
5971
|
/**
|
|
5880
5972
|
* The arguments to pass to the Google Maps tool.
|
|
5881
5973
|
*/
|
|
@@ -5884,6 +5976,7 @@ declare type GoogleMapsCallDelta = {
|
|
|
5884
5976
|
* A signature hash for backend validation.
|
|
5885
5977
|
*/
|
|
5886
5978
|
signature?: string | undefined;
|
|
5979
|
+
type: "google_maps_call";
|
|
5887
5980
|
};
|
|
5888
5981
|
|
|
5889
5982
|
declare type GoogleMapsCallStep$ = GoogleMapsCallStep;
|
|
@@ -5892,7 +5985,6 @@ declare type GoogleMapsCallStep$ = GoogleMapsCallStep;
|
|
|
5892
5985
|
* Google Maps call step.
|
|
5893
5986
|
*/
|
|
5894
5987
|
declare type GoogleMapsCallStep = {
|
|
5895
|
-
type: "google_maps_call";
|
|
5896
5988
|
/**
|
|
5897
5989
|
* The arguments to pass to the Google Maps tool.
|
|
5898
5990
|
*/
|
|
@@ -5905,6 +5997,7 @@ declare type GoogleMapsCallStep = {
|
|
|
5905
5997
|
* A signature hash for backend validation.
|
|
5906
5998
|
*/
|
|
5907
5999
|
signature?: string | undefined;
|
|
6000
|
+
type: "google_maps_call";
|
|
5908
6001
|
};
|
|
5909
6002
|
|
|
5910
6003
|
declare type GoogleMapsResult$ = GoogleMapsResult;
|
|
@@ -5920,7 +6013,6 @@ declare type GoogleMapsResult = {
|
|
|
5920
6013
|
};
|
|
5921
6014
|
|
|
5922
6015
|
declare type GoogleMapsResultDelta = {
|
|
5923
|
-
type: "google_maps_result";
|
|
5924
6016
|
/**
|
|
5925
6017
|
* The results of the Google Maps.
|
|
5926
6018
|
*/
|
|
@@ -5929,13 +6021,14 @@ declare type GoogleMapsResultDelta = {
|
|
|
5929
6021
|
* A signature hash for backend validation.
|
|
5930
6022
|
*/
|
|
5931
6023
|
signature?: string | undefined;
|
|
6024
|
+
type: "google_maps_result";
|
|
5932
6025
|
};
|
|
5933
6026
|
|
|
5934
6027
|
declare type GoogleMapsResultPlaces = {
|
|
5935
|
-
place_id?: string | undefined;
|
|
5936
6028
|
name?: string | undefined;
|
|
5937
|
-
|
|
6029
|
+
place_id?: string | undefined;
|
|
5938
6030
|
review_snippets?: Array<ReviewSnippet> | undefined;
|
|
6031
|
+
url?: string | undefined;
|
|
5939
6032
|
};
|
|
5940
6033
|
|
|
5941
6034
|
declare type GoogleMapsResultStep$ = GoogleMapsResultStep;
|
|
@@ -5944,16 +6037,16 @@ declare type GoogleMapsResultStep$ = GoogleMapsResultStep;
|
|
|
5944
6037
|
* Google Maps result step.
|
|
5945
6038
|
*/
|
|
5946
6039
|
declare type GoogleMapsResultStep = {
|
|
5947
|
-
type: "google_maps_result";
|
|
5948
|
-
result: Array<GoogleMapsResult>;
|
|
5949
6040
|
/**
|
|
5950
6041
|
* Required. ID to match the ID from the function call block.
|
|
5951
6042
|
*/
|
|
5952
6043
|
call_id: string;
|
|
6044
|
+
result: Array<GoogleMapsResult>;
|
|
5953
6045
|
/**
|
|
5954
6046
|
* A signature hash for backend validation.
|
|
5955
6047
|
*/
|
|
5956
6048
|
signature?: string | undefined;
|
|
6049
|
+
type: "google_maps_result";
|
|
5957
6050
|
};
|
|
5958
6051
|
|
|
5959
6052
|
/** 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. */
|
|
@@ -5984,11 +6077,11 @@ export declare interface GoogleSearch {
|
|
|
5984
6077
|
* A tool that can be used by the model to search Google.
|
|
5985
6078
|
*/
|
|
5986
6079
|
declare type GoogleSearch_2 = {
|
|
5987
|
-
type: "google_search";
|
|
5988
6080
|
/**
|
|
5989
6081
|
* The types of search grounding to enable.
|
|
5990
6082
|
*/
|
|
5991
6083
|
search_types?: Array<GoogleSearchSearchType> | undefined;
|
|
6084
|
+
type: "google_search";
|
|
5992
6085
|
};
|
|
5993
6086
|
|
|
5994
6087
|
declare type GoogleSearchCall$ = GoogleSearchCallDelta;
|
|
@@ -6013,7 +6106,6 @@ declare type GoogleSearchCallArguments = {
|
|
|
6013
6106
|
};
|
|
6014
6107
|
|
|
6015
6108
|
declare type GoogleSearchCallDelta = {
|
|
6016
|
-
type: "google_search_call";
|
|
6017
6109
|
/**
|
|
6018
6110
|
* The arguments to pass to Google Search.
|
|
6019
6111
|
*/
|
|
@@ -6022,6 +6114,7 @@ declare type GoogleSearchCallDelta = {
|
|
|
6022
6114
|
* A signature hash for backend validation.
|
|
6023
6115
|
*/
|
|
6024
6116
|
signature?: string | undefined;
|
|
6117
|
+
type: "google_search_call";
|
|
6025
6118
|
};
|
|
6026
6119
|
|
|
6027
6120
|
declare type GoogleSearchCallStep$ = GoogleSearchCallStep;
|
|
@@ -6030,23 +6123,23 @@ declare type GoogleSearchCallStep$ = GoogleSearchCallStep;
|
|
|
6030
6123
|
* Google Search call step.
|
|
6031
6124
|
*/
|
|
6032
6125
|
declare type GoogleSearchCallStep = {
|
|
6033
|
-
type: "google_search_call";
|
|
6034
6126
|
/**
|
|
6035
6127
|
* The arguments to pass to Google Search.
|
|
6036
6128
|
*/
|
|
6037
6129
|
arguments: GoogleSearchCallArguments;
|
|
6038
|
-
/**
|
|
6039
|
-
* The type of search grounding enabled.
|
|
6040
|
-
*/
|
|
6041
|
-
search_type?: GoogleSearchCallStepSearchType | undefined;
|
|
6042
6130
|
/**
|
|
6043
6131
|
* Required. A unique ID for this specific tool call.
|
|
6044
6132
|
*/
|
|
6045
6133
|
id: string;
|
|
6134
|
+
/**
|
|
6135
|
+
* The type of search grounding enabled.
|
|
6136
|
+
*/
|
|
6137
|
+
search_type?: GoogleSearchCallStepSearchType | undefined;
|
|
6046
6138
|
/**
|
|
6047
6139
|
* A signature hash for backend validation.
|
|
6048
6140
|
*/
|
|
6049
6141
|
signature?: string | undefined;
|
|
6142
|
+
type: "google_search_call";
|
|
6050
6143
|
};
|
|
6051
6144
|
|
|
6052
6145
|
/**
|
|
@@ -6076,13 +6169,13 @@ declare type GoogleSearchResult = {
|
|
|
6076
6169
|
};
|
|
6077
6170
|
|
|
6078
6171
|
declare type GoogleSearchResultDelta = {
|
|
6079
|
-
type: "google_search_result";
|
|
6080
|
-
result: Array<GoogleSearchResult>;
|
|
6081
6172
|
is_error?: boolean | undefined;
|
|
6173
|
+
result: Array<GoogleSearchResult>;
|
|
6082
6174
|
/**
|
|
6083
6175
|
* A signature hash for backend validation.
|
|
6084
6176
|
*/
|
|
6085
6177
|
signature?: string | undefined;
|
|
6178
|
+
type: "google_search_result";
|
|
6086
6179
|
};
|
|
6087
6180
|
|
|
6088
6181
|
declare type GoogleSearchResultStep$ = GoogleSearchResultStep;
|
|
@@ -6091,23 +6184,23 @@ declare type GoogleSearchResultStep$ = GoogleSearchResultStep;
|
|
|
6091
6184
|
* Google Search result step.
|
|
6092
6185
|
*/
|
|
6093
6186
|
declare type GoogleSearchResultStep = {
|
|
6094
|
-
type: "google_search_result";
|
|
6095
6187
|
/**
|
|
6096
|
-
* Required.
|
|
6188
|
+
* Required. ID to match the ID from the function call block.
|
|
6097
6189
|
*/
|
|
6098
|
-
|
|
6190
|
+
call_id: string;
|
|
6099
6191
|
/**
|
|
6100
6192
|
* Whether the Google Search resulted in an error.
|
|
6101
6193
|
*/
|
|
6102
6194
|
is_error?: boolean | undefined;
|
|
6103
6195
|
/**
|
|
6104
|
-
* Required.
|
|
6196
|
+
* Required. The results of the Google Search.
|
|
6105
6197
|
*/
|
|
6106
|
-
|
|
6198
|
+
result: Array<GoogleSearchResult>;
|
|
6107
6199
|
/**
|
|
6108
6200
|
* A signature hash for backend validation.
|
|
6109
6201
|
*/
|
|
6110
6202
|
signature?: string | undefined;
|
|
6203
|
+
type: "google_search_result";
|
|
6111
6204
|
};
|
|
6112
6205
|
|
|
6113
6206
|
/** Tool to retrieve public web data for grounding, powered by Google. */
|
|
@@ -6310,7 +6403,7 @@ export declare interface GroundingMetadata {
|
|
|
6310
6403
|
searchEntryPoint?: SearchEntryPoint;
|
|
6311
6404
|
/** Web search queries for the following-up web search. */
|
|
6312
6405
|
webSearchQueries?: string[];
|
|
6313
|
-
/** 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. */
|
|
6406
|
+
/** 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. */
|
|
6314
6407
|
googleMapsWidgetContextToken?: string;
|
|
6315
6408
|
/** 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. */
|
|
6316
6409
|
retrievalQueries?: string[];
|
|
@@ -6350,14 +6443,14 @@ declare type GroundingToolCount$ = GroundingToolCount;
|
|
|
6350
6443
|
* The number of grounding tool counts.
|
|
6351
6444
|
*/
|
|
6352
6445
|
declare type GroundingToolCount = {
|
|
6353
|
-
/**
|
|
6354
|
-
* The grounding tool type associated with the count.
|
|
6355
|
-
*/
|
|
6356
|
-
type?: GroundingToolCountType | undefined;
|
|
6357
6446
|
/**
|
|
6358
6447
|
* The number of grounding tool counts.
|
|
6359
6448
|
*/
|
|
6360
6449
|
count?: number | undefined;
|
|
6450
|
+
/**
|
|
6451
|
+
* The grounding tool type associated with the count.
|
|
6452
|
+
*/
|
|
6453
|
+
type?: GroundingToolCountType | undefined;
|
|
6361
6454
|
};
|
|
6362
6455
|
|
|
6363
6456
|
/**
|
|
@@ -6416,6 +6509,8 @@ export declare enum HarmBlockThreshold {
|
|
|
6416
6509
|
OFF = "OFF"
|
|
6417
6510
|
}
|
|
6418
6511
|
|
|
6512
|
+
declare type HarmCategory$ = HarmCategory_2;
|
|
6513
|
+
|
|
6419
6514
|
/** The harm category to be blocked. */
|
|
6420
6515
|
export declare enum HarmCategory {
|
|
6421
6516
|
/**
|
|
@@ -6464,6 +6559,15 @@ export declare enum HarmCategory {
|
|
|
6464
6559
|
HARM_CATEGORY_JAILBREAK = "HARM_CATEGORY_JAILBREAK"
|
|
6465
6560
|
}
|
|
6466
6561
|
|
|
6562
|
+
/**
|
|
6563
|
+
* @license
|
|
6564
|
+
* Copyright 2026 Google LLC
|
|
6565
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6566
|
+
*
|
|
6567
|
+
* g3-prettier-ignore-file
|
|
6568
|
+
*/
|
|
6569
|
+
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 & {});
|
|
6570
|
+
|
|
6467
6571
|
/** Output only. The probability of harm for this category. */
|
|
6468
6572
|
export declare enum HarmProbability {
|
|
6469
6573
|
/**
|
|
@@ -6723,20 +6827,20 @@ declare type ImageContent$ = ImageContent;
|
|
|
6723
6827
|
* An image content block.
|
|
6724
6828
|
*/
|
|
6725
6829
|
declare type ImageContent = {
|
|
6726
|
-
type: "image";
|
|
6727
6830
|
/**
|
|
6728
6831
|
* The image content.
|
|
6729
6832
|
*/
|
|
6730
6833
|
data?: string | undefined;
|
|
6731
|
-
/**
|
|
6732
|
-
* The URI of the image.
|
|
6733
|
-
*/
|
|
6734
|
-
uri?: string | undefined;
|
|
6735
6834
|
/**
|
|
6736
6835
|
* The mime type of the image.
|
|
6737
6836
|
*/
|
|
6738
6837
|
mime_type?: ImageContentMimeType | undefined;
|
|
6739
6838
|
resolution?: MediaResolution_2 | undefined;
|
|
6839
|
+
type: "image";
|
|
6840
|
+
/**
|
|
6841
|
+
* The URI of the image.
|
|
6842
|
+
*/
|
|
6843
|
+
uri?: string | undefined;
|
|
6740
6844
|
};
|
|
6741
6845
|
|
|
6742
6846
|
/**
|
|
@@ -6745,11 +6849,11 @@ declare type ImageContent = {
|
|
|
6745
6849
|
declare type ImageContentMimeType = "image/png" | "image/jpeg" | "image/webp" | "image/heic" | "image/heif" | "image/gif" | "image/bmp" | "image/tiff" | (string & {});
|
|
6746
6850
|
|
|
6747
6851
|
declare type ImageDelta = {
|
|
6748
|
-
type: "image";
|
|
6749
6852
|
data?: string | undefined;
|
|
6750
|
-
uri?: string | undefined;
|
|
6751
6853
|
mime_type?: ImageDeltaMimeType | undefined;
|
|
6752
6854
|
resolution?: MediaResolution_2 | undefined;
|
|
6855
|
+
type: "image";
|
|
6856
|
+
uri?: string | undefined;
|
|
6753
6857
|
};
|
|
6754
6858
|
|
|
6755
6859
|
declare type ImageDeltaMimeType = "image/png" | "image/jpeg" | "image/webp" | "image/heic" | "image/heif" | "image/gif" | "image/bmp" | "image/tiff" | (string & {});
|
|
@@ -6804,31 +6908,50 @@ export declare enum ImageResizeMode {
|
|
|
6804
6908
|
PAD = "PAD"
|
|
6805
6909
|
}
|
|
6806
6910
|
|
|
6807
|
-
declare type ImageResponseFormat$ =
|
|
6911
|
+
declare type ImageResponseFormat$ = ImageResponseFormat_2;
|
|
6912
|
+
|
|
6913
|
+
/** Configuration for image-specific output formatting. */
|
|
6914
|
+
export declare class ImageResponseFormat {
|
|
6915
|
+
/** Optional. The aspect ratio for the image output. */
|
|
6916
|
+
aspectRatio?: AspectRatio;
|
|
6917
|
+
/** Optional. Delivery mode for the generated content. */
|
|
6918
|
+
delivery?: Delivery;
|
|
6919
|
+
/** Optional. The size of the image output. */
|
|
6920
|
+
imageSize?: ImageSize;
|
|
6921
|
+
/** Optional. The MIME type of the image output. */
|
|
6922
|
+
mimeType?: string;
|
|
6923
|
+
}
|
|
6808
6924
|
|
|
6809
6925
|
/**
|
|
6810
6926
|
* Configuration for image output format.
|
|
6811
6927
|
*/
|
|
6812
|
-
declare type
|
|
6813
|
-
type: "image";
|
|
6928
|
+
declare type ImageResponseFormat_2 = {
|
|
6814
6929
|
/**
|
|
6815
|
-
* The
|
|
6930
|
+
* The aspect ratio for the image output.
|
|
6816
6931
|
*/
|
|
6817
|
-
|
|
6932
|
+
aspect_ratio?: ImageResponseFormatAspectRatio | undefined;
|
|
6818
6933
|
/**
|
|
6819
6934
|
* The delivery mode for the image output.
|
|
6820
6935
|
*/
|
|
6821
6936
|
delivery?: ImageResponseFormatDelivery | undefined;
|
|
6822
|
-
/**
|
|
6823
|
-
* The aspect ratio for the image output.
|
|
6824
|
-
*/
|
|
6825
|
-
aspect_ratio?: ImageResponseFormatAspectRatio | undefined;
|
|
6826
6937
|
/**
|
|
6827
6938
|
* The size of the image output.
|
|
6828
6939
|
*/
|
|
6829
6940
|
image_size?: ImageResponseFormatImageSize | undefined;
|
|
6941
|
+
/**
|
|
6942
|
+
* The MIME type of the image output.
|
|
6943
|
+
*/
|
|
6944
|
+
mime_type?: ImageResponseFormatMimeType | undefined;
|
|
6945
|
+
type: "image";
|
|
6830
6946
|
};
|
|
6831
6947
|
|
|
6948
|
+
/**
|
|
6949
|
+
* @license
|
|
6950
|
+
* Copyright 2026 Google LLC
|
|
6951
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6952
|
+
*
|
|
6953
|
+
* g3-prettier-ignore-file
|
|
6954
|
+
*/
|
|
6832
6955
|
/**
|
|
6833
6956
|
* The aspect ratio for the image output.
|
|
6834
6957
|
*/
|
|
@@ -6844,13 +6967,6 @@ declare type ImageResponseFormatDelivery = "inline" | "uri" | (string & {});
|
|
|
6844
6967
|
*/
|
|
6845
6968
|
declare type ImageResponseFormatImageSize = "512" | "1K" | "2K" | "4K" | (string & {});
|
|
6846
6969
|
|
|
6847
|
-
/**
|
|
6848
|
-
* @license
|
|
6849
|
-
* Copyright 2026 Google LLC
|
|
6850
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
6851
|
-
*
|
|
6852
|
-
* g3-prettier-ignore-file
|
|
6853
|
-
*/
|
|
6854
6970
|
/**
|
|
6855
6971
|
* The MIME type of the image output.
|
|
6856
6972
|
*/
|
|
@@ -6860,15 +6976,39 @@ declare type ImageResponseFormatMimeType = "image/jpeg";
|
|
|
6860
6976
|
export declare interface ImageSearch {
|
|
6861
6977
|
}
|
|
6862
6978
|
|
|
6863
|
-
/**
|
|
6864
|
-
export declare
|
|
6865
|
-
/**
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6979
|
+
/** The size of the image output. */
|
|
6980
|
+
export declare enum ImageSize {
|
|
6981
|
+
/**
|
|
6982
|
+
* Default value. This value is unused.
|
|
6983
|
+
*/
|
|
6984
|
+
IMAGE_SIZE_UNSPECIFIED = "IMAGE_SIZE_UNSPECIFIED",
|
|
6985
|
+
/**
|
|
6986
|
+
* 512px image size.
|
|
6987
|
+
*/
|
|
6988
|
+
IMAGE_SIZE_FIVE_TWELVE = "IMAGE_SIZE_FIVE_TWELVE",
|
|
6989
|
+
/**
|
|
6990
|
+
* 1K image size.
|
|
6991
|
+
*/
|
|
6992
|
+
IMAGE_SIZE_ONE_K = "IMAGE_SIZE_ONE_K",
|
|
6993
|
+
/**
|
|
6994
|
+
* 2K image size.
|
|
6995
|
+
*/
|
|
6996
|
+
IMAGE_SIZE_TWO_K = "IMAGE_SIZE_TWO_K",
|
|
6997
|
+
/**
|
|
6998
|
+
* 4K image size.
|
|
6999
|
+
*/
|
|
7000
|
+
IMAGE_SIZE_FOUR_K = "IMAGE_SIZE_FOUR_K"
|
|
7001
|
+
}
|
|
7002
|
+
|
|
7003
|
+
/** Optional parameters for importing a file. */
|
|
7004
|
+
export declare interface ImportFileConfig {
|
|
7005
|
+
/** Used to override HTTP request options. */
|
|
7006
|
+
httpOptions?: HttpOptions;
|
|
7007
|
+
/** Abort signal which can be used to cancel the request.
|
|
7008
|
+
|
|
7009
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
7010
|
+
operation will not cancel the request in the service. You will still
|
|
7011
|
+
be charged usage for any applicable operations.
|
|
6872
7012
|
*/
|
|
6873
7013
|
abortSignal?: AbortSignal;
|
|
6874
7014
|
/** User provided custom metadata stored as key-value pairs used for querying. */
|
|
@@ -7037,7 +7177,7 @@ declare type Interaction = {
|
|
|
7037
7177
|
/**
|
|
7038
7178
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
7039
7179
|
*/
|
|
7040
|
-
response_format?: Array<
|
|
7180
|
+
response_format?: Array<ResponseFormat_2> | ResponseFormat_2 | undefined;
|
|
7041
7181
|
/**
|
|
7042
7182
|
* The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
|
|
7043
7183
|
*/
|
|
@@ -7060,6 +7200,16 @@ declare type Interaction = {
|
|
|
7060
7200
|
* Configuration parameters for the agent interaction.
|
|
7061
7201
|
*/
|
|
7062
7202
|
agent_config?: DynamicAgentConfig | DeepResearchAgentConfig | undefined;
|
|
7203
|
+
/**
|
|
7204
|
+
* Safety settings for the interaction.
|
|
7205
|
+
*/
|
|
7206
|
+
safety_settings?: Array<SafetySetting_2> | undefined;
|
|
7207
|
+
/**
|
|
7208
|
+
* The labels with user-defined metadata for the request.
|
|
7209
|
+
*/
|
|
7210
|
+
labels?: {
|
|
7211
|
+
[k: string]: string;
|
|
7212
|
+
} | undefined;
|
|
7063
7213
|
/**
|
|
7064
7214
|
* The input for the interaction.
|
|
7065
7215
|
*/
|
|
@@ -7173,7 +7323,7 @@ declare type InteractionGetParamsStreaming = GetInteractionByIdParamsStreaming;
|
|
|
7173
7323
|
/**
|
|
7174
7324
|
* Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
|
|
7175
7325
|
*/
|
|
7176
|
-
declare type InteractionResponseFormat = Array<
|
|
7326
|
+
declare type InteractionResponseFormat = Array<ResponseFormat_2> | ResponseFormat_2;
|
|
7177
7327
|
|
|
7178
7328
|
export declare namespace Interactions {
|
|
7179
7329
|
export type AllowedTools = AllowedTools$;
|
|
@@ -7216,6 +7366,7 @@ export declare namespace Interactions {
|
|
|
7216
7366
|
export type GoogleSearchResult = GoogleSearchResult$;
|
|
7217
7367
|
export interface GoogleSearchResultStep extends GoogleSearchResultStep$ {
|
|
7218
7368
|
}
|
|
7369
|
+
export type HarmCategory = HarmCategory$;
|
|
7219
7370
|
export type ImageConfig = ImageConfig$;
|
|
7220
7371
|
export type ImageContent = ImageContent$;
|
|
7221
7372
|
export type ImageResponseFormat = ImageResponseFormat$;
|
|
@@ -7241,6 +7392,11 @@ export declare namespace Interactions {
|
|
|
7241
7392
|
}
|
|
7242
7393
|
export interface PlaceCitation extends PlaceCitation$ {
|
|
7243
7394
|
}
|
|
7395
|
+
export type RetrievalCallArguments = RetrievalCallArguments$;
|
|
7396
|
+
export interface RetrievalCallDelta extends RetrievalCallDelta$ {
|
|
7397
|
+
}
|
|
7398
|
+
export type RetrievalResultDelta = RetrievalResultDelta$;
|
|
7399
|
+
export type SafetySetting = SafetySetting$;
|
|
7244
7400
|
export type SpeechConfig = SpeechConfig$;
|
|
7245
7401
|
export type Step = Step$;
|
|
7246
7402
|
export interface StepDelta extends StepDelta$ {
|
|
@@ -7274,12 +7430,8 @@ export declare namespace Interactions {
|
|
|
7274
7430
|
export type Arguments = Arguments$;
|
|
7275
7431
|
}
|
|
7276
7432
|
export namespace Environment {
|
|
7277
|
-
export
|
|
7278
|
-
}
|
|
7433
|
+
export type Allowlist = Allowlist$;
|
|
7279
7434
|
export type Source = Source$;
|
|
7280
|
-
export namespace Allowlist {
|
|
7281
|
-
export type Allowlist = Allowlist$2;
|
|
7282
|
-
}
|
|
7283
7435
|
}
|
|
7284
7436
|
export namespace ErrorEvent {
|
|
7285
7437
|
export type Error = Error$;
|
|
@@ -7331,6 +7483,9 @@ export declare namespace Interactions {
|
|
|
7331
7483
|
export namespace PlaceCitation {
|
|
7332
7484
|
export type ReviewSnippet = ReviewSnippet$3;
|
|
7333
7485
|
}
|
|
7486
|
+
export namespace RetrievalCallDelta {
|
|
7487
|
+
export type Arguments = Arguments$4;
|
|
7488
|
+
}
|
|
7334
7489
|
export namespace StepDelta {
|
|
7335
7490
|
export type ArgumentsDelta = ArgumentsDelta$;
|
|
7336
7491
|
export type Audio = Audio$;
|
|
@@ -7377,7 +7532,7 @@ export declare namespace Interactions {
|
|
|
7377
7532
|
}
|
|
7378
7533
|
}
|
|
7379
7534
|
export namespace URLContextCallStep {
|
|
7380
|
-
export type Arguments = Arguments$
|
|
7535
|
+
export type Arguments = Arguments$5;
|
|
7381
7536
|
}
|
|
7382
7537
|
export namespace URLContextResultStep {
|
|
7383
7538
|
export type Result = Result$3;
|
|
@@ -7395,6 +7550,7 @@ declare namespace interactions {
|
|
|
7395
7550
|
export {
|
|
7396
7551
|
AgentOption,
|
|
7397
7552
|
AllowedTools,
|
|
7553
|
+
Transform,
|
|
7398
7554
|
AllowlistEntry,
|
|
7399
7555
|
Annotation,
|
|
7400
7556
|
ArgumentsDelta,
|
|
@@ -7402,9 +7558,9 @@ declare namespace interactions {
|
|
|
7402
7558
|
AudioContent,
|
|
7403
7559
|
AudioDeltaMimeType,
|
|
7404
7560
|
AudioDelta,
|
|
7405
|
-
AudioResponseFormatMimeType,
|
|
7406
7561
|
AudioResponseFormatDelivery,
|
|
7407
|
-
|
|
7562
|
+
AudioResponseFormatMimeType,
|
|
7563
|
+
AudioResponseFormat_2 as AudioResponseFormat,
|
|
7408
7564
|
Language_2 as Language,
|
|
7409
7565
|
CodeExecutionCallArguments,
|
|
7410
7566
|
CodeExecutionCallDelta,
|
|
@@ -7412,8 +7568,8 @@ declare namespace interactions {
|
|
|
7412
7568
|
CodeExecutionResultDelta,
|
|
7413
7569
|
CodeExecutionResultStep,
|
|
7414
7570
|
CodeExecution,
|
|
7415
|
-
EnvironmentEnum,
|
|
7416
7571
|
DisabledSafetyPolicy,
|
|
7572
|
+
EnvironmentEnum,
|
|
7417
7573
|
ComputerUse_2 as ComputerUse,
|
|
7418
7574
|
Content_2 as Content,
|
|
7419
7575
|
CreateAgentInteractionResponseFormat,
|
|
@@ -7478,6 +7634,7 @@ declare namespace interactions {
|
|
|
7478
7634
|
GoogleSearch_2 as GoogleSearch,
|
|
7479
7635
|
GroundingToolCountType,
|
|
7480
7636
|
GroundingToolCount,
|
|
7637
|
+
HarmCategory_2 as HarmCategory,
|
|
7481
7638
|
HybridSearch,
|
|
7482
7639
|
ImageConfigAspectRatio,
|
|
7483
7640
|
ImageConfigImageSize,
|
|
@@ -7486,11 +7643,11 @@ declare namespace interactions {
|
|
|
7486
7643
|
ImageContent,
|
|
7487
7644
|
ImageDeltaMimeType,
|
|
7488
7645
|
ImageDelta,
|
|
7489
|
-
ImageResponseFormatMimeType,
|
|
7490
|
-
ImageResponseFormatDelivery,
|
|
7491
7646
|
ImageResponseFormatAspectRatio,
|
|
7647
|
+
ImageResponseFormatDelivery,
|
|
7492
7648
|
ImageResponseFormatImageSize,
|
|
7493
|
-
|
|
7649
|
+
ImageResponseFormatMimeType,
|
|
7650
|
+
ImageResponseFormat_2 as ImageResponseFormat,
|
|
7494
7651
|
InteractionCompletedEvent,
|
|
7495
7652
|
InteractionCreatedEvent,
|
|
7496
7653
|
InteractionSseEventInteractionStatus,
|
|
@@ -7524,11 +7681,18 @@ declare namespace interactions {
|
|
|
7524
7681
|
RagRetrievalConfig_2 as RagRetrievalConfig,
|
|
7525
7682
|
RagStoreConfig,
|
|
7526
7683
|
Ranking,
|
|
7527
|
-
ResponseFormat,
|
|
7684
|
+
ResponseFormat_2 as ResponseFormat,
|
|
7528
7685
|
ResponseModality,
|
|
7529
|
-
|
|
7686
|
+
RetrievalCallArguments,
|
|
7687
|
+
RetrievalCallDeltaRetrievalType,
|
|
7688
|
+
RetrievalCallDelta,
|
|
7689
|
+
RetrievalResultDelta,
|
|
7690
|
+
RetrievalRetrievalType,
|
|
7530
7691
|
Retrieval_2 as Retrieval,
|
|
7531
7692
|
ReviewSnippet,
|
|
7693
|
+
Method,
|
|
7694
|
+
Threshold,
|
|
7695
|
+
SafetySetting_2 as SafetySetting,
|
|
7532
7696
|
ServiceTier_2 as ServiceTier,
|
|
7533
7697
|
SourceType,
|
|
7534
7698
|
Source,
|
|
@@ -7545,7 +7709,7 @@ declare namespace interactions {
|
|
|
7545
7709
|
TextContent,
|
|
7546
7710
|
TextDelta,
|
|
7547
7711
|
TextResponseFormatMimeType,
|
|
7548
|
-
TextResponseFormat,
|
|
7712
|
+
TextResponseFormat_2 as TextResponseFormat,
|
|
7549
7713
|
ThinkingLevel_2 as ThinkingLevel,
|
|
7550
7714
|
ThinkingSummaries,
|
|
7551
7715
|
ThoughtSignatureDelta,
|
|
@@ -7560,7 +7724,6 @@ declare namespace interactions {
|
|
|
7560
7724
|
URLCitation,
|
|
7561
7725
|
URLContextCallArguments,
|
|
7562
7726
|
URLContextCallDelta,
|
|
7563
|
-
Arguments,
|
|
7564
7727
|
URLContextCallStep,
|
|
7565
7728
|
URLContextResultDelta,
|
|
7566
7729
|
URLContextResultStep,
|
|
@@ -7576,9 +7739,9 @@ declare namespace interactions {
|
|
|
7576
7739
|
VideoContent,
|
|
7577
7740
|
VideoDeltaMimeType,
|
|
7578
7741
|
VideoDelta,
|
|
7579
|
-
VideoResponseFormatDelivery,
|
|
7580
7742
|
VideoResponseFormatAspectRatio,
|
|
7581
|
-
|
|
7743
|
+
VideoResponseFormatDelivery,
|
|
7744
|
+
VideoResponseFormat_2 as VideoResponseFormat,
|
|
7582
7745
|
WebhookConfig_2 as WebhookConfig
|
|
7583
7746
|
}
|
|
7584
7747
|
}
|
|
@@ -7656,9 +7819,6 @@ declare type InteractionStatus = "in_progress" | "requires_action" | "completed"
|
|
|
7656
7819
|
declare type InteractionStatusUpdate$ = InteractionStatusUpdate;
|
|
7657
7820
|
|
|
7658
7821
|
declare type InteractionStatusUpdate = {
|
|
7659
|
-
event_type: "interaction.status_update";
|
|
7660
|
-
interaction_id: string;
|
|
7661
|
-
status: InteractionStatusUpdateStatus;
|
|
7662
7822
|
/**
|
|
7663
7823
|
* The event_id token to be used to resume the interaction stream, from
|
|
7664
7824
|
*
|
|
@@ -7666,7 +7826,10 @@ declare type InteractionStatusUpdate = {
|
|
|
7666
7826
|
* this event.
|
|
7667
7827
|
*/
|
|
7668
7828
|
event_id?: string | undefined;
|
|
7829
|
+
event_type: "interaction.status_update";
|
|
7830
|
+
interaction_id: string;
|
|
7669
7831
|
metadata?: StreamMetadata | undefined;
|
|
7832
|
+
status: InteractionStatusUpdateStatus;
|
|
7670
7833
|
};
|
|
7671
7834
|
|
|
7672
7835
|
declare type InteractionStatusUpdateStatus = "in_progress" | "requires_action" | "completed" | "failed" | "cancelled" | "incomplete" | "budget_exceeded" | (string & {});
|
|
@@ -8815,6 +8978,11 @@ export declare interface LiveServerSessionResumptionUpdate {
|
|
|
8815
8978
|
export declare interface LiveServerSetupComplete {
|
|
8816
8979
|
/** The session id of the live session. */
|
|
8817
8980
|
sessionId?: string;
|
|
8981
|
+
/** Signature of the verified consent audio. This is populated when the
|
|
8982
|
+
request has a ReplicatedVoiceConfig with consent_audio set, if the consent
|
|
8983
|
+
verification was successful. This may be used in a subsequent request
|
|
8984
|
+
instead of the consent_audio to verify the same consent. */
|
|
8985
|
+
voiceConsentSignature?: VoiceConsentSignature;
|
|
8818
8986
|
}
|
|
8819
8987
|
|
|
8820
8988
|
/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */
|
|
@@ -8903,22 +9071,22 @@ export declare enum MaskReferenceMode {
|
|
|
8903
9071
|
MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
|
|
8904
9072
|
}
|
|
8905
9073
|
|
|
8906
|
-
/** Match operation to use for
|
|
9074
|
+
/** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
|
|
8907
9075
|
export declare enum MatchOperation {
|
|
8908
9076
|
/**
|
|
8909
|
-
* Default value.
|
|
9077
|
+
* Default value. A user error will be returned if not set.
|
|
8910
9078
|
*/
|
|
8911
9079
|
MATCH_OPERATION_UNSPECIFIED = "MATCH_OPERATION_UNSPECIFIED",
|
|
8912
9080
|
/**
|
|
8913
|
-
* Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
|
|
9081
|
+
* Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
|
|
8914
9082
|
*/
|
|
8915
9083
|
REGEX_CONTAINS = "REGEX_CONTAINS",
|
|
8916
9084
|
/**
|
|
8917
|
-
* `
|
|
9085
|
+
* The match operation returns `true` if expression is a substring of the target.
|
|
8918
9086
|
*/
|
|
8919
9087
|
PARTIAL_MATCH = "PARTIAL_MATCH",
|
|
8920
9088
|
/**
|
|
8921
|
-
* `
|
|
9089
|
+
* The match operation returns `true` expression is an exact match of the target.
|
|
8922
9090
|
*/
|
|
8923
9091
|
EXACT_MATCH = "EXACT_MATCH"
|
|
8924
9092
|
}
|
|
@@ -8929,11 +9097,21 @@ declare type MCPServer$ = MCPServer;
|
|
|
8929
9097
|
* A MCPServer is a server that can be called by the model to perform actions.
|
|
8930
9098
|
*/
|
|
8931
9099
|
declare type MCPServer = {
|
|
8932
|
-
|
|
9100
|
+
/**
|
|
9101
|
+
* The allowed tools.
|
|
9102
|
+
*/
|
|
9103
|
+
allowed_tools?: Array<AllowedTools> | undefined;
|
|
9104
|
+
/**
|
|
9105
|
+
* Optional: Fields for authentication headers, timeouts, etc., if needed.
|
|
9106
|
+
*/
|
|
9107
|
+
headers?: {
|
|
9108
|
+
[k: string]: string;
|
|
9109
|
+
} | undefined;
|
|
8933
9110
|
/**
|
|
8934
9111
|
* The name of the MCPServer.
|
|
8935
9112
|
*/
|
|
8936
9113
|
name?: string | undefined;
|
|
9114
|
+
type: "mcp_server";
|
|
8937
9115
|
/**
|
|
8938
9116
|
* The full URL for the MCPServer endpoint.
|
|
8939
9117
|
*
|
|
@@ -8941,16 +9119,6 @@ declare type MCPServer = {
|
|
|
8941
9119
|
* Example: "https://api.example.com/mcp"
|
|
8942
9120
|
*/
|
|
8943
9121
|
url?: string | undefined;
|
|
8944
|
-
/**
|
|
8945
|
-
* Optional: Fields for authentication headers, timeouts, etc., if needed.
|
|
8946
|
-
*/
|
|
8947
|
-
headers?: {
|
|
8948
|
-
[k: string]: string;
|
|
8949
|
-
} | undefined;
|
|
8950
|
-
/**
|
|
8951
|
-
* The allowed tools.
|
|
8952
|
-
*/
|
|
8953
|
-
allowed_tools?: Array<AllowedTools> | undefined;
|
|
8954
9122
|
};
|
|
8955
9123
|
|
|
8956
9124
|
/** 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. */
|
|
@@ -8971,12 +9139,12 @@ declare type MCPServerToolCall$ = MCPServerToolCallDelta;
|
|
|
8971
9139
|
* g3-prettier-ignore-file
|
|
8972
9140
|
*/
|
|
8973
9141
|
declare type MCPServerToolCallDelta = {
|
|
8974
|
-
type: "mcp_server_tool_call";
|
|
8975
|
-
name: string;
|
|
8976
|
-
server_name: string;
|
|
8977
9142
|
arguments: {
|
|
8978
9143
|
[k: string]: any;
|
|
8979
9144
|
};
|
|
9145
|
+
name: string;
|
|
9146
|
+
server_name: string;
|
|
9147
|
+
type: "mcp_server_tool_call";
|
|
8980
9148
|
};
|
|
8981
9149
|
|
|
8982
9150
|
declare type MCPServerToolCallStep$ = MCPServerToolCallStep;
|
|
@@ -8992,15 +9160,6 @@ declare type MCPServerToolCallStep$ = MCPServerToolCallStep;
|
|
|
8992
9160
|
* MCPServer tool call step.
|
|
8993
9161
|
*/
|
|
8994
9162
|
declare type MCPServerToolCallStep = {
|
|
8995
|
-
type: "mcp_server_tool_call";
|
|
8996
|
-
/**
|
|
8997
|
-
* Required. The name of the tool which was called.
|
|
8998
|
-
*/
|
|
8999
|
-
name: string;
|
|
9000
|
-
/**
|
|
9001
|
-
* Required. The name of the used MCP server.
|
|
9002
|
-
*/
|
|
9003
|
-
server_name: string;
|
|
9004
9163
|
/**
|
|
9005
9164
|
* Required. The JSON object of arguments for the function.
|
|
9006
9165
|
*/
|
|
@@ -9011,15 +9170,24 @@ declare type MCPServerToolCallStep = {
|
|
|
9011
9170
|
* Required. A unique ID for this specific tool call.
|
|
9012
9171
|
*/
|
|
9013
9172
|
id: string;
|
|
9173
|
+
/**
|
|
9174
|
+
* Required. The name of the tool which was called.
|
|
9175
|
+
*/
|
|
9176
|
+
name: string;
|
|
9177
|
+
/**
|
|
9178
|
+
* Required. The name of the used MCP server.
|
|
9179
|
+
*/
|
|
9180
|
+
server_name: string;
|
|
9181
|
+
type: "mcp_server_tool_call";
|
|
9014
9182
|
};
|
|
9015
9183
|
|
|
9016
9184
|
declare type MCPServerToolResult$ = MCPServerToolResultDelta;
|
|
9017
9185
|
|
|
9018
9186
|
declare type MCPServerToolResultDelta = {
|
|
9019
|
-
type: "mcp_server_tool_result";
|
|
9020
9187
|
name?: string | undefined;
|
|
9021
|
-
server_name?: string | undefined;
|
|
9022
9188
|
result: MCPServerToolResultDeltaResult | Array<FunctionResultSubcontent> | string;
|
|
9189
|
+
server_name?: string | undefined;
|
|
9190
|
+
type: "mcp_server_tool_result";
|
|
9023
9191
|
};
|
|
9024
9192
|
|
|
9025
9193
|
declare type MCPServerToolResultDeltaResult = {};
|
|
@@ -9032,23 +9200,23 @@ declare type MCPServerToolResultStep$ = MCPServerToolResultStep;
|
|
|
9032
9200
|
* MCPServer tool result step.
|
|
9033
9201
|
*/
|
|
9034
9202
|
declare type MCPServerToolResultStep = {
|
|
9035
|
-
type: "mcp_server_tool_result";
|
|
9036
|
-
/**
|
|
9037
|
-
* Name of the tool which is called for this specific tool call.
|
|
9038
|
-
*/
|
|
9039
|
-
name?: string | undefined;
|
|
9040
|
-
/**
|
|
9041
|
-
* The name of the used MCP server.
|
|
9042
|
-
*/
|
|
9043
|
-
server_name?: string | undefined;
|
|
9044
9203
|
/**
|
|
9045
9204
|
* Required. ID to match the ID from the function call block.
|
|
9046
9205
|
*/
|
|
9047
9206
|
call_id: string;
|
|
9207
|
+
/**
|
|
9208
|
+
* Name of the tool which is called for this specific tool call.
|
|
9209
|
+
*/
|
|
9210
|
+
name?: string | undefined;
|
|
9048
9211
|
/**
|
|
9049
9212
|
* The output from the MCP server call. Can be simple text or rich content.
|
|
9050
9213
|
*/
|
|
9051
9214
|
result: MCPServerToolResultStepResult | string | Array<FunctionResultSubcontent>;
|
|
9215
|
+
/**
|
|
9216
|
+
* The name of the used MCP server.
|
|
9217
|
+
*/
|
|
9218
|
+
server_name?: string | undefined;
|
|
9219
|
+
type: "mcp_server_tool_result";
|
|
9052
9220
|
};
|
|
9053
9221
|
|
|
9054
9222
|
declare type MCPServerToolResultStepResult = {};
|
|
@@ -9141,6 +9309,14 @@ declare type Metadata$6 = StreamMetadata;
|
|
|
9141
9309
|
|
|
9142
9310
|
declare type Metadata$7 = StreamMetadata;
|
|
9143
9311
|
|
|
9312
|
+
/**
|
|
9313
|
+
* Optional. The method for blocking content. If not specified, the default
|
|
9314
|
+
*
|
|
9315
|
+
* @remarks
|
|
9316
|
+
* behavior is to use the probability score.
|
|
9317
|
+
*/
|
|
9318
|
+
declare type Method = "severity" | "probability" | (string & {});
|
|
9319
|
+
|
|
9144
9320
|
/** Server content modalities. */
|
|
9145
9321
|
export declare enum Modality {
|
|
9146
9322
|
/**
|
|
@@ -9267,7 +9443,6 @@ declare type ModelOutputStep$ = ModelOutputStep;
|
|
|
9267
9443
|
* Output generated by the model.
|
|
9268
9444
|
*/
|
|
9269
9445
|
declare type ModelOutputStep = {
|
|
9270
|
-
type: "model_output";
|
|
9271
9446
|
content?: Array<Content_2> | undefined;
|
|
9272
9447
|
/**
|
|
9273
9448
|
* The `Status` type defines a logical error model that is suitable for
|
|
@@ -9281,6 +9456,7 @@ declare type ModelOutputStep = {
|
|
|
9281
9456
|
* [API Design Guide](https://cloud.google.com/apis/design/errors).
|
|
9282
9457
|
*/
|
|
9283
9458
|
error?: Status | undefined;
|
|
9459
|
+
type: "model_output";
|
|
9284
9460
|
};
|
|
9285
9461
|
|
|
9286
9462
|
export declare class Models extends BaseModule {
|
|
@@ -10189,19 +10365,18 @@ declare type PlaceCitation$ = PlaceCitation;
|
|
|
10189
10365
|
* A place citation annotation.
|
|
10190
10366
|
*/
|
|
10191
10367
|
declare type PlaceCitation = {
|
|
10192
|
-
type: "place_citation";
|
|
10193
10368
|
/**
|
|
10194
|
-
*
|
|
10369
|
+
* End of the attributed segment, exclusive.
|
|
10195
10370
|
*/
|
|
10196
|
-
|
|
10371
|
+
end_index?: number | undefined;
|
|
10197
10372
|
/**
|
|
10198
10373
|
* Title of the place.
|
|
10199
10374
|
*/
|
|
10200
10375
|
name?: string | undefined;
|
|
10201
10376
|
/**
|
|
10202
|
-
*
|
|
10377
|
+
* The ID of the place, in `places/{place_id}` format.
|
|
10203
10378
|
*/
|
|
10204
|
-
|
|
10379
|
+
place_id?: string | undefined;
|
|
10205
10380
|
/**
|
|
10206
10381
|
* Snippets of reviews that are used to generate answers about the
|
|
10207
10382
|
*
|
|
@@ -10217,10 +10392,11 @@ declare type PlaceCitation = {
|
|
|
10217
10392
|
* Index indicates the start of the segment, measured in bytes.
|
|
10218
10393
|
*/
|
|
10219
10394
|
start_index?: number | undefined;
|
|
10395
|
+
type: "place_citation";
|
|
10220
10396
|
/**
|
|
10221
|
-
*
|
|
10397
|
+
* URI reference of the place.
|
|
10222
10398
|
*/
|
|
10223
|
-
|
|
10399
|
+
url?: string | undefined;
|
|
10224
10400
|
};
|
|
10225
10401
|
|
|
10226
10402
|
/** Spec for pointwise metric result. This data type is not supported in Gemini API. */
|
|
@@ -10388,21 +10564,21 @@ export declare interface RagRetrievalConfig {
|
|
|
10388
10564
|
*/
|
|
10389
10565
|
declare type RagRetrievalConfig_2 = {
|
|
10390
10566
|
/**
|
|
10391
|
-
*
|
|
10567
|
+
* Config for filters.
|
|
10392
10568
|
*/
|
|
10393
|
-
|
|
10569
|
+
filter?: Filter | undefined;
|
|
10394
10570
|
/**
|
|
10395
10571
|
* Config for Hybrid Search.
|
|
10396
10572
|
*/
|
|
10397
10573
|
hybrid_search?: HybridSearch | undefined;
|
|
10398
|
-
/**
|
|
10399
|
-
* Config for filters.
|
|
10400
|
-
*/
|
|
10401
|
-
filter?: Filter | undefined;
|
|
10402
10574
|
/**
|
|
10403
10575
|
* Config for Rank Service.
|
|
10404
10576
|
*/
|
|
10405
10577
|
ranking?: Ranking | undefined;
|
|
10578
|
+
/**
|
|
10579
|
+
* Optional. The number of contexts to retrieve.
|
|
10580
|
+
*/
|
|
10581
|
+
top_k?: number | undefined;
|
|
10406
10582
|
};
|
|
10407
10583
|
|
|
10408
10584
|
/** Config for filters. This data type is not supported in Gemini API. */
|
|
@@ -10449,6 +10625,10 @@ declare type RagStoreConfig = {
|
|
|
10449
10625
|
* Optional. The representation of the rag source.
|
|
10450
10626
|
*/
|
|
10451
10627
|
rag_resources?: Array<RagResource> | undefined;
|
|
10628
|
+
/**
|
|
10629
|
+
* Specifies the context retrieval config.
|
|
10630
|
+
*/
|
|
10631
|
+
rag_retrieval_config?: RagRetrievalConfig_2 | undefined;
|
|
10452
10632
|
/**
|
|
10453
10633
|
* Optional. Number of top k results to return from the selected corpora.
|
|
10454
10634
|
*
|
|
@@ -10461,10 +10641,6 @@ declare type RagStoreConfig = {
|
|
|
10461
10641
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
10462
10642
|
*/
|
|
10463
10643
|
vector_distance_threshold?: number | undefined;
|
|
10464
|
-
/**
|
|
10465
|
-
* Specifies the context retrieval config.
|
|
10466
|
-
*/
|
|
10467
|
-
rag_retrieval_config?: RagRetrievalConfig_2 | undefined;
|
|
10468
10644
|
};
|
|
10469
10645
|
|
|
10470
10646
|
/**
|
|
@@ -10478,11 +10654,11 @@ declare type RagStoreConfig = {
|
|
|
10478
10654
|
* Config for Rank Service.
|
|
10479
10655
|
*/
|
|
10480
10656
|
declare type Ranking = {
|
|
10481
|
-
ranking_config: "rank_service";
|
|
10482
10657
|
/**
|
|
10483
10658
|
* Optional. The model name of the rank service.
|
|
10484
10659
|
*/
|
|
10485
10660
|
model_name?: string | undefined;
|
|
10661
|
+
ranking_config: "rank_service";
|
|
10486
10662
|
};
|
|
10487
10663
|
|
|
10488
10664
|
/** Raw output. This data type is not supported in Gemini API. */
|
|
@@ -10646,39 +10822,39 @@ export declare class RegisterFilesResponse {
|
|
|
10646
10822
|
export declare interface ReinforcementTuningAutoraterScorer {
|
|
10647
10823
|
/** Autorater config for evaluation. */
|
|
10648
10824
|
autoraterConfig?: AutoraterConfig;
|
|
10649
|
-
/**
|
|
10825
|
+
/** 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}} */
|
|
10650
10826
|
autoraterPrompt?: string;
|
|
10651
|
-
/** Parses autorater returned response. */
|
|
10827
|
+
/** 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"`. */
|
|
10652
10828
|
autoraterResponseParseConfig?: ReinforcementTuningParseResponseConfig;
|
|
10653
|
-
/** Scores autorater responses by directly converting parsed autorater response to float reward. */
|
|
10829
|
+
/** 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)`. */
|
|
10654
10830
|
parsedResponseConversionScorer?: ReinforcementTuningAutoraterScorerParsedResponseConversionScorer;
|
|
10655
|
-
/** Scores autorater responses by using
|
|
10831
|
+
/** Scores autorater responses by using string match reward scorer. */
|
|
10656
10832
|
exactMatchScorer?: ReinforcementTuningAutoraterScorerExactMatchScorer;
|
|
10657
10833
|
}
|
|
10658
10834
|
|
|
10659
|
-
/** Scores autorater responses by using exact string match reward scorer. */
|
|
10835
|
+
/** Scores autorater responses by using exact string match reward scorer. This data type is not supported in Gemini API. */
|
|
10660
10836
|
export declare interface ReinforcementTuningAutoraterScorerExactMatchScorer {
|
|
10661
|
-
/** Assigns this reward score if parsed response string equals the expression. */
|
|
10837
|
+
/** Assigns this reward score if the parsed response string equals the expression. */
|
|
10662
10838
|
correctAnswerReward?: number;
|
|
10663
|
-
/** Assigns this reward score if parsed reward value does not equal the expression. */
|
|
10839
|
+
/** Assigns this reward score if the parsed reward value does not equal the expression. */
|
|
10664
10840
|
wrongAnswerReward?: number;
|
|
10665
|
-
/** The string expression to match against.
|
|
10841
|
+
/** 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`. */
|
|
10666
10842
|
expression?: string;
|
|
10667
10843
|
}
|
|
10668
10844
|
|
|
10669
|
-
/** Scores responses by directly converting parsed autorater response to float reward
|
|
10845
|
+
/** 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. */
|
|
10670
10846
|
export declare class ReinforcementTuningAutoraterScorerParsedResponseConversionScorer {
|
|
10671
10847
|
}
|
|
10672
10848
|
|
|
10673
|
-
/**
|
|
10849
|
+
/** 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. */
|
|
10674
10850
|
export declare interface ReinforcementTuningCloudRunRewardScorer {
|
|
10675
|
-
/** URI of the Cloud Run service that will be used to compute the reward. The Vertex AI Secure Fine Tuning Service Agent (`service
|
|
10851
|
+
/** 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. */
|
|
10676
10852
|
cloudRunUri?: string;
|
|
10677
10853
|
}
|
|
10678
10854
|
|
|
10679
|
-
/**
|
|
10855
|
+
/** 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. */
|
|
10680
10856
|
export declare interface ReinforcementTuningCodeExecutionRewardScorer {
|
|
10681
|
-
/**
|
|
10857
|
+
/** 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)`. */
|
|
10682
10858
|
pythonCodeSnippet?: string;
|
|
10683
10859
|
}
|
|
10684
10860
|
|
|
@@ -10688,37 +10864,39 @@ export declare interface ReinforcementTuningExample {
|
|
|
10688
10864
|
contents?: Content[];
|
|
10689
10865
|
/** References for the given prompt. The key is the name of the reference, and the value is the reference itself. */
|
|
10690
10866
|
references?: Record<string, string>;
|
|
10691
|
-
/** Corresponds to
|
|
10867
|
+
/** Corresponds to system_instruction in user-facing GenerateContentRequest. */
|
|
10692
10868
|
systemInstruction?: Content;
|
|
10693
10869
|
}
|
|
10694
10870
|
|
|
10695
10871
|
/** Hyperparameters for Reinforcement Tuning. */
|
|
10696
10872
|
export declare interface ReinforcementTuningHyperParameters {
|
|
10697
|
-
/** Number of training
|
|
10873
|
+
/** Optional. Number of training epoches for the tuning job. */
|
|
10698
10874
|
epochCount?: string;
|
|
10699
10875
|
/** Learning rate multiplier for Reinforcement Learning. */
|
|
10700
10876
|
learningRateMultiplier?: number;
|
|
10701
|
-
/** Adapter size for Reinforcement Tuning. */
|
|
10877
|
+
/** Optional. Adapter size for Reinforcement Tuning. */
|
|
10702
10878
|
adapterSize?: AdapterSize;
|
|
10703
|
-
/** Number of different responses to generate per prompt during tuning. */
|
|
10879
|
+
/** Optional. Number of different responses to generate per prompt during tuning. */
|
|
10704
10880
|
samplesPerPrompt?: number;
|
|
10705
|
-
/** 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. */
|
|
10881
|
+
/** 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. */
|
|
10706
10882
|
batchSize?: number;
|
|
10707
|
-
/** How often
|
|
10883
|
+
/** 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` */
|
|
10708
10884
|
evaluateInterval?: number;
|
|
10709
|
-
/** How often
|
|
10885
|
+
/** 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``` */
|
|
10710
10886
|
checkpointInterval?: number;
|
|
10711
|
-
/** The maximum number of tokens to generate per prompt.
|
|
10887
|
+
/** Optional. The maximum number of tokens to generate per prompt. Default to 32768. */
|
|
10712
10888
|
maxOutputTokens?: number;
|
|
10713
|
-
/** Indicates the maximum thinking depth.
|
|
10889
|
+
/** 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. */
|
|
10714
10890
|
thinkingLevel?: ReinforcementTuningThinkingLevel;
|
|
10891
|
+
/** 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). */
|
|
10892
|
+
thinkingBudget?: number;
|
|
10715
10893
|
}
|
|
10716
10894
|
|
|
10717
|
-
/** Defines how to parse sample response for reinforcement tuning. */
|
|
10895
|
+
/** 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. */
|
|
10718
10896
|
export declare class ReinforcementTuningParseResponseConfig {
|
|
10719
|
-
/** Defines
|
|
10897
|
+
/** Defines the type for parsing sample response. */
|
|
10720
10898
|
parseType?: ResponseParseType;
|
|
10721
|
-
/** Defines the regex
|
|
10899
|
+
/** Defines the regex for extracting the important part of sample response. This field is only used when parse_type is ResponseParseType.REGEX_EXTRACT. */
|
|
10722
10900
|
regexExtractExpression?: string;
|
|
10723
10901
|
}
|
|
10724
10902
|
|
|
@@ -10726,16 +10904,17 @@ export declare class ReinforcementTuningParseResponseConfig {
|
|
|
10726
10904
|
export declare interface ReinforcementTuningRewardInfo {
|
|
10727
10905
|
/** Output only. The calculated reward for the reward function. */
|
|
10728
10906
|
reward?: number;
|
|
10729
|
-
/** Output only. The user-requested auxiliary info for the reward function. */
|
|
10907
|
+
/** 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. */
|
|
10730
10908
|
userRequestedAuxInfo?: string;
|
|
10731
10909
|
}
|
|
10732
10910
|
|
|
10733
10911
|
/** Reinforcement tuning spec for tuning. */
|
|
10734
10912
|
export declare interface ReinforcementTuningSpec {
|
|
10913
|
+
/** Composite reward function configuration for reinforcement tuning. */
|
|
10735
10914
|
compositeRewardConfig?: CompositeReinforcementTuningRewardConfig;
|
|
10736
|
-
/** Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
10915
|
+
/** Cloud Storage path to the file containing training dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
10737
10916
|
trainingDatasetUri?: string;
|
|
10738
|
-
/** Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.
|
|
10917
|
+
/** Cloud Storage path to the file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
10739
10918
|
validationDatasetUri?: string;
|
|
10740
10919
|
/** Additional hyper-parameters to use during tuning. */
|
|
10741
10920
|
hyperParameters?: ReinforcementTuningHyperParameters;
|
|
@@ -10743,11 +10922,11 @@ export declare interface ReinforcementTuningSpec {
|
|
|
10743
10922
|
singleRewardConfig?: SingleReinforcementTuningRewardConfig;
|
|
10744
10923
|
}
|
|
10745
10924
|
|
|
10746
|
-
/**
|
|
10925
|
+
/** 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. */
|
|
10747
10926
|
export declare interface ReinforcementTuningStringMatchRewardScorer {
|
|
10748
|
-
/** Wrong answer reward is returned if
|
|
10927
|
+
/** Wrong answer reward is returned if the parsed response is evaluated as `false`. All wrong answers get the same reward. */
|
|
10749
10928
|
wrongAnswerReward?: number;
|
|
10750
|
-
/** Correct answer
|
|
10929
|
+
/** Correct answer rewawrd is returned if the parsed response is evaluated as `true`. All correct answers get the same reward. */
|
|
10751
10930
|
correctAnswerReward?: number;
|
|
10752
10931
|
/** Uses string match expression to evaluate parsed response. */
|
|
10753
10932
|
stringMatchExpression?: ReinforcementTuningStringMatchRewardScorerStringMatchExpression;
|
|
@@ -10755,19 +10934,19 @@ export declare interface ReinforcementTuningStringMatchRewardScorer {
|
|
|
10755
10934
|
jsonMatchExpression?: ReinforcementTuningStringMatchRewardScorerJsonMatchExpression;
|
|
10756
10935
|
}
|
|
10757
10936
|
|
|
10758
|
-
/**
|
|
10937
|
+
/** 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. */
|
|
10759
10938
|
export declare interface ReinforcementTuningStringMatchRewardScorerJsonMatchExpression {
|
|
10760
|
-
/**
|
|
10939
|
+
/** The key name to find the value in the parsed response that's in JSON format. Only first-level key matching is supported. */
|
|
10761
10940
|
keyName?: string;
|
|
10762
|
-
/** String match expression to match against the value of
|
|
10941
|
+
/** String match expression to match against the extracted value from the JSON representation of the parsed response. */
|
|
10763
10942
|
valueStringMatchExpression?: ReinforcementTuningStringMatchRewardScorerStringMatchExpression;
|
|
10764
10943
|
}
|
|
10765
10944
|
|
|
10766
|
-
/** Evaluates parsed response using match type against expression. */
|
|
10945
|
+
/** 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. */
|
|
10767
10946
|
export declare interface ReinforcementTuningStringMatchRewardScorerStringMatchExpression {
|
|
10768
|
-
/** Match operation to use for
|
|
10947
|
+
/** Match operation to use for evaluating rewards. */
|
|
10769
10948
|
matchOperation?: MatchOperation;
|
|
10770
|
-
/**
|
|
10949
|
+
/** 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.*" } ``` */
|
|
10771
10950
|
expression?: string;
|
|
10772
10951
|
}
|
|
10773
10952
|
|
|
@@ -10787,6 +10966,12 @@ export declare enum ReinforcementTuningThinkingLevel {
|
|
|
10787
10966
|
HIGH = "HIGH"
|
|
10788
10967
|
}
|
|
10789
10968
|
|
|
10969
|
+
/** 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. */
|
|
10970
|
+
export declare interface ReinforcementTuningUserDatasetExamples {
|
|
10971
|
+
/** List of user datasset examples showing to user. */
|
|
10972
|
+
userDatasetExamples?: ReinforcementTuningExample[];
|
|
10973
|
+
}
|
|
10974
|
+
|
|
10790
10975
|
/** Represents a recorded session. */
|
|
10791
10976
|
export declare interface ReplayFile {
|
|
10792
10977
|
replayId?: string;
|
|
@@ -10826,6 +11011,17 @@ export declare interface ReplicatedVoiceConfig {
|
|
|
10826
11011
|
|
|
10827
11012
|
* @remarks Encoded as base64 string. */
|
|
10828
11013
|
voiceSampleAudio?: string;
|
|
11014
|
+
/** Recorded consent verifying ownership of the voice. This
|
|
11015
|
+
represents 16-bit signed little-endian wav data, with a 24kHz sampling
|
|
11016
|
+
rate.
|
|
11017
|
+
* @remarks Encoded as base64 string. */
|
|
11018
|
+
consentAudio?: string;
|
|
11019
|
+
/** Signature of a previously verified consent audio. This should be
|
|
11020
|
+
populated with a signature generated by the server for a previous
|
|
11021
|
+
request containing the consent_audio field. When provided, the
|
|
11022
|
+
signature is verified instead of the consent_audio field to reduce
|
|
11023
|
+
latency. Requests will fail if the signature is invalid or expired. */
|
|
11024
|
+
voiceConsentSignature?: VoiceConsentSignature;
|
|
10829
11025
|
}
|
|
10830
11026
|
|
|
10831
11027
|
declare type RequestOptions = {
|
|
@@ -10882,7 +11078,19 @@ export declare enum ResourceScope {
|
|
|
10882
11078
|
COLLECTION = "COLLECTION"
|
|
10883
11079
|
}
|
|
10884
11080
|
|
|
10885
|
-
|
|
11081
|
+
/** Configuration for the model to configure output formatting and delivery. This data type is not supported in Gemini API. */
|
|
11082
|
+
export declare class ResponseFormat {
|
|
11083
|
+
/** Audio output format. */
|
|
11084
|
+
audio?: AudioResponseFormat;
|
|
11085
|
+
/** Image output format. */
|
|
11086
|
+
image?: ImageResponseFormat;
|
|
11087
|
+
/** Text output format. */
|
|
11088
|
+
text?: TextResponseFormat;
|
|
11089
|
+
/** Video output format. */
|
|
11090
|
+
video?: VideoResponseFormat;
|
|
11091
|
+
}
|
|
11092
|
+
|
|
11093
|
+
declare type ResponseFormat_2 = AudioResponseFormat_2 | TextResponseFormat_2 | ImageResponseFormat_2 | VideoResponseFormat_2 | {
|
|
10886
11094
|
[k: string]: any;
|
|
10887
11095
|
};
|
|
10888
11096
|
|
|
@@ -10895,18 +11103,18 @@ declare type ResponseFormat = AudioResponseFormat | TextResponseFormat | ImageRe
|
|
|
10895
11103
|
*/
|
|
10896
11104
|
declare type ResponseModality = "text" | "image" | "audio" | "video" | "document" | (string & {});
|
|
10897
11105
|
|
|
10898
|
-
/** Defines
|
|
11106
|
+
/** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
|
|
10899
11107
|
export declare enum ResponseParseType {
|
|
10900
11108
|
/**
|
|
10901
|
-
* Default value.
|
|
11109
|
+
* Default value. Fallback to IDENTITY
|
|
10902
11110
|
*/
|
|
10903
11111
|
RESPONSE_PARSE_TYPE_UNSPECIFIED = "RESPONSE_PARSE_TYPE_UNSPECIFIED",
|
|
10904
11112
|
/**
|
|
10905
|
-
*
|
|
11113
|
+
* Returns the sample response as is.
|
|
10906
11114
|
*/
|
|
10907
11115
|
IDENTITY = "IDENTITY",
|
|
10908
11116
|
/**
|
|
10909
|
-
*
|
|
11117
|
+
* 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.
|
|
10910
11118
|
*/
|
|
10911
11119
|
REGEX_EXTRACT = "REGEX_EXTRACT"
|
|
10912
11120
|
}
|
|
@@ -10935,29 +11143,77 @@ export declare interface Retrieval {
|
|
|
10935
11143
|
* A tool that can be used by the model to retrieve files.
|
|
10936
11144
|
*/
|
|
10937
11145
|
declare type Retrieval_2 = {
|
|
10938
|
-
|
|
11146
|
+
/**
|
|
11147
|
+
* Used to specify configuration for ExaAISearch.
|
|
11148
|
+
*/
|
|
11149
|
+
exa_ai_search_config?: ExaAISearchConfig | undefined;
|
|
11150
|
+
/**
|
|
11151
|
+
* Used to specify configuration for ParallelAISearch.
|
|
11152
|
+
*/
|
|
11153
|
+
parallel_ai_search_config?: ParallelAISearchConfig | undefined;
|
|
11154
|
+
/**
|
|
11155
|
+
* Use to specify configuration for RAG Store.
|
|
11156
|
+
*/
|
|
11157
|
+
rag_store_config?: RagStoreConfig | undefined;
|
|
10939
11158
|
/**
|
|
10940
11159
|
* The types of file retrieval to enable.
|
|
10941
11160
|
*/
|
|
10942
|
-
retrieval_types?: Array<
|
|
11161
|
+
retrieval_types?: Array<RetrievalRetrievalType> | undefined;
|
|
11162
|
+
type: "retrieval";
|
|
10943
11163
|
/**
|
|
10944
11164
|
* Used to specify configuration for VertexAISearch.
|
|
10945
11165
|
*/
|
|
10946
11166
|
vertex_ai_search_config?: VertexAISearchConfig | undefined;
|
|
11167
|
+
};
|
|
11168
|
+
|
|
11169
|
+
declare type RetrievalCallArguments$ = RetrievalCallArguments;
|
|
11170
|
+
|
|
11171
|
+
/**
|
|
11172
|
+
* @license
|
|
11173
|
+
* Copyright 2026 Google LLC
|
|
11174
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
11175
|
+
*
|
|
11176
|
+
* g3-prettier-ignore-file
|
|
11177
|
+
*/
|
|
11178
|
+
/**
|
|
11179
|
+
* The arguments to pass to Retrieval tools.
|
|
11180
|
+
*/
|
|
11181
|
+
declare type RetrievalCallArguments = {
|
|
10947
11182
|
/**
|
|
10948
|
-
*
|
|
11183
|
+
* Queries for Retrieval information.
|
|
10949
11184
|
*/
|
|
10950
|
-
|
|
11185
|
+
queries?: Array<string> | undefined;
|
|
11186
|
+
};
|
|
11187
|
+
|
|
11188
|
+
declare type RetrievalCallDelta$ = RetrievalCallDelta;
|
|
11189
|
+
|
|
11190
|
+
/**
|
|
11191
|
+
* Used by Vertex Retrieval tools such as Parallel AI, Exa AI, Vertex AI Search,
|
|
11192
|
+
*
|
|
11193
|
+
* @remarks
|
|
11194
|
+
* etc. RetrievalType decides which tool is used.
|
|
11195
|
+
*/
|
|
11196
|
+
declare type RetrievalCallDelta = {
|
|
10951
11197
|
/**
|
|
10952
|
-
*
|
|
11198
|
+
* The arguments to pass to Retrieval tools.
|
|
10953
11199
|
*/
|
|
10954
|
-
|
|
11200
|
+
arguments: RetrievalCallArguments;
|
|
10955
11201
|
/**
|
|
10956
|
-
*
|
|
11202
|
+
* The type of retrieval tools.
|
|
10957
11203
|
*/
|
|
10958
|
-
|
|
11204
|
+
retrieval_type?: RetrievalCallDeltaRetrievalType | undefined;
|
|
11205
|
+
/**
|
|
11206
|
+
* A signature hash for backend validation.
|
|
11207
|
+
*/
|
|
11208
|
+
signature?: string | undefined;
|
|
11209
|
+
type: "retrieval_call";
|
|
10959
11210
|
};
|
|
10960
11211
|
|
|
11212
|
+
/**
|
|
11213
|
+
* The type of retrieval tools.
|
|
11214
|
+
*/
|
|
11215
|
+
declare type RetrievalCallDeltaRetrievalType = "vertex_ai_search" | "rag_store" | "exa_ai_search" | "parallel_ai_search" | (string & {});
|
|
11216
|
+
|
|
10961
11217
|
/** Retrieval config. */
|
|
10962
11218
|
export declare interface RetrievalConfig {
|
|
10963
11219
|
/** The location of the user. */
|
|
@@ -10977,7 +11233,35 @@ export declare interface RetrievalMetadata {
|
|
|
10977
11233
|
googleSearchDynamicRetrievalScore?: number;
|
|
10978
11234
|
}
|
|
10979
11235
|
|
|
10980
|
-
declare type
|
|
11236
|
+
declare type RetrievalResultDelta$ = RetrievalResultDelta;
|
|
11237
|
+
|
|
11238
|
+
/**
|
|
11239
|
+
* @license
|
|
11240
|
+
* Copyright 2026 Google LLC
|
|
11241
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
11242
|
+
*
|
|
11243
|
+
* g3-prettier-ignore-file
|
|
11244
|
+
*/
|
|
11245
|
+
/**
|
|
11246
|
+
* Used by Vertex Retrieval tools such as Parallel AI, Exa AI, Vertex AI Search,
|
|
11247
|
+
*
|
|
11248
|
+
* @remarks
|
|
11249
|
+
* etc.
|
|
11250
|
+
* ToolResultDelta.type
|
|
11251
|
+
*/
|
|
11252
|
+
declare type RetrievalResultDelta = {
|
|
11253
|
+
/**
|
|
11254
|
+
* Whether the retrieval resulted in an error.
|
|
11255
|
+
*/
|
|
11256
|
+
is_error?: boolean | undefined;
|
|
11257
|
+
/**
|
|
11258
|
+
* A signature hash for backend validation.
|
|
11259
|
+
*/
|
|
11260
|
+
signature?: string | undefined;
|
|
11261
|
+
type: "retrieval_result";
|
|
11262
|
+
};
|
|
11263
|
+
|
|
11264
|
+
declare type RetrievalRetrievalType = "vertex_ai_search" | "rag_store" | "exa_ai_search" | "parallel_ai_search" | (string & {});
|
|
10981
11265
|
|
|
10982
11266
|
declare type RetryConfig = {
|
|
10983
11267
|
strategy: "none";
|
|
@@ -11012,6 +11296,10 @@ declare type ReviewSnippet$3 = ReviewSnippet;
|
|
|
11012
11296
|
* the features of a specific place in Google Maps.
|
|
11013
11297
|
*/
|
|
11014
11298
|
declare type ReviewSnippet = {
|
|
11299
|
+
/**
|
|
11300
|
+
* The ID of the review snippet.
|
|
11301
|
+
*/
|
|
11302
|
+
review_id?: string | undefined;
|
|
11015
11303
|
/**
|
|
11016
11304
|
* Title of the review.
|
|
11017
11305
|
*/
|
|
@@ -11020,10 +11308,6 @@ declare type ReviewSnippet = {
|
|
|
11020
11308
|
* A link that corresponds to the user review on Google Maps.
|
|
11021
11309
|
*/
|
|
11022
11310
|
url?: string | undefined;
|
|
11023
|
-
/**
|
|
11024
|
-
* The ID of the review snippet.
|
|
11025
|
-
*/
|
|
11026
|
-
review_id?: string | undefined;
|
|
11027
11311
|
};
|
|
11028
11312
|
|
|
11029
11313
|
/**
|
|
@@ -11128,6 +11412,8 @@ export declare interface SafetyRating {
|
|
|
11128
11412
|
severityScore?: number;
|
|
11129
11413
|
}
|
|
11130
11414
|
|
|
11415
|
+
declare type SafetySetting$ = SafetySetting_2;
|
|
11416
|
+
|
|
11131
11417
|
/** A safety setting that affects the safety-blocking behavior. A SafetySetting consists of a harm category and a threshold for that category. */
|
|
11132
11418
|
export declare interface SafetySetting {
|
|
11133
11419
|
/** Required. The harm category to be blocked. */
|
|
@@ -11138,10 +11424,38 @@ export declare interface SafetySetting {
|
|
|
11138
11424
|
threshold?: HarmBlockThreshold;
|
|
11139
11425
|
}
|
|
11140
11426
|
|
|
11141
|
-
/**
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11427
|
+
/**
|
|
11428
|
+
* A safety setting that affects the safety-blocking behavior.
|
|
11429
|
+
*
|
|
11430
|
+
* @remarks
|
|
11431
|
+
*
|
|
11432
|
+
* A SafetySetting consists of a
|
|
11433
|
+
* harm category and a
|
|
11434
|
+
* threshold for that
|
|
11435
|
+
* category.
|
|
11436
|
+
*/
|
|
11437
|
+
declare type SafetySetting_2 = {
|
|
11438
|
+
/**
|
|
11439
|
+
* Optional. The method for blocking content. If not specified, the default
|
|
11440
|
+
*
|
|
11441
|
+
* @remarks
|
|
11442
|
+
* behavior is to use the probability score.
|
|
11443
|
+
*/
|
|
11444
|
+
method?: Method | undefined;
|
|
11445
|
+
/**
|
|
11446
|
+
* Required. The threshold for blocking content. If the harm probability
|
|
11447
|
+
*
|
|
11448
|
+
* @remarks
|
|
11449
|
+
* exceeds this threshold, the content will be blocked.
|
|
11450
|
+
*/
|
|
11451
|
+
threshold: Threshold;
|
|
11452
|
+
type: HarmCategory_2;
|
|
11453
|
+
};
|
|
11454
|
+
|
|
11455
|
+
/** Scale of the generated music. */
|
|
11456
|
+
export declare enum Scale {
|
|
11457
|
+
/**
|
|
11458
|
+
* Default value. This value is unused.
|
|
11145
11459
|
*/
|
|
11146
11460
|
SCALE_UNSPECIFIED = "SCALE_UNSPECIFIED",
|
|
11147
11461
|
/**
|
|
@@ -11418,6 +11732,7 @@ declare type ServiceTier_2 = "flex" | "standard" | "priority" | (string & {});
|
|
|
11418
11732
|
export declare class Session {
|
|
11419
11733
|
readonly conn: WebSocket_2;
|
|
11420
11734
|
private readonly apiClient;
|
|
11735
|
+
setupComplete?: types.LiveServerSetupComplete;
|
|
11421
11736
|
constructor(conn: WebSocket_2, apiClient: ApiClient);
|
|
11422
11737
|
private tLiveClientContent;
|
|
11423
11738
|
private tLiveClienttToolResponse;
|
|
@@ -11583,14 +11898,14 @@ declare type SigningSecret$ = SigningSecret;
|
|
|
11583
11898
|
* Represents a signing secret used to verify webhook payloads.
|
|
11584
11899
|
*/
|
|
11585
11900
|
declare type SigningSecret = {
|
|
11586
|
-
/**
|
|
11587
|
-
* Output only. The truncated version of the signing secret.
|
|
11588
|
-
*/
|
|
11589
|
-
truncated_secret?: string | undefined;
|
|
11590
11901
|
/**
|
|
11591
11902
|
* Output only. The expiration date of the signing secret.
|
|
11592
11903
|
*/
|
|
11593
11904
|
expire_time?: string | undefined;
|
|
11905
|
+
/**
|
|
11906
|
+
* Output only. The truncated version of the signing secret.
|
|
11907
|
+
*/
|
|
11908
|
+
truncated_secret?: string | undefined;
|
|
11594
11909
|
};
|
|
11595
11910
|
|
|
11596
11911
|
/** Config for `response` parameter. */
|
|
@@ -11607,15 +11922,15 @@ export declare class SingleEmbedContentResponse {
|
|
|
11607
11922
|
export declare interface SingleReinforcementTuningRewardConfig {
|
|
11608
11923
|
/** Scores parsed responses for autorater use cases by using a model to compute the reward. */
|
|
11609
11924
|
autoraterScorer?: ReinforcementTuningAutoraterScorer;
|
|
11610
|
-
/** A unique reward name
|
|
11925
|
+
/** A unique reward name for identifying each single reinforcement tuning reward. */
|
|
11611
11926
|
rewardName?: string;
|
|
11612
|
-
/** Defines how to parse sample response. */
|
|
11927
|
+
/** 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. */
|
|
11613
11928
|
parseResponseConfig?: ReinforcementTuningParseResponseConfig;
|
|
11614
|
-
/**
|
|
11929
|
+
/** ReinforcementTuningCodeExecutionRewardScorer is used to score parsed responses for code execution use cases. */
|
|
11615
11930
|
codeExecutionRewardScorer?: ReinforcementTuningCodeExecutionRewardScorer;
|
|
11616
|
-
/**
|
|
11931
|
+
/** ReinforcementTuningStringMatchRewardScorer is used to score parsed responses for simple string matching use cases against reference answers. */
|
|
11617
11932
|
stringMatchRewardScorer?: ReinforcementTuningStringMatchRewardScorer;
|
|
11618
|
-
/**
|
|
11933
|
+
/** ReinforcementTuningCloudRunRewardScorer is used to score parsed responses by calling a Cloud Run service. */
|
|
11619
11934
|
cloudRunRewardScorer?: ReinforcementTuningCloudRunRewardScorer;
|
|
11620
11935
|
}
|
|
11621
11936
|
|
|
@@ -11636,7 +11951,14 @@ declare type Source$ = Source;
|
|
|
11636
11951
|
* A source to be mounted into the environment.
|
|
11637
11952
|
*/
|
|
11638
11953
|
declare type Source = {
|
|
11639
|
-
|
|
11954
|
+
/**
|
|
11955
|
+
* The inline content if `type` is `INLINE`.
|
|
11956
|
+
*/
|
|
11957
|
+
content?: string | undefined;
|
|
11958
|
+
/**
|
|
11959
|
+
* Optional encoding for inline content (e.g. `base64`).
|
|
11960
|
+
*/
|
|
11961
|
+
encoding?: string | undefined;
|
|
11640
11962
|
/**
|
|
11641
11963
|
* The source of the environment.
|
|
11642
11964
|
*
|
|
@@ -11649,14 +11971,7 @@ declare type Source = {
|
|
|
11649
11971
|
* Where the source should appear in the environment.
|
|
11650
11972
|
*/
|
|
11651
11973
|
target?: string | undefined;
|
|
11652
|
-
|
|
11653
|
-
* The inline content if `type` is `INLINE`.
|
|
11654
|
-
*/
|
|
11655
|
-
content?: string | undefined;
|
|
11656
|
-
/**
|
|
11657
|
-
* Optional encoding for inline content (e.g. `base64`).
|
|
11658
|
-
*/
|
|
11659
|
-
encoding?: string | undefined;
|
|
11974
|
+
type?: SourceType | undefined;
|
|
11660
11975
|
};
|
|
11661
11976
|
|
|
11662
11977
|
/**
|
|
@@ -11699,10 +12014,6 @@ export declare interface SpeechConfig {
|
|
|
11699
12014
|
* The configuration for speech interaction.
|
|
11700
12015
|
*/
|
|
11701
12016
|
declare type SpeechConfig_2 = {
|
|
11702
|
-
/**
|
|
11703
|
-
* The voice of the speaker.
|
|
11704
|
-
*/
|
|
11705
|
-
voice?: string | undefined;
|
|
11706
12017
|
/**
|
|
11707
12018
|
* The language of the speech.
|
|
11708
12019
|
*/
|
|
@@ -11711,6 +12022,10 @@ declare type SpeechConfig_2 = {
|
|
|
11711
12022
|
* The speaker's name, it should match the speaker name given in the prompt.
|
|
11712
12023
|
*/
|
|
11713
12024
|
speaker?: string | undefined;
|
|
12025
|
+
/**
|
|
12026
|
+
* The voice of the speaker.
|
|
12027
|
+
*/
|
|
12028
|
+
voice?: string | undefined;
|
|
11714
12029
|
};
|
|
11715
12030
|
|
|
11716
12031
|
export declare type SpeechConfigUnion = SpeechConfig | string;
|
|
@@ -11761,14 +12076,6 @@ declare type Status = {
|
|
|
11761
12076
|
* The status code, which should be an enum value of google.rpc.Code.
|
|
11762
12077
|
*/
|
|
11763
12078
|
code?: number | undefined;
|
|
11764
|
-
/**
|
|
11765
|
-
* A developer-facing error message, which should be in English. Any
|
|
11766
|
-
*
|
|
11767
|
-
* @remarks
|
|
11768
|
-
* user-facing error message should be localized and sent in the
|
|
11769
|
-
* google.rpc.Status.details field, or localized by the client.
|
|
11770
|
-
*/
|
|
11771
|
-
message?: string | undefined;
|
|
11772
12079
|
/**
|
|
11773
12080
|
* A list of messages that carry the error details. There is a common set of
|
|
11774
12081
|
*
|
|
@@ -11778,6 +12085,14 @@ declare type Status = {
|
|
|
11778
12085
|
details?: Array<{
|
|
11779
12086
|
[k: string]: any;
|
|
11780
12087
|
}> | undefined;
|
|
12088
|
+
/**
|
|
12089
|
+
* A developer-facing error message, which should be in English. Any
|
|
12090
|
+
*
|
|
12091
|
+
* @remarks
|
|
12092
|
+
* user-facing error message should be localized and sent in the
|
|
12093
|
+
* google.rpc.Status.details field, or localized by the client.
|
|
12094
|
+
*/
|
|
12095
|
+
message?: string | undefined;
|
|
11781
12096
|
};
|
|
11782
12097
|
|
|
11783
12098
|
declare type Step$ = Step;
|
|
@@ -11790,8 +12105,6 @@ declare type Step = UserInputStep | ModelOutputStep | ThoughtStep | FunctionCall
|
|
|
11790
12105
|
declare type StepDelta$ = StepDelta;
|
|
11791
12106
|
|
|
11792
12107
|
declare type StepDelta = {
|
|
11793
|
-
event_type: "step.delta";
|
|
11794
|
-
index: number;
|
|
11795
12108
|
delta: StepDeltaData;
|
|
11796
12109
|
/**
|
|
11797
12110
|
* The event_id token to be used to resume the interaction stream, from
|
|
@@ -11800,13 +12113,15 @@ declare type StepDelta = {
|
|
|
11800
12113
|
* this event.
|
|
11801
12114
|
*/
|
|
11802
12115
|
event_id?: string | undefined;
|
|
12116
|
+
event_type: "step.delta";
|
|
12117
|
+
index: number;
|
|
11803
12118
|
/**
|
|
11804
12119
|
* Optional metadata accompanying ANY streamed event.
|
|
11805
12120
|
*/
|
|
11806
12121
|
metadata?: StepDeltaMetadata | undefined;
|
|
11807
12122
|
};
|
|
11808
12123
|
|
|
11809
|
-
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;
|
|
12124
|
+
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;
|
|
11810
12125
|
|
|
11811
12126
|
/**
|
|
11812
12127
|
* Optional metadata accompanying ANY streamed event.
|
|
@@ -11821,12 +12136,6 @@ declare type StepDeltaMetadata = {
|
|
|
11821
12136
|
declare type StepStart$ = StepStart;
|
|
11822
12137
|
|
|
11823
12138
|
declare type StepStart = {
|
|
11824
|
-
event_type: "step.start";
|
|
11825
|
-
index: number;
|
|
11826
|
-
/**
|
|
11827
|
-
* A step in the interaction.
|
|
11828
|
-
*/
|
|
11829
|
-
step: Step;
|
|
11830
12139
|
/**
|
|
11831
12140
|
* The event_id token to be used to resume the interaction stream, from
|
|
11832
12141
|
*
|
|
@@ -11834,22 +12143,18 @@ declare type StepStart = {
|
|
|
11834
12143
|
* this event.
|
|
11835
12144
|
*/
|
|
11836
12145
|
event_id?: string | undefined;
|
|
12146
|
+
event_type: "step.start";
|
|
12147
|
+
index: number;
|
|
11837
12148
|
metadata?: StreamMetadata | undefined;
|
|
12149
|
+
/**
|
|
12150
|
+
* A step in the interaction.
|
|
12151
|
+
*/
|
|
12152
|
+
step: Step;
|
|
11838
12153
|
};
|
|
11839
12154
|
|
|
11840
12155
|
declare type StepStop$ = StepStop;
|
|
11841
12156
|
|
|
11842
12157
|
declare type StepStop = {
|
|
11843
|
-
event_type: "step.stop";
|
|
11844
|
-
index: number;
|
|
11845
|
-
/**
|
|
11846
|
-
* Statistics on the interaction request's token usage.
|
|
11847
|
-
*/
|
|
11848
|
-
usage?: Usage | undefined;
|
|
11849
|
-
/**
|
|
11850
|
-
* Statistics on the interaction request's token usage.
|
|
11851
|
-
*/
|
|
11852
|
-
step_usage?: Usage | undefined;
|
|
11853
12158
|
/**
|
|
11854
12159
|
* The event_id token to be used to resume the interaction stream, from
|
|
11855
12160
|
*
|
|
@@ -11857,7 +12162,17 @@ declare type StepStop = {
|
|
|
11857
12162
|
* this event.
|
|
11858
12163
|
*/
|
|
11859
12164
|
event_id?: string | undefined;
|
|
12165
|
+
event_type: "step.stop";
|
|
12166
|
+
index: number;
|
|
11860
12167
|
metadata?: StreamMetadata | undefined;
|
|
12168
|
+
/**
|
|
12169
|
+
* Statistics on the interaction request's token usage.
|
|
12170
|
+
*/
|
|
12171
|
+
step_usage?: Usage | undefined;
|
|
12172
|
+
/**
|
|
12173
|
+
* Statistics on the interaction request's token usage.
|
|
12174
|
+
*/
|
|
12175
|
+
usage?: Usage | undefined;
|
|
11861
12176
|
};
|
|
11862
12177
|
|
|
11863
12178
|
export declare class Stream<T> extends ReadableStream<T> {
|
|
@@ -12109,11 +12424,11 @@ declare type Text$ = TextDelta;
|
|
|
12109
12424
|
declare type TextAnnotationDelta$ = TextAnnotationDelta;
|
|
12110
12425
|
|
|
12111
12426
|
declare type TextAnnotationDelta = {
|
|
12112
|
-
type: "text_annotation_delta";
|
|
12113
12427
|
/**
|
|
12114
12428
|
* Citation information for model-generated content.
|
|
12115
12429
|
*/
|
|
12116
12430
|
annotations?: Array<Annotation> | undefined;
|
|
12431
|
+
type: "text_annotation_delta";
|
|
12117
12432
|
};
|
|
12118
12433
|
|
|
12119
12434
|
declare type TextContent$ = TextContent;
|
|
@@ -12122,15 +12437,15 @@ declare type TextContent$ = TextContent;
|
|
|
12122
12437
|
* A text content block.
|
|
12123
12438
|
*/
|
|
12124
12439
|
declare type TextContent = {
|
|
12125
|
-
type: "text";
|
|
12126
|
-
/**
|
|
12127
|
-
* Required. The text content.
|
|
12128
|
-
*/
|
|
12129
|
-
text: string;
|
|
12130
12440
|
/**
|
|
12131
12441
|
* Citation information for model-generated content.
|
|
12132
12442
|
*/
|
|
12133
12443
|
annotations?: Array<Annotation> | undefined;
|
|
12444
|
+
/**
|
|
12445
|
+
* Required. The text content.
|
|
12446
|
+
*/
|
|
12447
|
+
text: string;
|
|
12448
|
+
type: "text";
|
|
12134
12449
|
};
|
|
12135
12450
|
|
|
12136
12451
|
/**
|
|
@@ -12141,17 +12456,24 @@ declare type TextContent = {
|
|
|
12141
12456
|
* g3-prettier-ignore-file
|
|
12142
12457
|
*/
|
|
12143
12458
|
declare type TextDelta = {
|
|
12144
|
-
type: "text";
|
|
12145
12459
|
text: string;
|
|
12460
|
+
type: "text";
|
|
12146
12461
|
};
|
|
12147
12462
|
|
|
12148
|
-
declare type TextResponseFormat$ =
|
|
12463
|
+
declare type TextResponseFormat$ = TextResponseFormat_2;
|
|
12464
|
+
|
|
12465
|
+
/** Configuration for text-specific output formatting. */
|
|
12466
|
+
export declare class TextResponseFormat {
|
|
12467
|
+
/** Optional. The IANA standard MIME type of the response. */
|
|
12468
|
+
mimeType?: string;
|
|
12469
|
+
/** Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON. */
|
|
12470
|
+
schema?: unknown;
|
|
12471
|
+
}
|
|
12149
12472
|
|
|
12150
12473
|
/**
|
|
12151
12474
|
* Configuration for text output format.
|
|
12152
12475
|
*/
|
|
12153
|
-
declare type
|
|
12154
|
-
type: "text";
|
|
12476
|
+
declare type TextResponseFormat_2 = {
|
|
12155
12477
|
/**
|
|
12156
12478
|
* The MIME type of the text output.
|
|
12157
12479
|
*/
|
|
@@ -12165,6 +12487,7 @@ declare type TextResponseFormat = {
|
|
|
12165
12487
|
schema?: {
|
|
12166
12488
|
[k: string]: any;
|
|
12167
12489
|
} | undefined;
|
|
12490
|
+
type: "text";
|
|
12168
12491
|
};
|
|
12169
12492
|
|
|
12170
12493
|
/**
|
|
@@ -12245,11 +12568,11 @@ declare type ThoughtSignature$ = ThoughtSignatureDelta;
|
|
|
12245
12568
|
* g3-prettier-ignore-file
|
|
12246
12569
|
*/
|
|
12247
12570
|
declare type ThoughtSignatureDelta = {
|
|
12248
|
-
type: "thought_signature";
|
|
12249
12571
|
/**
|
|
12250
12572
|
* Signature to match the backend source to be part of the generation.
|
|
12251
12573
|
*/
|
|
12252
12574
|
signature?: string | undefined;
|
|
12575
|
+
type: "thought_signature";
|
|
12253
12576
|
};
|
|
12254
12577
|
|
|
12255
12578
|
declare type ThoughtStep$ = ThoughtStep;
|
|
@@ -12258,7 +12581,6 @@ declare type ThoughtStep$ = ThoughtStep;
|
|
|
12258
12581
|
* A thought step.
|
|
12259
12582
|
*/
|
|
12260
12583
|
declare type ThoughtStep = {
|
|
12261
|
-
type: "thought";
|
|
12262
12584
|
/**
|
|
12263
12585
|
* A signature hash for backend validation.
|
|
12264
12586
|
*/
|
|
@@ -12267,6 +12589,7 @@ declare type ThoughtStep = {
|
|
|
12267
12589
|
* A summary of the thought.
|
|
12268
12590
|
*/
|
|
12269
12591
|
summary?: Array<ThoughtSummaryContent> | undefined;
|
|
12592
|
+
type: "thought";
|
|
12270
12593
|
};
|
|
12271
12594
|
|
|
12272
12595
|
declare type ThoughtSummary$ = ThoughtSummaryDelta;
|
|
@@ -12274,13 +12597,21 @@ declare type ThoughtSummary$ = ThoughtSummaryDelta;
|
|
|
12274
12597
|
declare type ThoughtSummaryContent = TextContent | ImageContent;
|
|
12275
12598
|
|
|
12276
12599
|
declare type ThoughtSummaryDelta = {
|
|
12277
|
-
type: "thought_summary";
|
|
12278
12600
|
/**
|
|
12279
12601
|
* The content of the response.
|
|
12280
12602
|
*/
|
|
12281
12603
|
content?: Content_2 | undefined;
|
|
12604
|
+
type: "thought_summary";
|
|
12282
12605
|
};
|
|
12283
12606
|
|
|
12607
|
+
/**
|
|
12608
|
+
* Required. The threshold for blocking content. If the harm probability
|
|
12609
|
+
*
|
|
12610
|
+
* @remarks
|
|
12611
|
+
* exceeds this threshold, the content will be blocked.
|
|
12612
|
+
*/
|
|
12613
|
+
declare type Threshold = "block_low_and_above" | "block_medium_and_above" | "block_only_high" | "block_none" | "off" | (string & {});
|
|
12614
|
+
|
|
12284
12615
|
export declare class Tokens extends BaseModule {
|
|
12285
12616
|
private readonly apiClient;
|
|
12286
12617
|
constructor(apiClient: ApiClient);
|
|
@@ -12410,6 +12741,8 @@ export declare interface Tool {
|
|
|
12410
12741
|
urlContext?: UrlContext;
|
|
12411
12742
|
/** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
|
|
12412
12743
|
mcpServers?: McpServer[];
|
|
12744
|
+
/** 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. */
|
|
12745
|
+
exaAiSearch?: ToolExaAiSearch;
|
|
12413
12746
|
}
|
|
12414
12747
|
|
|
12415
12748
|
/**
|
|
@@ -12474,6 +12807,14 @@ export declare interface ToolConfig {
|
|
|
12474
12807
|
includeServerSideToolInvocations?: boolean;
|
|
12475
12808
|
}
|
|
12476
12809
|
|
|
12810
|
+
/** ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. This data type is not supported in Gemini API. */
|
|
12811
|
+
export declare interface ToolExaAiSearch {
|
|
12812
|
+
/** Required. The API key for ExaAiSearch. */
|
|
12813
|
+
apiKey?: string;
|
|
12814
|
+
/** Optional. This field can be used to pass any parameter from the Exa.ai Search API. */
|
|
12815
|
+
customConfigs?: Record<string, unknown>;
|
|
12816
|
+
}
|
|
12817
|
+
|
|
12477
12818
|
export declare type ToolListUnion = ToolUnion[];
|
|
12478
12819
|
|
|
12479
12820
|
/** ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. This data type is not supported in Gemini API. */
|
|
@@ -12565,14 +12906,27 @@ export declare interface Transcription {
|
|
|
12565
12906
|
languageCode?: string;
|
|
12566
12907
|
}
|
|
12567
12908
|
|
|
12909
|
+
/**
|
|
12910
|
+
* @license
|
|
12911
|
+
* Copyright 2026 Google LLC
|
|
12912
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
12913
|
+
*
|
|
12914
|
+
* g3-prettier-ignore-file
|
|
12915
|
+
*/
|
|
12916
|
+
/**
|
|
12917
|
+
* 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.
|
|
12918
|
+
*/
|
|
12919
|
+
declare type Transform = {
|
|
12920
|
+
[k: string]: string;
|
|
12921
|
+
} | Array<{
|
|
12922
|
+
[k: string]: string;
|
|
12923
|
+
}>;
|
|
12924
|
+
|
|
12568
12925
|
/** Config for stream translation. */
|
|
12569
12926
|
export declare interface TranslationConfig {
|
|
12570
|
-
/** If true, the model will generate audio when the target language is
|
|
12571
|
-
spoken, essentially it will parrot the input. If false, we will not produce
|
|
12572
|
-
audio for the target language. */
|
|
12927
|
+
/** 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. */
|
|
12573
12928
|
echoTargetLanguage?: boolean;
|
|
12574
|
-
/** The target language for translation. Supported values are BCP-47
|
|
12575
|
-
language codes (e.g. "en", "es", "fr"). */
|
|
12929
|
+
/** Required. The target language for translation. Supported values are BCP-47 language codes (e.g. "en", "es", "fr"). */
|
|
12576
12930
|
targetLanguageCode?: string;
|
|
12577
12931
|
}
|
|
12578
12932
|
|
|
@@ -12640,6 +12994,8 @@ export declare interface TuningDataStats {
|
|
|
12640
12994
|
preferenceOptimizationDataStats?: PreferenceOptimizationDataStats;
|
|
12641
12995
|
/** The SFT Tuning data stats. */
|
|
12642
12996
|
supervisedTuningDataStats?: SupervisedTuningDataStats;
|
|
12997
|
+
/** Output only. Statistics for reinforcement tuning. */
|
|
12998
|
+
reinforcementTuningDataStats?: DatasetStats;
|
|
12643
12999
|
}
|
|
12644
13000
|
|
|
12645
13001
|
/** A single example for tuning. This data type is not supported in Vertex AI. */
|
|
@@ -12682,6 +13038,7 @@ export declare interface TuningJob {
|
|
|
12682
13038
|
preferenceOptimizationSpec?: PreferenceOptimizationSpec;
|
|
12683
13039
|
/** Tuning Spec for Distillation. */
|
|
12684
13040
|
distillationSpec?: DistillationSpec;
|
|
13041
|
+
/** Tuning Spec for Reinforcement Tuning. */
|
|
12685
13042
|
reinforcementTuningSpec?: ReinforcementTuningSpec;
|
|
12686
13043
|
/** Output only. The tuning data statistics associated with this TuningJob. */
|
|
12687
13044
|
tuningDataStats?: TuningDataStats;
|
|
@@ -12908,6 +13265,7 @@ export declare interface TuningValidationDataset {
|
|
|
12908
13265
|
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
12909
13266
|
*/
|
|
12910
13267
|
declare type Turn = {
|
|
13268
|
+
content?: Array<Content_2> | string | undefined;
|
|
12911
13269
|
/**
|
|
12912
13270
|
* The originator of this turn. Must be user for input or model for
|
|
12913
13271
|
*
|
|
@@ -12915,7 +13273,6 @@ declare type Turn = {
|
|
|
12915
13273
|
* model output.
|
|
12916
13274
|
*/
|
|
12917
13275
|
role?: string | undefined;
|
|
12918
|
-
content?: Array<Content_2> | string | undefined;
|
|
12919
13276
|
};
|
|
12920
13277
|
|
|
12921
13278
|
/** The reason why the turn is complete. */
|
|
@@ -13134,8 +13491,14 @@ declare namespace types {
|
|
|
13134
13491
|
ModelStage,
|
|
13135
13492
|
MediaResolution,
|
|
13136
13493
|
Modality,
|
|
13494
|
+
Delivery,
|
|
13495
|
+
AspectRatio,
|
|
13496
|
+
ImageSize,
|
|
13137
13497
|
TuningMode,
|
|
13138
13498
|
AdapterSize,
|
|
13499
|
+
ResponseParseType,
|
|
13500
|
+
MatchOperation,
|
|
13501
|
+
ReinforcementTuningThinkingLevel,
|
|
13139
13502
|
JobState,
|
|
13140
13503
|
TuningJobState,
|
|
13141
13504
|
AggregationMetric,
|
|
@@ -13161,9 +13524,6 @@ declare namespace types {
|
|
|
13161
13524
|
VideoGenerationMaskMode,
|
|
13162
13525
|
VideoCompressionQuality,
|
|
13163
13526
|
ImageResizeMode,
|
|
13164
|
-
ResponseParseType,
|
|
13165
|
-
MatchOperation,
|
|
13166
|
-
ReinforcementTuningThinkingLevel,
|
|
13167
13527
|
TuningMethod,
|
|
13168
13528
|
FileState,
|
|
13169
13529
|
FileSource,
|
|
@@ -13236,7 +13596,9 @@ declare namespace types {
|
|
|
13236
13596
|
UrlContext,
|
|
13237
13597
|
StreamableHttpTransport,
|
|
13238
13598
|
McpServer,
|
|
13599
|
+
ToolExaAiSearch,
|
|
13239
13600
|
Tool,
|
|
13601
|
+
VoiceConsentSignature,
|
|
13240
13602
|
ReplicatedVoiceConfig,
|
|
13241
13603
|
PrebuiltVoiceConfig,
|
|
13242
13604
|
VoiceConfig,
|
|
@@ -13341,6 +13703,12 @@ declare namespace types {
|
|
|
13341
13703
|
DeleteModelConfig,
|
|
13342
13704
|
DeleteModelParameters,
|
|
13343
13705
|
DeleteModelResponse,
|
|
13706
|
+
AudioResponseFormat,
|
|
13707
|
+
ImageResponseFormat,
|
|
13708
|
+
TextResponseFormat,
|
|
13709
|
+
VideoResponseFormat,
|
|
13710
|
+
ResponseFormat,
|
|
13711
|
+
TranslationConfig,
|
|
13344
13712
|
GenerationConfig,
|
|
13345
13713
|
CountTokensConfig,
|
|
13346
13714
|
CountTokensParameters,
|
|
@@ -13390,6 +13758,8 @@ declare namespace types {
|
|
|
13390
13758
|
PreTunedModel,
|
|
13391
13759
|
DatasetDistributionDistributionBucket,
|
|
13392
13760
|
DatasetDistribution,
|
|
13761
|
+
ReinforcementTuningExample,
|
|
13762
|
+
ReinforcementTuningUserDatasetExamples,
|
|
13393
13763
|
DatasetStats,
|
|
13394
13764
|
DistillationDataStats,
|
|
13395
13765
|
GeminiPreferenceExampleCompletion,
|
|
@@ -13435,7 +13805,6 @@ declare namespace types {
|
|
|
13435
13805
|
CreateTuningJobConfig,
|
|
13436
13806
|
CreateTuningJobParametersPrivate,
|
|
13437
13807
|
TuningOperation,
|
|
13438
|
-
ReinforcementTuningExample,
|
|
13439
13808
|
ValidateRewardConfig,
|
|
13440
13809
|
ValidateRewardParameters,
|
|
13441
13810
|
ReinforcementTuningRewardInfo,
|
|
@@ -13579,7 +13948,6 @@ declare namespace types {
|
|
|
13579
13948
|
LiveClientRealtimeInput,
|
|
13580
13949
|
LiveClientToolResponse,
|
|
13581
13950
|
LiveClientMessage,
|
|
13582
|
-
TranslationConfig,
|
|
13583
13951
|
LiveConnectConfig,
|
|
13584
13952
|
LiveConnectParameters,
|
|
13585
13953
|
CreateChatParameters,
|
|
@@ -13891,15 +14259,10 @@ declare type URLCitation$ = URLCitation;
|
|
|
13891
14259
|
* A URL citation annotation.
|
|
13892
14260
|
*/
|
|
13893
14261
|
declare type URLCitation = {
|
|
13894
|
-
type: "url_citation";
|
|
13895
|
-
/**
|
|
13896
|
-
* The URL.
|
|
13897
|
-
*/
|
|
13898
|
-
url?: string | undefined;
|
|
13899
14262
|
/**
|
|
13900
|
-
*
|
|
14263
|
+
* End of the attributed segment, exclusive.
|
|
13901
14264
|
*/
|
|
13902
|
-
|
|
14265
|
+
end_index?: number | undefined;
|
|
13903
14266
|
/**
|
|
13904
14267
|
* Start of segment of the response that is attributed to this source.
|
|
13905
14268
|
*
|
|
@@ -13909,9 +14272,14 @@ declare type URLCitation = {
|
|
|
13909
14272
|
*/
|
|
13910
14273
|
start_index?: number | undefined;
|
|
13911
14274
|
/**
|
|
13912
|
-
*
|
|
14275
|
+
* The title of the URL.
|
|
13913
14276
|
*/
|
|
13914
|
-
|
|
14277
|
+
title?: string | undefined;
|
|
14278
|
+
type: "url_citation";
|
|
14279
|
+
/**
|
|
14280
|
+
* The URL.
|
|
14281
|
+
*/
|
|
14282
|
+
url?: string | undefined;
|
|
13915
14283
|
};
|
|
13916
14284
|
|
|
13917
14285
|
declare type URLContext$ = URLContext;
|
|
@@ -13956,7 +14324,6 @@ declare type URLContextCallArguments = {
|
|
|
13956
14324
|
};
|
|
13957
14325
|
|
|
13958
14326
|
declare type URLContextCallDelta = {
|
|
13959
|
-
type: "url_context_call";
|
|
13960
14327
|
/**
|
|
13961
14328
|
* The arguments to pass to the URL context.
|
|
13962
14329
|
*/
|
|
@@ -13965,6 +14332,7 @@ declare type URLContextCallDelta = {
|
|
|
13965
14332
|
* A signature hash for backend validation.
|
|
13966
14333
|
*/
|
|
13967
14334
|
signature?: string | undefined;
|
|
14335
|
+
type: "url_context_call";
|
|
13968
14336
|
};
|
|
13969
14337
|
|
|
13970
14338
|
declare type URLContextCallStep$ = URLContextCallStep;
|
|
@@ -13973,7 +14341,10 @@ declare type URLContextCallStep$ = URLContextCallStep;
|
|
|
13973
14341
|
* URL context call step.
|
|
13974
14342
|
*/
|
|
13975
14343
|
declare type URLContextCallStep = {
|
|
13976
|
-
|
|
14344
|
+
/**
|
|
14345
|
+
* The arguments to pass to the URL context.
|
|
14346
|
+
*/
|
|
14347
|
+
arguments: URLContextCallArguments;
|
|
13977
14348
|
/**
|
|
13978
14349
|
* Required. A unique ID for this specific tool call.
|
|
13979
14350
|
*/
|
|
@@ -13982,10 +14353,7 @@ declare type URLContextCallStep = {
|
|
|
13982
14353
|
* A signature hash for backend validation.
|
|
13983
14354
|
*/
|
|
13984
14355
|
signature?: string | undefined;
|
|
13985
|
-
|
|
13986
|
-
* The arguments to pass to the URL context.
|
|
13987
|
-
*/
|
|
13988
|
-
arguments: Arguments;
|
|
14356
|
+
type: "url_context_call";
|
|
13989
14357
|
};
|
|
13990
14358
|
|
|
13991
14359
|
/** Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL. */
|
|
@@ -14002,24 +14370,24 @@ declare type URLContextResult$2 = URLContextResultDelta;
|
|
|
14002
14370
|
* The result of the URL context.
|
|
14003
14371
|
*/
|
|
14004
14372
|
declare type URLContextResult = {
|
|
14005
|
-
/**
|
|
14006
|
-
* The URL that was fetched.
|
|
14007
|
-
*/
|
|
14008
|
-
url?: string | undefined;
|
|
14009
14373
|
/**
|
|
14010
14374
|
* The status of the URL retrieval.
|
|
14011
14375
|
*/
|
|
14012
14376
|
status?: URLContextResultStatus | undefined;
|
|
14377
|
+
/**
|
|
14378
|
+
* The URL that was fetched.
|
|
14379
|
+
*/
|
|
14380
|
+
url?: string | undefined;
|
|
14013
14381
|
};
|
|
14014
14382
|
|
|
14015
14383
|
declare type URLContextResultDelta = {
|
|
14016
|
-
type: "url_context_result";
|
|
14017
|
-
result: Array<URLContextResult>;
|
|
14018
14384
|
is_error?: boolean | undefined;
|
|
14385
|
+
result: Array<URLContextResult>;
|
|
14019
14386
|
/**
|
|
14020
14387
|
* A signature hash for backend validation.
|
|
14021
14388
|
*/
|
|
14022
14389
|
signature?: string | undefined;
|
|
14390
|
+
type: "url_context_result";
|
|
14023
14391
|
};
|
|
14024
14392
|
|
|
14025
14393
|
/**
|
|
@@ -14040,23 +14408,23 @@ declare type URLContextResultStep$ = URLContextResultStep;
|
|
|
14040
14408
|
* URL context result step.
|
|
14041
14409
|
*/
|
|
14042
14410
|
declare type URLContextResultStep = {
|
|
14043
|
-
type: "url_context_result";
|
|
14044
14411
|
/**
|
|
14045
|
-
* Required.
|
|
14412
|
+
* Required. ID to match the ID from the function call block.
|
|
14046
14413
|
*/
|
|
14047
|
-
|
|
14414
|
+
call_id: string;
|
|
14048
14415
|
/**
|
|
14049
14416
|
* Whether the URL context resulted in an error.
|
|
14050
14417
|
*/
|
|
14051
14418
|
is_error?: boolean | undefined;
|
|
14052
14419
|
/**
|
|
14053
|
-
* Required.
|
|
14420
|
+
* Required. The results of the URL context.
|
|
14054
14421
|
*/
|
|
14055
|
-
|
|
14422
|
+
result: Array<URLContextResult>;
|
|
14056
14423
|
/**
|
|
14057
14424
|
* A signature hash for backend validation.
|
|
14058
14425
|
*/
|
|
14059
14426
|
signature?: string | undefined;
|
|
14427
|
+
type: "url_context_result";
|
|
14060
14428
|
};
|
|
14061
14429
|
|
|
14062
14430
|
/** The metadata for a single URL retrieval. */
|
|
@@ -14098,37 +14466,37 @@ declare type Usage$ = Usage;
|
|
|
14098
14466
|
*/
|
|
14099
14467
|
declare type Usage = {
|
|
14100
14468
|
/**
|
|
14101
|
-
*
|
|
14469
|
+
* A breakdown of cached token usage by modality.
|
|
14102
14470
|
*/
|
|
14103
|
-
|
|
14471
|
+
cached_tokens_by_modality?: Array<ModalityTokens> | undefined;
|
|
14104
14472
|
/**
|
|
14105
|
-
*
|
|
14473
|
+
* Grounding tool count.
|
|
14106
14474
|
*/
|
|
14107
|
-
|
|
14475
|
+
grounding_tool_count?: Array<GroundingToolCount> | undefined;
|
|
14108
14476
|
/**
|
|
14109
|
-
*
|
|
14477
|
+
* A breakdown of input token usage by modality.
|
|
14110
14478
|
*/
|
|
14111
|
-
|
|
14479
|
+
input_tokens_by_modality?: Array<ModalityTokens> | undefined;
|
|
14112
14480
|
/**
|
|
14113
|
-
* A breakdown of
|
|
14481
|
+
* A breakdown of output token usage by modality.
|
|
14114
14482
|
*/
|
|
14115
|
-
|
|
14483
|
+
output_tokens_by_modality?: Array<ModalityTokens> | undefined;
|
|
14116
14484
|
/**
|
|
14117
|
-
*
|
|
14485
|
+
* A breakdown of tool-use token usage by modality.
|
|
14118
14486
|
*/
|
|
14119
|
-
|
|
14487
|
+
tool_use_tokens_by_modality?: Array<ModalityTokens> | undefined;
|
|
14120
14488
|
/**
|
|
14121
|
-
*
|
|
14489
|
+
* Number of tokens in the cached part of the prompt (the cached content).
|
|
14122
14490
|
*/
|
|
14123
|
-
|
|
14491
|
+
total_cached_tokens?: number | undefined;
|
|
14124
14492
|
/**
|
|
14125
|
-
* Number of tokens
|
|
14493
|
+
* Number of tokens in the prompt (context).
|
|
14126
14494
|
*/
|
|
14127
|
-
|
|
14495
|
+
total_input_tokens?: number | undefined;
|
|
14128
14496
|
/**
|
|
14129
|
-
*
|
|
14497
|
+
* Total number of tokens across all the generated responses.
|
|
14130
14498
|
*/
|
|
14131
|
-
|
|
14499
|
+
total_output_tokens?: number | undefined;
|
|
14132
14500
|
/**
|
|
14133
14501
|
* Number of tokens of thoughts for thinking models.
|
|
14134
14502
|
*/
|
|
@@ -14141,9 +14509,9 @@ declare type Usage = {
|
|
|
14141
14509
|
*/
|
|
14142
14510
|
total_tokens?: number | undefined;
|
|
14143
14511
|
/**
|
|
14144
|
-
*
|
|
14512
|
+
* Number of tokens present in tool-use prompt(s).
|
|
14145
14513
|
*/
|
|
14146
|
-
|
|
14514
|
+
total_tool_use_tokens?: number | undefined;
|
|
14147
14515
|
};
|
|
14148
14516
|
|
|
14149
14517
|
/** Usage metadata about response(s). */
|
|
@@ -14312,14 +14680,14 @@ declare type VertexAISearchConfig$ = VertexAISearchConfig;
|
|
|
14312
14680
|
* Used to specify configuration for VertexAISearch.
|
|
14313
14681
|
*/
|
|
14314
14682
|
declare type VertexAISearchConfig = {
|
|
14315
|
-
/**
|
|
14316
|
-
* Optional. Used to specify Vertex AI Search engine.
|
|
14317
|
-
*/
|
|
14318
|
-
engine?: string | undefined;
|
|
14319
14683
|
/**
|
|
14320
14684
|
* Optional. Used to specify Vertex AI Search datastores.
|
|
14321
14685
|
*/
|
|
14322
14686
|
datastores?: Array<string> | undefined;
|
|
14687
|
+
/**
|
|
14688
|
+
* Optional. Used to specify Vertex AI Search engine.
|
|
14689
|
+
*/
|
|
14690
|
+
engine?: string | undefined;
|
|
14323
14691
|
};
|
|
14324
14692
|
|
|
14325
14693
|
/** 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. */
|
|
@@ -14413,20 +14781,20 @@ declare type VideoContent$ = VideoContent;
|
|
|
14413
14781
|
* A video content block.
|
|
14414
14782
|
*/
|
|
14415
14783
|
declare type VideoContent = {
|
|
14416
|
-
type: "video";
|
|
14417
14784
|
/**
|
|
14418
14785
|
* The video content.
|
|
14419
14786
|
*/
|
|
14420
14787
|
data?: string | undefined;
|
|
14421
|
-
/**
|
|
14422
|
-
* The URI of the video.
|
|
14423
|
-
*/
|
|
14424
|
-
uri?: string | undefined;
|
|
14425
14788
|
/**
|
|
14426
14789
|
* The mime type of the video.
|
|
14427
14790
|
*/
|
|
14428
14791
|
mime_type?: VideoContentMimeType | undefined;
|
|
14429
14792
|
resolution?: MediaResolution_2 | undefined;
|
|
14793
|
+
type: "video";
|
|
14794
|
+
/**
|
|
14795
|
+
* The URI of the video.
|
|
14796
|
+
*/
|
|
14797
|
+
uri?: string | undefined;
|
|
14430
14798
|
};
|
|
14431
14799
|
|
|
14432
14800
|
/**
|
|
@@ -14435,11 +14803,11 @@ declare type VideoContent = {
|
|
|
14435
14803
|
declare type VideoContentMimeType = "video/mp4" | "video/mpeg" | "video/mpg" | "video/mov" | "video/avi" | "video/x-flv" | "video/webm" | "video/wmv" | "video/3gpp" | (string & {});
|
|
14436
14804
|
|
|
14437
14805
|
declare type VideoDelta = {
|
|
14438
|
-
type: "video";
|
|
14439
14806
|
data?: string | undefined;
|
|
14440
|
-
uri?: string | undefined;
|
|
14441
14807
|
mime_type?: VideoDeltaMimeType | undefined;
|
|
14442
14808
|
resolution?: MediaResolution_2 | undefined;
|
|
14809
|
+
type: "video";
|
|
14810
|
+
uri?: string | undefined;
|
|
14443
14811
|
};
|
|
14444
14812
|
|
|
14445
14813
|
declare type VideoDeltaMimeType = "video/mp4" | "video/mpeg" | "video/mpg" | "video/mov" | "video/avi" | "video/x-flv" | "video/webm" | "video/wmv" | "video/3gpp" | (string & {});
|
|
@@ -14531,17 +14899,36 @@ export declare enum VideoOrientation {
|
|
|
14531
14899
|
PORTRAIT = "PORTRAIT"
|
|
14532
14900
|
}
|
|
14533
14901
|
|
|
14534
|
-
declare type VideoResponseFormat$ =
|
|
14902
|
+
declare type VideoResponseFormat$ = VideoResponseFormat_2;
|
|
14903
|
+
|
|
14904
|
+
/** Configuration for video-specific output formatting. This data type is not supported in Gemini API. */
|
|
14905
|
+
export declare class VideoResponseFormat {
|
|
14906
|
+
/** The aspect ratio for the video output. */
|
|
14907
|
+
aspectRatio?: AspectRatio;
|
|
14908
|
+
/** Optional. Delivery mode for the generated content. */
|
|
14909
|
+
delivery?: Delivery;
|
|
14910
|
+
/** Optional. The duration for the video output. */
|
|
14911
|
+
duration?: string;
|
|
14912
|
+
/** Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI. */
|
|
14913
|
+
gcsUri?: string;
|
|
14914
|
+
}
|
|
14535
14915
|
|
|
14536
14916
|
/**
|
|
14537
14917
|
* Configuration for video output format.
|
|
14538
14918
|
*/
|
|
14539
|
-
declare type
|
|
14540
|
-
|
|
14919
|
+
declare type VideoResponseFormat_2 = {
|
|
14920
|
+
/**
|
|
14921
|
+
* The aspect ratio for the video output.
|
|
14922
|
+
*/
|
|
14923
|
+
aspect_ratio?: VideoResponseFormatAspectRatio | undefined;
|
|
14541
14924
|
/**
|
|
14542
14925
|
* The delivery mode for the video output.
|
|
14543
14926
|
*/
|
|
14544
14927
|
delivery?: VideoResponseFormatDelivery | undefined;
|
|
14928
|
+
/**
|
|
14929
|
+
* The duration for the video output.
|
|
14930
|
+
*/
|
|
14931
|
+
duration?: string | undefined;
|
|
14545
14932
|
/**
|
|
14546
14933
|
* The GCS URI to store the video output. Required for Vertex if delivery mode
|
|
14547
14934
|
*
|
|
@@ -14549,21 +14936,9 @@ declare type VideoResponseFormat = {
|
|
|
14549
14936
|
* is URI.
|
|
14550
14937
|
*/
|
|
14551
14938
|
gcs_uri?: string | undefined;
|
|
14552
|
-
|
|
14553
|
-
* The aspect ratio for the video output.
|
|
14554
|
-
*/
|
|
14555
|
-
aspect_ratio?: VideoResponseFormatAspectRatio | undefined;
|
|
14556
|
-
/**
|
|
14557
|
-
* The duration for the video output.
|
|
14558
|
-
*/
|
|
14559
|
-
duration?: string | undefined;
|
|
14939
|
+
type: "video";
|
|
14560
14940
|
};
|
|
14561
14941
|
|
|
14562
|
-
/**
|
|
14563
|
-
* The aspect ratio for the video output.
|
|
14564
|
-
*/
|
|
14565
|
-
declare type VideoResponseFormatAspectRatio = "16:9" | "9:16" | (string & {});
|
|
14566
|
-
|
|
14567
14942
|
/**
|
|
14568
14943
|
* @license
|
|
14569
14944
|
* Copyright 2026 Google LLC
|
|
@@ -14571,6 +14946,11 @@ declare type VideoResponseFormatAspectRatio = "16:9" | "9:16" | (string & {});
|
|
|
14571
14946
|
*
|
|
14572
14947
|
* g3-prettier-ignore-file
|
|
14573
14948
|
*/
|
|
14949
|
+
/**
|
|
14950
|
+
* The aspect ratio for the video output.
|
|
14951
|
+
*/
|
|
14952
|
+
declare type VideoResponseFormatAspectRatio = "16:9" | "9:16" | (string & {});
|
|
14953
|
+
|
|
14574
14954
|
/**
|
|
14575
14955
|
* The delivery mode for the video output.
|
|
14576
14956
|
*/
|
|
@@ -14620,20 +15000,43 @@ export declare interface VoiceConfig {
|
|
|
14620
15000
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
14621
15001
|
}
|
|
14622
15002
|
|
|
15003
|
+
/** The signature of the voice consent check. */
|
|
15004
|
+
export declare interface VoiceConsentSignature {
|
|
15005
|
+
/** The signature string.
|
|
15006
|
+
*/
|
|
15007
|
+
signature?: string;
|
|
15008
|
+
}
|
|
15009
|
+
|
|
14623
15010
|
declare type Webhook$ = Webhook;
|
|
14624
15011
|
|
|
14625
15012
|
/**
|
|
14626
15013
|
* A Webhook resource.
|
|
14627
15014
|
*/
|
|
14628
15015
|
declare type Webhook = {
|
|
15016
|
+
/**
|
|
15017
|
+
* Output only. The timestamp when the webhook was created.
|
|
15018
|
+
*/
|
|
15019
|
+
create_time?: string | undefined;
|
|
15020
|
+
/**
|
|
15021
|
+
* Output only. The ID of the webhook.
|
|
15022
|
+
*/
|
|
15023
|
+
id?: string | undefined;
|
|
14629
15024
|
/**
|
|
14630
15025
|
* Optional. The user-provided name of the webhook.
|
|
14631
15026
|
*/
|
|
14632
15027
|
name?: string | undefined;
|
|
14633
15028
|
/**
|
|
14634
|
-
*
|
|
15029
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
14635
15030
|
*/
|
|
14636
|
-
|
|
15031
|
+
new_signing_secret?: string | undefined;
|
|
15032
|
+
/**
|
|
15033
|
+
* Output only. The signing secrets associated with this webhook.
|
|
15034
|
+
*/
|
|
15035
|
+
signing_secrets?: Array<SigningSecret> | undefined;
|
|
15036
|
+
/**
|
|
15037
|
+
* Output only. The state of the webhook.
|
|
15038
|
+
*/
|
|
15039
|
+
state?: WebhookState | undefined;
|
|
14637
15040
|
/**
|
|
14638
15041
|
* Required. The events that the webhook is subscribed to.
|
|
14639
15042
|
*
|
|
@@ -14648,30 +15051,14 @@ declare type Webhook = {
|
|
|
14648
15051
|
* - video.generated
|
|
14649
15052
|
*/
|
|
14650
15053
|
subscribed_events: Array<WebhookSubscribedEvent>;
|
|
14651
|
-
/**
|
|
14652
|
-
* Output only. The timestamp when the webhook was created.
|
|
14653
|
-
*/
|
|
14654
|
-
create_time?: string | undefined;
|
|
14655
15054
|
/**
|
|
14656
15055
|
* Output only. The timestamp when the webhook was last updated.
|
|
14657
15056
|
*/
|
|
14658
15057
|
update_time?: string | undefined;
|
|
14659
15058
|
/**
|
|
14660
|
-
*
|
|
14661
|
-
*/
|
|
14662
|
-
signing_secrets?: Array<SigningSecret> | undefined;
|
|
14663
|
-
/**
|
|
14664
|
-
* Output only. The state of the webhook.
|
|
14665
|
-
*/
|
|
14666
|
-
state?: WebhookState | undefined;
|
|
14667
|
-
/**
|
|
14668
|
-
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
14669
|
-
*/
|
|
14670
|
-
new_signing_secret?: string | undefined;
|
|
14671
|
-
/**
|
|
14672
|
-
* Output only. The ID of the webhook.
|
|
15059
|
+
* Required. The URI to which webhook events will be sent.
|
|
14673
15060
|
*/
|
|
14674
|
-
|
|
15061
|
+
uri: string;
|
|
14675
15062
|
};
|
|
14676
15063
|
|
|
14677
15064
|
declare type WebhookConfig$ = WebhookConfig_2;
|
|
@@ -14737,10 +15124,6 @@ declare type WebhookInput = {
|
|
|
14737
15124
|
* Optional. The user-provided name of the webhook.
|
|
14738
15125
|
*/
|
|
14739
15126
|
name?: string | undefined;
|
|
14740
|
-
/**
|
|
14741
|
-
* Required. The URI to which webhook events will be sent.
|
|
14742
|
-
*/
|
|
14743
|
-
uri: string;
|
|
14744
15127
|
/**
|
|
14745
15128
|
* Required. The events that the webhook is subscribed to.
|
|
14746
15129
|
*
|
|
@@ -14755,6 +15138,10 @@ declare type WebhookInput = {
|
|
|
14755
15138
|
* - video.generated
|
|
14756
15139
|
*/
|
|
14757
15140
|
subscribed_events: Array<WebhookSubscribedEvent>;
|
|
15141
|
+
/**
|
|
15142
|
+
* Required. The URI to which webhook events will be sent.
|
|
15143
|
+
*/
|
|
15144
|
+
uri: string;
|
|
14758
15145
|
};
|
|
14759
15146
|
|
|
14760
15147
|
declare type WebhookListParams$ = ListWebhooksParams;
|
|
@@ -14771,10 +15158,6 @@ declare type WebhookListResponse$ = WebhookListResponse;
|
|
|
14771
15158
|
* Response message for WebhookService.ListWebhooks.
|
|
14772
15159
|
*/
|
|
14773
15160
|
declare type WebhookListResponse = {
|
|
14774
|
-
/**
|
|
14775
|
-
* The webhooks.
|
|
14776
|
-
*/
|
|
14777
|
-
webhooks?: Array<Webhook> | undefined;
|
|
14778
15161
|
/**
|
|
14779
15162
|
* A token, which can be sent as `page_token` to retrieve the next page.
|
|
14780
15163
|
*
|
|
@@ -14782,6 +15165,10 @@ declare type WebhookListResponse = {
|
|
|
14782
15165
|
* If this field is omitted, there are no subsequent pages.
|
|
14783
15166
|
*/
|
|
14784
15167
|
next_page_token?: string | undefined;
|
|
15168
|
+
/**
|
|
15169
|
+
* The webhooks.
|
|
15170
|
+
*/
|
|
15171
|
+
webhooks?: Array<Webhook> | undefined;
|
|
14785
15172
|
};
|
|
14786
15173
|
|
|
14787
15174
|
declare type WebhookPingParams$ = PingWebhookRequest;
|
|
@@ -14859,11 +15246,11 @@ declare namespace webhooks {
|
|
|
14859
15246
|
WebhookListResponse,
|
|
14860
15247
|
WebhookPingResponse,
|
|
14861
15248
|
WebhookRotateSigningSecretResponse,
|
|
14862
|
-
WebhookUpdateSubscribedEvent,
|
|
14863
15249
|
WebhookUpdateState,
|
|
15250
|
+
WebhookUpdateSubscribedEvent,
|
|
14864
15251
|
WebhookUpdate,
|
|
14865
|
-
WebhookSubscribedEvent,
|
|
14866
15252
|
WebhookState,
|
|
15253
|
+
WebhookSubscribedEvent,
|
|
14867
15254
|
Webhook,
|
|
14868
15255
|
WebhookInput
|
|
14869
15256
|
}
|
|
@@ -14884,9 +15271,9 @@ declare type WebhookUpdate = {
|
|
|
14884
15271
|
*/
|
|
14885
15272
|
name?: string | undefined;
|
|
14886
15273
|
/**
|
|
14887
|
-
* Optional. The
|
|
15274
|
+
* Optional. The state of the webhook.
|
|
14888
15275
|
*/
|
|
14889
|
-
|
|
15276
|
+
state?: WebhookUpdateState | undefined;
|
|
14890
15277
|
/**
|
|
14891
15278
|
* Optional. The events that the webhook is subscribed to.
|
|
14892
15279
|
*
|
|
@@ -14902,9 +15289,9 @@ declare type WebhookUpdate = {
|
|
|
14902
15289
|
*/
|
|
14903
15290
|
subscribed_events?: Array<WebhookUpdateSubscribedEvent> | undefined;
|
|
14904
15291
|
/**
|
|
14905
|
-
* Optional. The
|
|
15292
|
+
* Optional. The URI to which webhook events will be sent.
|
|
14906
15293
|
*/
|
|
14907
|
-
|
|
15294
|
+
uri?: string | undefined;
|
|
14908
15295
|
};
|
|
14909
15296
|
|
|
14910
15297
|
declare type WebhookUpdateParams$ = WebhookUpdate;
|
|
@@ -14914,11 +15301,6 @@ declare type WebhookUpdateParams = {
|
|
|
14914
15301
|
update_mask?: string;
|
|
14915
15302
|
} & webhooks.WebhookUpdate;
|
|
14916
15303
|
|
|
14917
|
-
/**
|
|
14918
|
-
* Optional. The state of the webhook.
|
|
14919
|
-
*/
|
|
14920
|
-
declare type WebhookUpdateState = "enabled" | "disabled" | "disabled_due_to_failed_deliveries";
|
|
14921
|
-
|
|
14922
15304
|
/**
|
|
14923
15305
|
* @license
|
|
14924
15306
|
* Copyright 2026 Google LLC
|
|
@@ -14926,6 +15308,11 @@ declare type WebhookUpdateState = "enabled" | "disabled" | "disabled_due_to_fail
|
|
|
14926
15308
|
*
|
|
14927
15309
|
* g3-prettier-ignore-file
|
|
14928
15310
|
*/
|
|
15311
|
+
/**
|
|
15312
|
+
* Optional. The state of the webhook.
|
|
15313
|
+
*/
|
|
15314
|
+
declare type WebhookUpdateState = "enabled" | "disabled" | "disabled_due_to_failed_deliveries";
|
|
15315
|
+
|
|
14929
15316
|
declare type WebhookUpdateSubscribedEvent = "batch.succeeded" | "batch.expired" | "batch.failed" | "interaction.requires_action" | "interaction.completed" | "interaction.failed" | "video.generated" | (string & {});
|
|
14930
15317
|
|
|
14931
15318
|
/** Standard web search for grounding and related configurations. Only text results are returned. */
|