@google/genai 1.42.0 → 1.44.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 +910 -378
- package/dist/index.cjs +651 -402
- package/dist/index.mjs +651 -403
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +652 -403
- package/dist/node/index.mjs +652 -404
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +910 -378
- package/dist/tokenizer/node.cjs +207 -87
- package/dist/tokenizer/node.d.ts +144 -86
- package/dist/tokenizer/node.mjs +207 -87
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/web/index.mjs +651 -403
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +910 -378
- package/package.json +5 -1
package/dist/genai.d.ts
CHANGED
|
@@ -66,6 +66,80 @@ export declare enum AdapterSize {
|
|
|
66
66
|
ADAPTER_SIZE_THIRTY_TWO = "ADAPTER_SIZE_THIRTY_TWO"
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
/** Aggregation metric. This enum is not supported in Gemini API. */
|
|
70
|
+
export declare enum AggregationMetric {
|
|
71
|
+
/**
|
|
72
|
+
* Unspecified aggregation metric.
|
|
73
|
+
*/
|
|
74
|
+
AGGREGATION_METRIC_UNSPECIFIED = "AGGREGATION_METRIC_UNSPECIFIED",
|
|
75
|
+
/**
|
|
76
|
+
* Average aggregation metric. Not supported for Pairwise metric.
|
|
77
|
+
*/
|
|
78
|
+
AVERAGE = "AVERAGE",
|
|
79
|
+
/**
|
|
80
|
+
* Mode aggregation metric.
|
|
81
|
+
*/
|
|
82
|
+
MODE = "MODE",
|
|
83
|
+
/**
|
|
84
|
+
* Standard deviation aggregation metric. Not supported for pairwise metric.
|
|
85
|
+
*/
|
|
86
|
+
STANDARD_DEVIATION = "STANDARD_DEVIATION",
|
|
87
|
+
/**
|
|
88
|
+
* Variance aggregation metric. Not supported for pairwise metric.
|
|
89
|
+
*/
|
|
90
|
+
VARIANCE = "VARIANCE",
|
|
91
|
+
/**
|
|
92
|
+
* Minimum aggregation metric. Not supported for pairwise metric.
|
|
93
|
+
*/
|
|
94
|
+
MINIMUM = "MINIMUM",
|
|
95
|
+
/**
|
|
96
|
+
* Maximum aggregation metric. Not supported for pairwise metric.
|
|
97
|
+
*/
|
|
98
|
+
MAXIMUM = "MAXIMUM",
|
|
99
|
+
/**
|
|
100
|
+
* Median aggregation metric. Not supported for pairwise metric.
|
|
101
|
+
*/
|
|
102
|
+
MEDIAN = "MEDIAN",
|
|
103
|
+
/**
|
|
104
|
+
* 90th percentile aggregation metric. Not supported for pairwise metric.
|
|
105
|
+
*/
|
|
106
|
+
PERCENTILE_P90 = "PERCENTILE_P90",
|
|
107
|
+
/**
|
|
108
|
+
* 95th percentile aggregation metric. Not supported for pairwise metric.
|
|
109
|
+
*/
|
|
110
|
+
PERCENTILE_P95 = "PERCENTILE_P95",
|
|
111
|
+
/**
|
|
112
|
+
* 99th percentile aggregation metric. Not supported for pairwise metric.
|
|
113
|
+
*/
|
|
114
|
+
PERCENTILE_P99 = "PERCENTILE_P99"
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** The aggregation result for the entire dataset and all metrics. This data type is not supported in Gemini API. */
|
|
118
|
+
export declare interface AggregationOutput {
|
|
119
|
+
/** One AggregationResult per metric. */
|
|
120
|
+
aggregationResults?: AggregationResult[];
|
|
121
|
+
/** The dataset used for evaluation & aggregation. */
|
|
122
|
+
dataset?: EvaluationDataset;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** The aggregation result for a single metric. This data type is not supported in Gemini API. */
|
|
126
|
+
export declare interface AggregationResult {
|
|
127
|
+
/** Aggregation metric. */
|
|
128
|
+
aggregationMetric?: AggregationMetric;
|
|
129
|
+
/** Results for bleu metric. */
|
|
130
|
+
bleuMetricValue?: BleuMetricValue;
|
|
131
|
+
/** Result for code execution metric. */
|
|
132
|
+
customCodeExecutionResult?: CustomCodeExecutionResult;
|
|
133
|
+
/** Results for exact match metric. */
|
|
134
|
+
exactMatchMetricValue?: ExactMatchMetricValue;
|
|
135
|
+
/** Result for pairwise metric. */
|
|
136
|
+
pairwiseMetricResult?: PairwiseMetricResult;
|
|
137
|
+
/** Result for pointwise metric. */
|
|
138
|
+
pointwiseMetricResult?: PointwiseMetricResult;
|
|
139
|
+
/** Results for rouge metric. */
|
|
140
|
+
rougeMetricValue?: RougeMetricValue;
|
|
141
|
+
}
|
|
142
|
+
|
|
69
143
|
/**
|
|
70
144
|
* The configuration for allowed tools.
|
|
71
145
|
*/
|
|
@@ -118,6 +192,9 @@ export declare interface ApiAuthApiKeyConfig {
|
|
|
118
192
|
/**
|
|
119
193
|
* The ApiClient class is used to send requests to the Gemini API or Vertex AI
|
|
120
194
|
* endpoints.
|
|
195
|
+
*
|
|
196
|
+
* WARNING: This is an internal API and may change without notice. Direct usage
|
|
197
|
+
* is not supported and may break your application.
|
|
121
198
|
*/
|
|
122
199
|
declare class ApiClient implements GeminiNextGenAPIClientAdapter {
|
|
123
200
|
readonly clientOptions: ApiClientInitOptions;
|
|
@@ -411,18 +488,13 @@ declare interface AudioContent {
|
|
|
411
488
|
/**
|
|
412
489
|
* The mime type of the audio.
|
|
413
490
|
*/
|
|
414
|
-
mime_type?:
|
|
491
|
+
mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac';
|
|
415
492
|
/**
|
|
416
493
|
* The URI of the audio.
|
|
417
494
|
*/
|
|
418
495
|
uri?: string;
|
|
419
496
|
}
|
|
420
497
|
|
|
421
|
-
/**
|
|
422
|
-
* The mime type of the audio.
|
|
423
|
-
*/
|
|
424
|
-
declare type AudioMimeType = 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | (string & {});
|
|
425
|
-
|
|
426
498
|
/** The audio transcription configuration in Setup. */
|
|
427
499
|
export declare interface AudioTranscriptionConfig {
|
|
428
500
|
}
|
|
@@ -445,8 +517,10 @@ declare interface Auth {
|
|
|
445
517
|
addAuthHeaders(headers: Headers, url?: string): Promise<void>;
|
|
446
518
|
}
|
|
447
519
|
|
|
448
|
-
/**
|
|
520
|
+
/** The authentication config to access the API. */
|
|
449
521
|
export declare interface AuthConfig {
|
|
522
|
+
/** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
|
|
523
|
+
apiKey?: string;
|
|
450
524
|
/** Config for API key auth. */
|
|
451
525
|
apiKeyConfig?: ApiKeyConfig;
|
|
452
526
|
/** Type of auth scheme. */
|
|
@@ -1062,12 +1136,24 @@ export declare enum Behavior {
|
|
|
1062
1136
|
NON_BLOCKING = "NON_BLOCKING"
|
|
1063
1137
|
}
|
|
1064
1138
|
|
|
1065
|
-
/**
|
|
1139
|
+
/** The BigQuery location for the input content. This data type is not supported in Gemini API. */
|
|
1140
|
+
export declare interface BigQuerySource {
|
|
1141
|
+
/** Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. */
|
|
1142
|
+
inputUri?: string;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
/** Bleu metric value for an instance. This data type is not supported in Gemini API. */
|
|
1146
|
+
export declare interface BleuMetricValue {
|
|
1147
|
+
/** Output only. Bleu score. */
|
|
1148
|
+
score?: number;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/** A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. */
|
|
1066
1152
|
declare interface Blob_2 {
|
|
1067
|
-
/** Required.
|
|
1153
|
+
/** Required. The raw bytes of the data.
|
|
1068
1154
|
* @remarks Encoded as base64 string. */
|
|
1069
1155
|
data?: string;
|
|
1070
|
-
/** Optional.
|
|
1156
|
+
/** Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled. This field is not supported in Gemini API. */
|
|
1071
1157
|
displayName?: string;
|
|
1072
1158
|
/** Required. The IANA standard MIME type of the source data. */
|
|
1073
1159
|
mimeType?: string;
|
|
@@ -1336,17 +1422,19 @@ export declare interface Candidate {
|
|
|
1336
1422
|
If empty, the model has not stopped generating the tokens.
|
|
1337
1423
|
*/
|
|
1338
1424
|
finishReason?: FinishReason;
|
|
1339
|
-
/** Output only.
|
|
1340
|
-
|
|
1341
|
-
|
|
1425
|
+
/** Output only. Metadata returned when grounding is enabled. It
|
|
1426
|
+
contains the sources used to ground the generated content.
|
|
1427
|
+
*/
|
|
1342
1428
|
groundingMetadata?: GroundingMetadata;
|
|
1343
|
-
/** Output only.
|
|
1429
|
+
/** Output only. The average log probability of the tokens in this candidate. This is a length-normalized score that can be used to compare the quality of candidates of different lengths. A higher average log probability suggests a more confident and coherent response. */
|
|
1430
|
+
avgLogprobs?: number;
|
|
1431
|
+
/** Output only. The 0-based index of this candidate in the list of generated responses. This is useful for distinguishing between multiple candidates when `candidate_count` > 1. */
|
|
1344
1432
|
index?: number;
|
|
1345
|
-
/** Output only.
|
|
1433
|
+
/** Output only. The detailed log probability information for the tokens in this candidate. This is useful for debugging, understanding model uncertainty, and identifying potential "hallucinations". */
|
|
1346
1434
|
logprobsResult?: LogprobsResult;
|
|
1347
|
-
/** Output only.
|
|
1435
|
+
/** Output only. A list of ratings for the safety of a response candidate. There is at most one rating per category. */
|
|
1348
1436
|
safetyRatings?: SafetyRating[];
|
|
1349
|
-
/** Output only. Metadata
|
|
1437
|
+
/** Output only. Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL. */
|
|
1350
1438
|
urlContextMetadata?: UrlContextMetadata;
|
|
1351
1439
|
}
|
|
1352
1440
|
|
|
@@ -1488,19 +1576,19 @@ export declare interface ChunkingConfig {
|
|
|
1488
1576
|
whiteSpaceConfig?: WhiteSpaceConfig;
|
|
1489
1577
|
}
|
|
1490
1578
|
|
|
1491
|
-
/**
|
|
1579
|
+
/** A citation for a piece of generatedcontent. This data type is not supported in Gemini API. */
|
|
1492
1580
|
export declare interface Citation {
|
|
1493
|
-
/** Output only.
|
|
1581
|
+
/** Output only. The end index of the citation in the content. */
|
|
1494
1582
|
endIndex?: number;
|
|
1495
|
-
/** Output only.
|
|
1583
|
+
/** Output only. The license of the source of the citation. */
|
|
1496
1584
|
license?: string;
|
|
1497
|
-
/** Output only.
|
|
1585
|
+
/** Output only. The publication date of the source of the citation. */
|
|
1498
1586
|
publicationDate?: GoogleTypeDate;
|
|
1499
|
-
/** Output only.
|
|
1587
|
+
/** Output only. The start index of the citation in the content. */
|
|
1500
1588
|
startIndex?: number;
|
|
1501
|
-
/** Output only.
|
|
1589
|
+
/** Output only. The title of the source of the citation. */
|
|
1502
1590
|
title?: string;
|
|
1503
|
-
/** Output only.
|
|
1591
|
+
/** Output only. The URI of the source of the citation. */
|
|
1504
1592
|
uri?: string;
|
|
1505
1593
|
}
|
|
1506
1594
|
|
|
@@ -1603,15 +1691,19 @@ declare interface CodeExecutionCallArguments {
|
|
|
1603
1691
|
* Code execution content.
|
|
1604
1692
|
*/
|
|
1605
1693
|
declare interface CodeExecutionCallContent {
|
|
1606
|
-
type: 'code_execution_call';
|
|
1607
1694
|
/**
|
|
1608
1695
|
* A unique ID for this specific tool call.
|
|
1609
1696
|
*/
|
|
1610
|
-
id
|
|
1697
|
+
id: string;
|
|
1611
1698
|
/**
|
|
1612
1699
|
* The arguments to pass to the code execution.
|
|
1613
1700
|
*/
|
|
1614
|
-
arguments
|
|
1701
|
+
arguments: CodeExecutionCallArguments;
|
|
1702
|
+
type: 'code_execution_call';
|
|
1703
|
+
/**
|
|
1704
|
+
* A signature hash for backend validation.
|
|
1705
|
+
*/
|
|
1706
|
+
signature?: string;
|
|
1615
1707
|
}
|
|
1616
1708
|
|
|
1617
1709
|
/** Result of executing the [ExecutableCode]. Only generated when using the [CodeExecution] tool, and always follows a `part` containing the [ExecutableCode]. */
|
|
@@ -1626,19 +1718,19 @@ export declare interface CodeExecutionResult {
|
|
|
1626
1718
|
* Code execution result content.
|
|
1627
1719
|
*/
|
|
1628
1720
|
declare interface CodeExecutionResultContent {
|
|
1629
|
-
type: 'code_execution_result';
|
|
1630
1721
|
/**
|
|
1631
1722
|
* ID to match the ID from the code execution call block.
|
|
1632
1723
|
*/
|
|
1633
|
-
call_id
|
|
1724
|
+
call_id: string;
|
|
1634
1725
|
/**
|
|
1635
|
-
*
|
|
1726
|
+
* The output of the code execution.
|
|
1636
1727
|
*/
|
|
1637
|
-
|
|
1728
|
+
result: string;
|
|
1729
|
+
type: 'code_execution_result';
|
|
1638
1730
|
/**
|
|
1639
|
-
*
|
|
1731
|
+
* Whether the code execution resulted in an error.
|
|
1640
1732
|
*/
|
|
1641
|
-
|
|
1733
|
+
is_error?: boolean;
|
|
1642
1734
|
/**
|
|
1643
1735
|
* A signature hash for backend validation.
|
|
1644
1736
|
*/
|
|
@@ -1720,7 +1812,7 @@ export declare interface Content {
|
|
|
1720
1812
|
/** List of parts that constitute a single message. Each part may have
|
|
1721
1813
|
a different IANA MIME type. */
|
|
1722
1814
|
parts?: Part[];
|
|
1723
|
-
/** Optional. The producer of the content. Must be either 'user' or 'model'.
|
|
1815
|
+
/** Optional. The producer of the content. Must be either 'user' or 'model'. If not set, the service will default to 'user'. */
|
|
1724
1816
|
role?: string;
|
|
1725
1817
|
}
|
|
1726
1818
|
|
|
@@ -1730,31 +1822,28 @@ export declare interface Content {
|
|
|
1730
1822
|
declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
|
|
1731
1823
|
|
|
1732
1824
|
declare interface ContentDelta {
|
|
1825
|
+
delta: ContentDelta.TextDelta | ContentDelta.ImageDelta | ContentDelta.AudioDelta | ContentDelta.DocumentDelta | ContentDelta.VideoDelta | ContentDelta.ThoughtSummaryDelta | ContentDelta.ThoughtSignatureDelta | ContentDelta.FunctionCallDelta | ContentDelta.FunctionResultDelta | ContentDelta.CodeExecutionCallDelta | ContentDelta.CodeExecutionResultDelta | ContentDelta.URLContextCallDelta | ContentDelta.URLContextResultDelta | ContentDelta.GoogleSearchCallDelta | ContentDelta.GoogleSearchResultDelta | ContentDelta.MCPServerToolCallDelta | ContentDelta.MCPServerToolResultDelta | ContentDelta.FileSearchCallDelta | ContentDelta.FileSearchResultDelta;
|
|
1733
1826
|
event_type: 'content.delta';
|
|
1734
|
-
|
|
1827
|
+
index: number;
|
|
1735
1828
|
/**
|
|
1736
1829
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
1737
1830
|
*/
|
|
1738
1831
|
event_id?: string;
|
|
1739
|
-
index?: number;
|
|
1740
1832
|
}
|
|
1741
1833
|
|
|
1742
1834
|
declare namespace ContentDelta {
|
|
1743
1835
|
interface TextDelta {
|
|
1836
|
+
text: string;
|
|
1744
1837
|
type: 'text';
|
|
1745
1838
|
/**
|
|
1746
1839
|
* Citation information for model-generated content.
|
|
1747
1840
|
*/
|
|
1748
1841
|
annotations?: Array<InteractionsAPI.Annotation>;
|
|
1749
|
-
text?: string;
|
|
1750
1842
|
}
|
|
1751
1843
|
interface ImageDelta {
|
|
1752
1844
|
type: 'image';
|
|
1753
1845
|
data?: string;
|
|
1754
|
-
|
|
1755
|
-
* The mime type of the image.
|
|
1756
|
-
*/
|
|
1757
|
-
mime_type?: InteractionsAPI.ImageMimeType;
|
|
1846
|
+
mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif';
|
|
1758
1847
|
/**
|
|
1759
1848
|
* The resolution of the media.
|
|
1760
1849
|
*/
|
|
@@ -1764,28 +1853,19 @@ declare namespace ContentDelta {
|
|
|
1764
1853
|
interface AudioDelta {
|
|
1765
1854
|
type: 'audio';
|
|
1766
1855
|
data?: string;
|
|
1767
|
-
|
|
1768
|
-
* The mime type of the audio.
|
|
1769
|
-
*/
|
|
1770
|
-
mime_type?: InteractionsAPI.AudioMimeType;
|
|
1856
|
+
mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac';
|
|
1771
1857
|
uri?: string;
|
|
1772
1858
|
}
|
|
1773
1859
|
interface DocumentDelta {
|
|
1774
1860
|
type: 'document';
|
|
1775
1861
|
data?: string;
|
|
1776
|
-
|
|
1777
|
-
* The mime type of the document.
|
|
1778
|
-
*/
|
|
1779
|
-
mime_type?: InteractionsAPI.DocumentMimeType;
|
|
1862
|
+
mime_type?: 'application/pdf';
|
|
1780
1863
|
uri?: string;
|
|
1781
1864
|
}
|
|
1782
1865
|
interface VideoDelta {
|
|
1783
1866
|
type: 'video';
|
|
1784
1867
|
data?: string;
|
|
1785
|
-
|
|
1786
|
-
* The mime type of the video.
|
|
1787
|
-
*/
|
|
1788
|
-
mime_type?: InteractionsAPI.VideoMimeType;
|
|
1868
|
+
mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
|
|
1789
1869
|
/**
|
|
1790
1870
|
* The resolution of the media.
|
|
1791
1871
|
*/
|
|
@@ -1807,28 +1887,36 @@ declare namespace ContentDelta {
|
|
|
1807
1887
|
signature?: string;
|
|
1808
1888
|
}
|
|
1809
1889
|
interface FunctionCallDelta {
|
|
1810
|
-
type: 'function_call';
|
|
1811
1890
|
/**
|
|
1812
1891
|
* A unique ID for this specific tool call.
|
|
1813
1892
|
*/
|
|
1814
|
-
id
|
|
1815
|
-
arguments
|
|
1893
|
+
id: string;
|
|
1894
|
+
arguments: {
|
|
1816
1895
|
[key: string]: unknown;
|
|
1817
1896
|
};
|
|
1818
|
-
name
|
|
1897
|
+
name: string;
|
|
1898
|
+
type: 'function_call';
|
|
1899
|
+
/**
|
|
1900
|
+
* A signature hash for backend validation.
|
|
1901
|
+
*/
|
|
1902
|
+
signature?: string;
|
|
1819
1903
|
}
|
|
1820
1904
|
interface FunctionResultDelta {
|
|
1821
|
-
type: 'function_result';
|
|
1822
1905
|
/**
|
|
1823
1906
|
* ID to match the ID from the function call block.
|
|
1824
1907
|
*/
|
|
1825
|
-
call_id
|
|
1908
|
+
call_id: string;
|
|
1909
|
+
/**
|
|
1910
|
+
* Tool call result delta.
|
|
1911
|
+
*/
|
|
1912
|
+
result: FunctionResultDelta.Items | unknown | string;
|
|
1913
|
+
type: 'function_result';
|
|
1826
1914
|
is_error?: boolean;
|
|
1827
1915
|
name?: string;
|
|
1828
1916
|
/**
|
|
1829
|
-
*
|
|
1917
|
+
* A signature hash for backend validation.
|
|
1830
1918
|
*/
|
|
1831
|
-
|
|
1919
|
+
signature?: string;
|
|
1832
1920
|
}
|
|
1833
1921
|
namespace FunctionResultDelta {
|
|
1834
1922
|
interface Items {
|
|
@@ -1836,92 +1924,121 @@ declare namespace ContentDelta {
|
|
|
1836
1924
|
}
|
|
1837
1925
|
}
|
|
1838
1926
|
interface CodeExecutionCallDelta {
|
|
1839
|
-
type: 'code_execution_call';
|
|
1840
1927
|
/**
|
|
1841
1928
|
* A unique ID for this specific tool call.
|
|
1842
1929
|
*/
|
|
1843
|
-
id
|
|
1930
|
+
id: string;
|
|
1844
1931
|
/**
|
|
1845
1932
|
* The arguments to pass to the code execution.
|
|
1846
1933
|
*/
|
|
1847
|
-
arguments
|
|
1934
|
+
arguments: InteractionsAPI.CodeExecutionCallArguments;
|
|
1935
|
+
type: 'code_execution_call';
|
|
1936
|
+
/**
|
|
1937
|
+
* A signature hash for backend validation.
|
|
1938
|
+
*/
|
|
1939
|
+
signature?: string;
|
|
1848
1940
|
}
|
|
1849
1941
|
interface CodeExecutionResultDelta {
|
|
1850
|
-
type: 'code_execution_result';
|
|
1851
1942
|
/**
|
|
1852
1943
|
* ID to match the ID from the function call block.
|
|
1853
1944
|
*/
|
|
1854
|
-
call_id
|
|
1945
|
+
call_id: string;
|
|
1946
|
+
result: string;
|
|
1947
|
+
type: 'code_execution_result';
|
|
1855
1948
|
is_error?: boolean;
|
|
1856
|
-
|
|
1949
|
+
/**
|
|
1950
|
+
* A signature hash for backend validation.
|
|
1951
|
+
*/
|
|
1857
1952
|
signature?: string;
|
|
1858
1953
|
}
|
|
1859
1954
|
interface URLContextCallDelta {
|
|
1860
|
-
type: 'url_context_call';
|
|
1861
1955
|
/**
|
|
1862
1956
|
* A unique ID for this specific tool call.
|
|
1863
1957
|
*/
|
|
1864
|
-
id
|
|
1958
|
+
id: string;
|
|
1865
1959
|
/**
|
|
1866
1960
|
* The arguments to pass to the URL context.
|
|
1867
1961
|
*/
|
|
1868
|
-
arguments
|
|
1962
|
+
arguments: InteractionsAPI.URLContextCallArguments;
|
|
1963
|
+
type: 'url_context_call';
|
|
1964
|
+
/**
|
|
1965
|
+
* A signature hash for backend validation.
|
|
1966
|
+
*/
|
|
1967
|
+
signature?: string;
|
|
1869
1968
|
}
|
|
1870
1969
|
interface URLContextResultDelta {
|
|
1871
|
-
type: 'url_context_result';
|
|
1872
1970
|
/**
|
|
1873
1971
|
* ID to match the ID from the function call block.
|
|
1874
1972
|
*/
|
|
1875
|
-
call_id
|
|
1973
|
+
call_id: string;
|
|
1974
|
+
result: Array<InteractionsAPI.URLContextResult>;
|
|
1975
|
+
type: 'url_context_result';
|
|
1876
1976
|
is_error?: boolean;
|
|
1877
|
-
|
|
1977
|
+
/**
|
|
1978
|
+
* A signature hash for backend validation.
|
|
1979
|
+
*/
|
|
1878
1980
|
signature?: string;
|
|
1879
1981
|
}
|
|
1880
1982
|
interface GoogleSearchCallDelta {
|
|
1881
|
-
type: 'google_search_call';
|
|
1882
1983
|
/**
|
|
1883
1984
|
* A unique ID for this specific tool call.
|
|
1884
1985
|
*/
|
|
1885
|
-
id
|
|
1986
|
+
id: string;
|
|
1886
1987
|
/**
|
|
1887
1988
|
* The arguments to pass to Google Search.
|
|
1888
1989
|
*/
|
|
1889
|
-
arguments
|
|
1990
|
+
arguments: InteractionsAPI.GoogleSearchCallArguments;
|
|
1991
|
+
type: 'google_search_call';
|
|
1992
|
+
/**
|
|
1993
|
+
* A signature hash for backend validation.
|
|
1994
|
+
*/
|
|
1995
|
+
signature?: string;
|
|
1890
1996
|
}
|
|
1891
1997
|
interface GoogleSearchResultDelta {
|
|
1892
|
-
type: 'google_search_result';
|
|
1893
1998
|
/**
|
|
1894
1999
|
* ID to match the ID from the function call block.
|
|
1895
2000
|
*/
|
|
1896
|
-
call_id
|
|
2001
|
+
call_id: string;
|
|
2002
|
+
result: Array<InteractionsAPI.GoogleSearchResult>;
|
|
2003
|
+
type: 'google_search_result';
|
|
1897
2004
|
is_error?: boolean;
|
|
1898
|
-
|
|
2005
|
+
/**
|
|
2006
|
+
* A signature hash for backend validation.
|
|
2007
|
+
*/
|
|
1899
2008
|
signature?: string;
|
|
1900
2009
|
}
|
|
1901
2010
|
interface MCPServerToolCallDelta {
|
|
1902
|
-
type: 'mcp_server_tool_call';
|
|
1903
2011
|
/**
|
|
1904
2012
|
* A unique ID for this specific tool call.
|
|
1905
2013
|
*/
|
|
1906
|
-
id
|
|
1907
|
-
arguments
|
|
2014
|
+
id: string;
|
|
2015
|
+
arguments: {
|
|
1908
2016
|
[key: string]: unknown;
|
|
1909
2017
|
};
|
|
1910
|
-
name
|
|
1911
|
-
server_name
|
|
2018
|
+
name: string;
|
|
2019
|
+
server_name: string;
|
|
2020
|
+
type: 'mcp_server_tool_call';
|
|
2021
|
+
/**
|
|
2022
|
+
* A signature hash for backend validation.
|
|
2023
|
+
*/
|
|
2024
|
+
signature?: string;
|
|
1912
2025
|
}
|
|
1913
2026
|
interface MCPServerToolResultDelta {
|
|
1914
|
-
type: 'mcp_server_tool_result';
|
|
1915
2027
|
/**
|
|
1916
2028
|
* ID to match the ID from the function call block.
|
|
1917
2029
|
*/
|
|
1918
|
-
call_id
|
|
1919
|
-
name?: string;
|
|
2030
|
+
call_id: string;
|
|
1920
2031
|
/**
|
|
1921
2032
|
* Tool call result delta.
|
|
1922
2033
|
*/
|
|
1923
|
-
result
|
|
2034
|
+
result: MCPServerToolResultDelta.Items | unknown | string;
|
|
2035
|
+
type: 'mcp_server_tool_result';
|
|
2036
|
+
name?: string;
|
|
1924
2037
|
server_name?: string;
|
|
2038
|
+
/**
|
|
2039
|
+
* A signature hash for backend validation.
|
|
2040
|
+
*/
|
|
2041
|
+
signature?: string;
|
|
1925
2042
|
}
|
|
1926
2043
|
namespace MCPServerToolResultDelta {
|
|
1927
2044
|
interface Items {
|
|
@@ -1929,11 +2046,15 @@ declare namespace ContentDelta {
|
|
|
1929
2046
|
}
|
|
1930
2047
|
}
|
|
1931
2048
|
interface FileSearchCallDelta {
|
|
1932
|
-
type: 'file_search_call';
|
|
1933
2049
|
/**
|
|
1934
2050
|
* A unique ID for this specific tool call.
|
|
1935
2051
|
*/
|
|
1936
|
-
id
|
|
2052
|
+
id: string;
|
|
2053
|
+
type: 'file_search_call';
|
|
2054
|
+
/**
|
|
2055
|
+
* A signature hash for backend validation.
|
|
2056
|
+
*/
|
|
2057
|
+
signature?: string;
|
|
1937
2058
|
}
|
|
1938
2059
|
interface FileSearchResultDelta {
|
|
1939
2060
|
type: 'file_search_result';
|
|
@@ -2001,25 +2122,25 @@ export declare class ContentReferenceImage {
|
|
|
2001
2122
|
}
|
|
2002
2123
|
|
|
2003
2124
|
declare interface ContentStart {
|
|
2004
|
-
event_type: 'content.start';
|
|
2005
2125
|
/**
|
|
2006
2126
|
* The content of the response.
|
|
2007
2127
|
*/
|
|
2008
|
-
content
|
|
2128
|
+
content: Content_2;
|
|
2129
|
+
event_type: 'content.start';
|
|
2130
|
+
index: number;
|
|
2009
2131
|
/**
|
|
2010
2132
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
2011
2133
|
*/
|
|
2012
2134
|
event_id?: string;
|
|
2013
|
-
index?: number;
|
|
2014
2135
|
}
|
|
2015
2136
|
|
|
2016
2137
|
declare interface ContentStop {
|
|
2017
2138
|
event_type: 'content.stop';
|
|
2139
|
+
index: number;
|
|
2018
2140
|
/**
|
|
2019
2141
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
2020
2142
|
*/
|
|
2021
2143
|
event_id?: string;
|
|
2022
|
-
index?: number;
|
|
2023
2144
|
}
|
|
2024
2145
|
|
|
2025
2146
|
export declare type ContentUnion = Content | PartUnion[] | PartUnion;
|
|
@@ -2516,6 +2637,12 @@ export declare interface CreateTuningJobParametersPrivate {
|
|
|
2516
2637
|
*/
|
|
2517
2638
|
export declare function createUserContent(partOrString: PartListUnion | string): Content;
|
|
2518
2639
|
|
|
2640
|
+
/** Result for custom code execution metric. This data type is not supported in Gemini API. */
|
|
2641
|
+
export declare interface CustomCodeExecutionResult {
|
|
2642
|
+
/** Output only. Custom code execution score. */
|
|
2643
|
+
score?: number;
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2519
2646
|
/** User provided metadata stored as key-value pairs. This data type is not supported in Vertex AI. */
|
|
2520
2647
|
export declare interface CustomMetadata {
|
|
2521
2648
|
/** Required. The key of the metadata to store. */
|
|
@@ -2528,6 +2655,12 @@ export declare interface CustomMetadata {
|
|
|
2528
2655
|
stringValue?: string;
|
|
2529
2656
|
}
|
|
2530
2657
|
|
|
2658
|
+
/** Spec for custom output. This data type is not supported in Gemini API. */
|
|
2659
|
+
export declare interface CustomOutput {
|
|
2660
|
+
/** Output only. List of raw output strings. */
|
|
2661
|
+
rawOutputs?: RawOutput;
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2531
2664
|
/** Distribution computed over a tuning dataset. This data type is not supported in Gemini API. */
|
|
2532
2665
|
export declare interface DatasetDistribution {
|
|
2533
2666
|
/** Output only. Defines the histogram bucket. */
|
|
@@ -2560,6 +2693,10 @@ export declare interface DatasetDistributionDistributionBucket {
|
|
|
2560
2693
|
|
|
2561
2694
|
/** Statistics computed over a tuning dataset. This data type is not supported in Gemini API. */
|
|
2562
2695
|
export declare interface DatasetStats {
|
|
2696
|
+
/** Output only. A partial sample of the indices (starting from 1) of the dropped examples. */
|
|
2697
|
+
droppedExampleIndices?: string[];
|
|
2698
|
+
/** Output only. For each index in `dropped_example_indices`, the user-facing reason why the example was dropped. */
|
|
2699
|
+
droppedExampleReasons?: string[];
|
|
2563
2700
|
/** Output only. Number of billable characters in the tuning dataset. */
|
|
2564
2701
|
totalBillableCharacterCount?: string;
|
|
2565
2702
|
/** Output only. Number of tuning characters in the tuning dataset. */
|
|
@@ -2755,7 +2892,7 @@ export declare interface DeleteResourceJob {
|
|
|
2755
2892
|
error?: JobError;
|
|
2756
2893
|
}
|
|
2757
2894
|
|
|
2758
|
-
/** Statistics
|
|
2895
|
+
/** 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. */
|
|
2759
2896
|
export declare interface DistillationDataStats {
|
|
2760
2897
|
/** Output only. Statistics computed for the training dataset. */
|
|
2761
2898
|
trainingDatasetStats?: DatasetStats;
|
|
@@ -2825,18 +2962,13 @@ declare interface DocumentContent {
|
|
|
2825
2962
|
/**
|
|
2826
2963
|
* The mime type of the document.
|
|
2827
2964
|
*/
|
|
2828
|
-
mime_type?:
|
|
2965
|
+
mime_type?: 'application/pdf';
|
|
2829
2966
|
/**
|
|
2830
2967
|
* The URI of the document.
|
|
2831
2968
|
*/
|
|
2832
2969
|
uri?: string;
|
|
2833
2970
|
}
|
|
2834
2971
|
|
|
2835
|
-
/**
|
|
2836
|
-
* The mime type of the document.
|
|
2837
|
-
*/
|
|
2838
|
-
declare type DocumentMimeType = (string & {}) | 'application/pdf';
|
|
2839
|
-
|
|
2840
2972
|
declare class Documents extends BaseModule {
|
|
2841
2973
|
private readonly apiClient;
|
|
2842
2974
|
constructor(apiClient: ApiClient);
|
|
@@ -3152,9 +3284,9 @@ export declare interface EmbeddingsBatchJobSource {
|
|
|
3152
3284
|
inlinedRequests?: EmbedContentBatch;
|
|
3153
3285
|
}
|
|
3154
3286
|
|
|
3155
|
-
/** Represents a customer-managed encryption key
|
|
3287
|
+
/** Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. This data type is not supported in Gemini API. */
|
|
3156
3288
|
export declare interface EncryptionSpec {
|
|
3157
|
-
/** Required.
|
|
3289
|
+
/** Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. */
|
|
3158
3290
|
kmsKeyName?: string;
|
|
3159
3291
|
}
|
|
3160
3292
|
|
|
@@ -3184,10 +3316,10 @@ export declare enum EndSensitivity {
|
|
|
3184
3316
|
|
|
3185
3317
|
/** Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. This data type is not supported in Gemini API. */
|
|
3186
3318
|
export declare interface EnterpriseWebSearch {
|
|
3187
|
-
/** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. */
|
|
3188
|
-
excludeDomains?: string[];
|
|
3189
3319
|
/** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. */
|
|
3190
3320
|
blockingConfidence?: PhishBlockThreshold;
|
|
3321
|
+
/** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. */
|
|
3322
|
+
excludeDomains?: string[];
|
|
3191
3323
|
}
|
|
3192
3324
|
|
|
3193
3325
|
/** An entity representing the segmented area. */
|
|
@@ -3256,6 +3388,42 @@ declare namespace Errors {
|
|
|
3256
3388
|
}
|
|
3257
3389
|
}
|
|
3258
3390
|
|
|
3391
|
+
/** The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API. */
|
|
3392
|
+
export declare class EvaluateDatasetResponse {
|
|
3393
|
+
/** Output only. Aggregation statistics derived from results of EvaluationService. */
|
|
3394
|
+
aggregationOutput?: AggregationOutput;
|
|
3395
|
+
/** Output only. Output info for EvaluationService. */
|
|
3396
|
+
outputInfo?: OutputInfo;
|
|
3397
|
+
}
|
|
3398
|
+
|
|
3399
|
+
/** Evaluate Dataset Run Result for Tuning Job. This data type is not supported in Gemini API. */
|
|
3400
|
+
export declare interface EvaluateDatasetRun {
|
|
3401
|
+
/** Output only. The checkpoint id used in the evaluation run. Only populated when evaluating checkpoints. */
|
|
3402
|
+
checkpointId?: string;
|
|
3403
|
+
/** Output only. The error of the evaluation run if any. */
|
|
3404
|
+
error?: GoogleRpcStatus;
|
|
3405
|
+
/** Output only. Results for EvaluationService. */
|
|
3406
|
+
evaluateDatasetResponse?: EvaluateDatasetResponse;
|
|
3407
|
+
/** Output only. The resource name of the evaluation run. Format: `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`. */
|
|
3408
|
+
evaluationRun?: string;
|
|
3409
|
+
/** Output only. The operation ID of the evaluation run. Format: `projects/{project}/locations/{location}/operations/{operation_id}`. */
|
|
3410
|
+
operationName?: string;
|
|
3411
|
+
}
|
|
3412
|
+
|
|
3413
|
+
/** The dataset used for evaluation. This data type is not supported in Gemini API. */
|
|
3414
|
+
export declare interface EvaluationDataset {
|
|
3415
|
+
/** BigQuery source holds the dataset. */
|
|
3416
|
+
bigquerySource?: BigQuerySource;
|
|
3417
|
+
/** Cloud storage source holds the dataset. Currently only one Cloud Storage file path is supported. */
|
|
3418
|
+
gcsSource?: GcsSource;
|
|
3419
|
+
}
|
|
3420
|
+
|
|
3421
|
+
/** Exact match metric value for an instance. This data type is not supported in Gemini API. */
|
|
3422
|
+
export declare interface ExactMatchMetricValue {
|
|
3423
|
+
/** Output only. Exact match score. */
|
|
3424
|
+
score?: number;
|
|
3425
|
+
}
|
|
3426
|
+
|
|
3259
3427
|
/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [CodeExecution] tool, in which the code will be automatically executed, and a corresponding [CodeExecutionResult] will also be generated. */
|
|
3260
3428
|
export declare interface ExecutableCode {
|
|
3261
3429
|
/** Required. The code to be executed. */
|
|
@@ -3366,11 +3534,11 @@ declare interface File_2 {
|
|
|
3366
3534
|
}
|
|
3367
3535
|
export { File_2 as File }
|
|
3368
3536
|
|
|
3369
|
-
/** URI
|
|
3537
|
+
/** 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. */
|
|
3370
3538
|
export declare interface FileData {
|
|
3371
|
-
/** Optional.
|
|
3539
|
+
/** Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled. This field is not supported in Gemini API. */
|
|
3372
3540
|
displayName?: string;
|
|
3373
|
-
/** Required. URI. */
|
|
3541
|
+
/** Required. The URI of the file in Google Cloud Storage. */
|
|
3374
3542
|
fileUri?: string;
|
|
3375
3543
|
/** Required. The IANA standard MIME type of the source data. */
|
|
3376
3544
|
mimeType?: string;
|
|
@@ -3511,22 +3679,34 @@ export declare interface FileSearch {
|
|
|
3511
3679
|
* File Search content.
|
|
3512
3680
|
*/
|
|
3513
3681
|
declare interface FileSearchCallContent {
|
|
3514
|
-
type: 'file_search_call';
|
|
3515
3682
|
/**
|
|
3516
3683
|
* A unique ID for this specific tool call.
|
|
3517
3684
|
*/
|
|
3518
|
-
id
|
|
3685
|
+
id: string;
|
|
3686
|
+
type: 'file_search_call';
|
|
3687
|
+
/**
|
|
3688
|
+
* A signature hash for backend validation.
|
|
3689
|
+
*/
|
|
3690
|
+
signature?: string;
|
|
3519
3691
|
}
|
|
3520
3692
|
|
|
3521
3693
|
/**
|
|
3522
3694
|
* File Search result content.
|
|
3523
3695
|
*/
|
|
3524
3696
|
declare interface FileSearchResultContent {
|
|
3697
|
+
/**
|
|
3698
|
+
* ID to match the ID from the file search call block.
|
|
3699
|
+
*/
|
|
3700
|
+
call_id: string;
|
|
3525
3701
|
type: 'file_search_result';
|
|
3526
3702
|
/**
|
|
3527
3703
|
* The results of the File Search.
|
|
3528
3704
|
*/
|
|
3529
3705
|
result?: Array<FileSearchResultContent.Result>;
|
|
3706
|
+
/**
|
|
3707
|
+
* A signature hash for backend validation.
|
|
3708
|
+
*/
|
|
3709
|
+
signature?: string;
|
|
3530
3710
|
}
|
|
3531
3711
|
|
|
3532
3712
|
declare namespace FileSearchResultContent {
|
|
@@ -3785,6 +3965,16 @@ export declare enum FinishReason {
|
|
|
3785
3965
|
IMAGE_OTHER = "IMAGE_OTHER"
|
|
3786
3966
|
}
|
|
3787
3967
|
|
|
3968
|
+
/** Tuning Spec for Full Fine Tuning. This data type is not supported in Gemini API. */
|
|
3969
|
+
export declare interface FullFineTuningSpec {
|
|
3970
|
+
/** Optional. Hyperparameters for Full Fine Tuning. */
|
|
3971
|
+
hyperParameters?: SupervisedHyperParameters;
|
|
3972
|
+
/** Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset. */
|
|
3973
|
+
trainingDatasetUri?: string;
|
|
3974
|
+
/** Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset. */
|
|
3975
|
+
validationDatasetUri?: string;
|
|
3976
|
+
}
|
|
3977
|
+
|
|
3788
3978
|
/**
|
|
3789
3979
|
* A tool that can be used by the model.
|
|
3790
3980
|
*/
|
|
@@ -3838,6 +4028,10 @@ declare interface FunctionCallContent {
|
|
|
3838
4028
|
*/
|
|
3839
4029
|
name: string;
|
|
3840
4030
|
type: 'function_call';
|
|
4031
|
+
/**
|
|
4032
|
+
* A signature hash for backend validation.
|
|
4033
|
+
*/
|
|
4034
|
+
signature?: string;
|
|
3841
4035
|
}
|
|
3842
4036
|
|
|
3843
4037
|
/** Function calling config. */
|
|
@@ -3878,7 +4072,7 @@ export declare enum FunctionCallingConfigMode {
|
|
|
3878
4072
|
export declare interface FunctionDeclaration {
|
|
3879
4073
|
/** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */
|
|
3880
4074
|
description?: string;
|
|
3881
|
-
/** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */
|
|
4075
|
+
/** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 64. */
|
|
3882
4076
|
name?: string;
|
|
3883
4077
|
/** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */
|
|
3884
4078
|
parameters?: Schema;
|
|
@@ -3992,6 +4186,10 @@ declare interface FunctionResultContent {
|
|
|
3992
4186
|
* The name of the tool that was called.
|
|
3993
4187
|
*/
|
|
3994
4188
|
name?: string;
|
|
4189
|
+
/**
|
|
4190
|
+
* A signature hash for backend validation.
|
|
4191
|
+
*/
|
|
4192
|
+
signature?: string;
|
|
3995
4193
|
}
|
|
3996
4194
|
|
|
3997
4195
|
declare namespace FunctionResultContent {
|
|
@@ -4000,6 +4198,12 @@ declare namespace FunctionResultContent {
|
|
|
4000
4198
|
}
|
|
4001
4199
|
}
|
|
4002
4200
|
|
|
4201
|
+
/** The Google Cloud Storage location for the input content. This data type is not supported in Gemini API. */
|
|
4202
|
+
export declare interface GcsSource {
|
|
4203
|
+
/** Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards. */
|
|
4204
|
+
uris?: string[];
|
|
4205
|
+
}
|
|
4206
|
+
|
|
4003
4207
|
/**
|
|
4004
4208
|
* @license
|
|
4005
4209
|
* Copyright 2025 Google LLC
|
|
@@ -4635,45 +4839,45 @@ export declare interface GenerationConfig {
|
|
|
4635
4839
|
`response_schema` that accepts [JSON Schema](https://json-schema.org/).
|
|
4636
4840
|
*/
|
|
4637
4841
|
responseJsonSchema?: unknown;
|
|
4638
|
-
/** Optional. If enabled, audio
|
|
4842
|
+
/** Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response. This field is not supported in Gemini API. */
|
|
4639
4843
|
audioTimestamp?: boolean;
|
|
4640
|
-
/** Optional.
|
|
4844
|
+
/** Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one. */
|
|
4641
4845
|
candidateCount?: number;
|
|
4642
|
-
/** Optional. If enabled, the model will detect emotions and adapt its responses accordingly. This field is not supported in Gemini API. */
|
|
4846
|
+
/** Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response. This field is not supported in Gemini API. */
|
|
4643
4847
|
enableAffectiveDialog?: boolean;
|
|
4644
|
-
/** Optional.
|
|
4848
|
+
/** Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0]. */
|
|
4645
4849
|
frequencyPenalty?: number;
|
|
4646
|
-
/** Optional.
|
|
4850
|
+
/** Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response. */
|
|
4647
4851
|
logprobs?: number;
|
|
4648
|
-
/** Optional. The maximum number of
|
|
4852
|
+
/** Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses. */
|
|
4649
4853
|
maxOutputTokens?: number;
|
|
4650
|
-
/** Optional.
|
|
4854
|
+
/** Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model. */
|
|
4651
4855
|
mediaResolution?: MediaResolution;
|
|
4652
|
-
/** Optional.
|
|
4856
|
+
/** Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0]. */
|
|
4653
4857
|
presencePenalty?: number;
|
|
4654
|
-
/** Optional. If true,
|
|
4858
|
+
/** 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. */
|
|
4655
4859
|
responseLogprobs?: boolean;
|
|
4656
|
-
/** Optional.
|
|
4860
|
+
/** 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. This is a preview feature. */
|
|
4657
4861
|
responseMimeType?: string;
|
|
4658
|
-
/** Optional. The modalities of the response. */
|
|
4862
|
+
/** 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. */
|
|
4659
4863
|
responseModalities?: Modality[];
|
|
4660
|
-
/** Optional.
|
|
4864
|
+
/** 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`. */
|
|
4661
4865
|
responseSchema?: Schema;
|
|
4662
4866
|
/** Optional. Routing configuration. This field is not supported in Gemini API. */
|
|
4663
4867
|
routingConfig?: GenerationConfigRoutingConfig;
|
|
4664
|
-
/** Optional.
|
|
4868
|
+
/** Optional. A seed for the random number generator. By setting a seed, you can make the model's output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it's not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the "random" choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results. */
|
|
4665
4869
|
seed?: number;
|
|
4666
4870
|
/** Optional. The speech generation config. */
|
|
4667
4871
|
speechConfig?: SpeechConfig;
|
|
4668
|
-
/** Optional.
|
|
4872
|
+
/** Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use ["\n", "###"] to stop generation at a new line or a specific marker. */
|
|
4669
4873
|
stopSequences?: string[];
|
|
4670
|
-
/** Optional. Controls the randomness of
|
|
4874
|
+
/** Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0]. */
|
|
4671
4875
|
temperature?: number;
|
|
4672
|
-
/** Optional.
|
|
4876
|
+
/** Optional. Configuration for thinking features. An error will be returned if this field is set for models that don't support thinking. */
|
|
4673
4877
|
thinkingConfig?: ThinkingConfig;
|
|
4674
|
-
/** Optional.
|
|
4878
|
+
/** Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words. */
|
|
4675
4879
|
topK?: number;
|
|
4676
|
-
/** Optional.
|
|
4880
|
+
/** Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It's recommended to adjust either temperature or `top_p`, but not both. */
|
|
4677
4881
|
topP?: number;
|
|
4678
4882
|
/** Optional. Enables enhanced civic answers. It may not be available for all models. This field is not supported in Vertex AI. */
|
|
4679
4883
|
enableEnhancedCivicAnswers?: boolean;
|
|
@@ -4718,30 +4922,30 @@ declare interface GenerationConfig_2 {
|
|
|
4718
4922
|
/**
|
|
4719
4923
|
* The tool choice for the interaction.
|
|
4720
4924
|
*/
|
|
4721
|
-
tool_choice?:
|
|
4925
|
+
tool_choice?: ToolChoiceType | ToolChoiceConfig;
|
|
4722
4926
|
/**
|
|
4723
4927
|
* The maximum cumulative probability of tokens to consider when sampling.
|
|
4724
4928
|
*/
|
|
4725
4929
|
top_p?: number;
|
|
4726
4930
|
}
|
|
4727
4931
|
|
|
4728
|
-
/** The configuration for routing the request to a specific model. This data type is not supported in Gemini API. */
|
|
4932
|
+
/** 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. */
|
|
4729
4933
|
export declare interface GenerationConfigRoutingConfig {
|
|
4730
|
-
/**
|
|
4934
|
+
/** In this mode, the model is selected automatically based on the content of the request. */
|
|
4731
4935
|
autoMode?: GenerationConfigRoutingConfigAutoRoutingMode;
|
|
4732
|
-
/**
|
|
4936
|
+
/** In this mode, the model is specified manually. */
|
|
4733
4937
|
manualMode?: GenerationConfigRoutingConfigManualRoutingMode;
|
|
4734
4938
|
}
|
|
4735
4939
|
|
|
4736
|
-
/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. This data type is not supported in Gemini API. */
|
|
4940
|
+
/** The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. This data type is not supported in Gemini API. */
|
|
4737
4941
|
export declare interface GenerationConfigRoutingConfigAutoRoutingMode {
|
|
4738
4942
|
/** The model routing preference. */
|
|
4739
4943
|
modelRoutingPreference?: 'UNKNOWN' | 'PRIORITIZE_QUALITY' | 'BALANCED' | 'PRIORITIZE_COST';
|
|
4740
4944
|
}
|
|
4741
4945
|
|
|
4742
|
-
/** When manual routing is
|
|
4946
|
+
/** The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. This data type is not supported in Gemini API. */
|
|
4743
4947
|
export declare interface GenerationConfigRoutingConfigManualRoutingMode {
|
|
4744
|
-
/** The model
|
|
4948
|
+
/** The name of the model to use. Only public LLM models are accepted. */
|
|
4745
4949
|
modelName?: string;
|
|
4746
4950
|
}
|
|
4747
4951
|
|
|
@@ -5038,11 +5242,11 @@ export declare interface GoogleGenAIOptions {
|
|
|
5038
5242
|
httpOptions?: HttpOptions;
|
|
5039
5243
|
}
|
|
5040
5244
|
|
|
5041
|
-
/** Tool to retrieve
|
|
5245
|
+
/** Tool to retrieve knowledge from Google Maps. */
|
|
5042
5246
|
export declare interface GoogleMaps {
|
|
5043
5247
|
/** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
|
|
5044
5248
|
authConfig?: AuthConfig;
|
|
5045
|
-
/** Optional.
|
|
5249
|
+
/** Optional. Whether to return a widget context token in the GroundingMetadata of the response. Developers can use the widget context token to render a Google Maps widget with geospatial context related to the places that the model references in the response. */
|
|
5046
5250
|
enableWidget?: boolean;
|
|
5047
5251
|
}
|
|
5048
5252
|
|
|
@@ -5056,12 +5260,14 @@ export declare interface GoogleRpcStatus {
|
|
|
5056
5260
|
message?: string;
|
|
5057
5261
|
}
|
|
5058
5262
|
|
|
5059
|
-
/**
|
|
5263
|
+
/** Tool to support web search. */
|
|
5060
5264
|
export declare interface GoogleSearch {
|
|
5061
|
-
/**
|
|
5062
|
-
|
|
5265
|
+
/** Different types of search that can be enabled on the GoogleSearch tool. */
|
|
5266
|
+
searchTypes?: SearchTypes;
|
|
5063
5267
|
/** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API. */
|
|
5064
5268
|
blockingConfidence?: PhishBlockThreshold;
|
|
5269
|
+
/** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: ["amazon.com", "facebook.com"]. This field is not supported in Gemini API. */
|
|
5270
|
+
excludeDomains?: string[];
|
|
5065
5271
|
/** Optional. Filter search results to a specific time range. If customers set a start time, they must set an end time (and vice versa). This field is not supported in Vertex AI. */
|
|
5066
5272
|
timeRangeFilter?: Interval;
|
|
5067
5273
|
}
|
|
@@ -5080,15 +5286,23 @@ declare interface GoogleSearchCallArguments {
|
|
|
5080
5286
|
* Google Search content.
|
|
5081
5287
|
*/
|
|
5082
5288
|
declare interface GoogleSearchCallContent {
|
|
5083
|
-
type: 'google_search_call';
|
|
5084
5289
|
/**
|
|
5085
5290
|
* A unique ID for this specific tool call.
|
|
5086
5291
|
*/
|
|
5087
|
-
id
|
|
5292
|
+
id: string;
|
|
5088
5293
|
/**
|
|
5089
5294
|
* The arguments to pass to Google Search.
|
|
5090
5295
|
*/
|
|
5091
|
-
arguments
|
|
5296
|
+
arguments: GoogleSearchCallArguments;
|
|
5297
|
+
type: 'google_search_call';
|
|
5298
|
+
/**
|
|
5299
|
+
* The type of search grounding enabled.
|
|
5300
|
+
*/
|
|
5301
|
+
search_type?: 'web_search' | 'image_search';
|
|
5302
|
+
/**
|
|
5303
|
+
* A signature hash for backend validation.
|
|
5304
|
+
*/
|
|
5305
|
+
signature?: string;
|
|
5092
5306
|
}
|
|
5093
5307
|
|
|
5094
5308
|
/**
|
|
@@ -5113,21 +5327,21 @@ declare interface GoogleSearchResult {
|
|
|
5113
5327
|
* Google Search result content.
|
|
5114
5328
|
*/
|
|
5115
5329
|
declare interface GoogleSearchResultContent {
|
|
5116
|
-
type: 'google_search_result';
|
|
5117
5330
|
/**
|
|
5118
5331
|
* ID to match the ID from the google search call block.
|
|
5119
5332
|
*/
|
|
5120
|
-
call_id
|
|
5333
|
+
call_id: string;
|
|
5121
5334
|
/**
|
|
5122
|
-
*
|
|
5335
|
+
* The results of the Google Search.
|
|
5123
5336
|
*/
|
|
5124
|
-
|
|
5337
|
+
result: Array<GoogleSearchResult>;
|
|
5338
|
+
type: 'google_search_result';
|
|
5125
5339
|
/**
|
|
5126
|
-
*
|
|
5340
|
+
* Whether the Google Search resulted in an error.
|
|
5127
5341
|
*/
|
|
5128
|
-
|
|
5342
|
+
is_error?: boolean;
|
|
5129
5343
|
/**
|
|
5130
|
-
*
|
|
5344
|
+
* A signature hash for backend validation.
|
|
5131
5345
|
*/
|
|
5132
5346
|
signature?: string;
|
|
5133
5347
|
}
|
|
@@ -5148,39 +5362,80 @@ export declare interface GoogleTypeDate {
|
|
|
5148
5362
|
year?: number;
|
|
5149
5363
|
}
|
|
5150
5364
|
|
|
5151
|
-
/**
|
|
5365
|
+
/** A piece of evidence that supports a claim made by the model.
|
|
5366
|
+
|
|
5367
|
+
This is used to show a citation for a claim made by the model. When grounding
|
|
5368
|
+
is enabled, the model returns a `GroundingChunk` that contains a reference to
|
|
5369
|
+
the source of the information. */
|
|
5152
5370
|
export declare interface GroundingChunk {
|
|
5153
|
-
/**
|
|
5371
|
+
/** A grounding chunk from an image search result. See the `Image`
|
|
5372
|
+
message for details.
|
|
5373
|
+
*/
|
|
5374
|
+
image?: GroundingChunkImage;
|
|
5375
|
+
/** A `Maps` chunk is a piece of evidence that comes from Google Maps.
|
|
5376
|
+
|
|
5377
|
+
It contains information about a place, such as its name, address, and
|
|
5378
|
+
reviews. This is used to provide the user with rich, location-based
|
|
5379
|
+
information. */
|
|
5154
5380
|
maps?: GroundingChunkMaps;
|
|
5155
|
-
/**
|
|
5381
|
+
/** A grounding chunk from a data source retrieved by a retrieval tool, such as Vertex AI Search. See the `RetrievedContext` message for details. This field is not supported in Gemini API. */
|
|
5156
5382
|
retrievedContext?: GroundingChunkRetrievedContext;
|
|
5157
|
-
/**
|
|
5383
|
+
/** A grounding chunk from a web page, typically from Google Search. See the `Web` message for details. */
|
|
5158
5384
|
web?: GroundingChunkWeb;
|
|
5159
5385
|
}
|
|
5160
5386
|
|
|
5161
|
-
/**
|
|
5387
|
+
/** A piece of evidence that comes from an image search result.
|
|
5388
|
+
|
|
5389
|
+
It contains the URI of the image search result and the URI of the image.
|
|
5390
|
+
This is used to provide the user with a link to the source of the
|
|
5391
|
+
information. */
|
|
5392
|
+
export declare interface GroundingChunkImage {
|
|
5393
|
+
/** The URI of the image search result page. */
|
|
5394
|
+
sourceUri?: string;
|
|
5395
|
+
/** The URI of the image. */
|
|
5396
|
+
imageUri?: string;
|
|
5397
|
+
/** The title of the image search result page. */
|
|
5398
|
+
title?: string;
|
|
5399
|
+
/** The domain of the image search result page. */
|
|
5400
|
+
domain?: string;
|
|
5401
|
+
}
|
|
5402
|
+
|
|
5403
|
+
/** A `Maps` chunk is a piece of evidence that comes from Google Maps.
|
|
5404
|
+
|
|
5405
|
+
It contains information about a place, such as its name, address, and reviews.
|
|
5406
|
+
This is used to provide the user with rich, location-based information. */
|
|
5162
5407
|
export declare interface GroundingChunkMaps {
|
|
5163
|
-
/**
|
|
5408
|
+
/** The sources that were used to generate the place answer.
|
|
5409
|
+
|
|
5410
|
+
This includes review snippets and photos that were used to generate the
|
|
5411
|
+
answer, as well as URIs to flag content. */
|
|
5164
5412
|
placeAnswerSources?: GroundingChunkMapsPlaceAnswerSources;
|
|
5165
|
-
/** This Place's resource name, in `places/{place_id}` format.
|
|
5413
|
+
/** This Place's resource name, in `places/{place_id}` format.
|
|
5414
|
+
|
|
5415
|
+
This can be used to look up the place in the Google Maps API. */
|
|
5166
5416
|
placeId?: string;
|
|
5167
|
-
/**
|
|
5417
|
+
/** The text of the place answer. */
|
|
5168
5418
|
text?: string;
|
|
5169
|
-
/**
|
|
5419
|
+
/** The title of the place. */
|
|
5170
5420
|
title?: string;
|
|
5171
|
-
/** URI
|
|
5421
|
+
/** The URI of the place. */
|
|
5172
5422
|
uri?: string;
|
|
5173
5423
|
}
|
|
5174
5424
|
|
|
5175
|
-
/**
|
|
5425
|
+
/** The sources that were used to generate the place answer.
|
|
5426
|
+
|
|
5427
|
+
This includes review snippets and photos that were used to generate the
|
|
5428
|
+
answer, as well as URIs to flag content. */
|
|
5176
5429
|
export declare interface GroundingChunkMapsPlaceAnswerSources {
|
|
5430
|
+
/** Snippets of reviews that were used to generate the answer. */
|
|
5431
|
+
reviewSnippet?: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet[];
|
|
5177
5432
|
/** A link where users can flag a problem with the generated answer. */
|
|
5178
5433
|
flagContentUri?: string;
|
|
5179
|
-
/** Snippets of reviews that
|
|
5434
|
+
/** Snippets of reviews that were used to generate the answer. */
|
|
5180
5435
|
reviewSnippets?: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet[];
|
|
5181
5436
|
}
|
|
5182
5437
|
|
|
5183
|
-
/** Author attribution for a photo or review.
|
|
5438
|
+
/** Author attribution for a photo or review. */
|
|
5184
5439
|
export declare interface GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution {
|
|
5185
5440
|
/** Name of the author of the Photo or Review. */
|
|
5186
5441
|
displayName?: string;
|
|
@@ -5190,7 +5445,7 @@ export declare interface GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution {
|
|
|
5190
5445
|
uri?: string;
|
|
5191
5446
|
}
|
|
5192
5447
|
|
|
5193
|
-
/** Encapsulates a review snippet.
|
|
5448
|
+
/** Encapsulates a review snippet. */
|
|
5194
5449
|
export declare interface GroundingChunkMapsPlaceAnswerSourcesReviewSnippet {
|
|
5195
5450
|
/** This review's author. */
|
|
5196
5451
|
authorAttribution?: GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution;
|
|
@@ -5208,69 +5463,84 @@ export declare interface GroundingChunkMapsPlaceAnswerSourcesReviewSnippet {
|
|
|
5208
5463
|
title?: string;
|
|
5209
5464
|
}
|
|
5210
5465
|
|
|
5211
|
-
/**
|
|
5466
|
+
/** Context retrieved from a data source to ground the model's response. This is used when a retrieval tool fetches information from a user-provided corpus or a public dataset. This data type is not supported in Gemini API. */
|
|
5212
5467
|
export declare interface GroundingChunkRetrievedContext {
|
|
5213
|
-
/** Output only. The full
|
|
5468
|
+
/** Output only. The full resource name of the referenced Vertex AI Search document. This is used to identify the specific document that was retrieved. The format is `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. */
|
|
5214
5469
|
documentName?: string;
|
|
5215
|
-
/** Additional context for
|
|
5470
|
+
/** Additional context for a Retrieval-Augmented Generation (RAG) retrieval result. This is populated only when the RAG retrieval tool is used. */
|
|
5216
5471
|
ragChunk?: RagChunk;
|
|
5217
|
-
/**
|
|
5472
|
+
/** The content of the retrieved data source. */
|
|
5218
5473
|
text?: string;
|
|
5219
|
-
/**
|
|
5474
|
+
/** The title of the retrieved data source. */
|
|
5220
5475
|
title?: string;
|
|
5221
|
-
/** URI
|
|
5476
|
+
/** The URI of the retrieved data source. */
|
|
5222
5477
|
uri?: string;
|
|
5223
5478
|
}
|
|
5224
5479
|
|
|
5225
|
-
/**
|
|
5480
|
+
/** A `Web` chunk is a piece of evidence that comes from a web page. It contains the URI of the web page, the title of the page, and the domain of the page. This is used to provide the user with a link to the source of the information. */
|
|
5226
5481
|
export declare interface GroundingChunkWeb {
|
|
5227
|
-
/**
|
|
5482
|
+
/** The domain of the web page that contains the evidence. This can be used to filter out low-quality sources. This field is not supported in Gemini API. */
|
|
5228
5483
|
domain?: string;
|
|
5229
|
-
/**
|
|
5484
|
+
/** The title of the web page that contains the evidence. */
|
|
5230
5485
|
title?: string;
|
|
5231
|
-
/** URI
|
|
5486
|
+
/** The URI of the web page that contains the evidence. */
|
|
5232
5487
|
uri?: string;
|
|
5233
5488
|
}
|
|
5234
5489
|
|
|
5235
|
-
/**
|
|
5490
|
+
/** Information for various kinds of grounding. */
|
|
5236
5491
|
export declare interface GroundingMetadata {
|
|
5237
|
-
/** Optional.
|
|
5238
|
-
|
|
5239
|
-
|
|
5492
|
+
/** Optional. The image search queries that were used to generate the
|
|
5493
|
+
content. This field is populated only when the grounding source is Google
|
|
5494
|
+
Search with the Image Search search_type enabled.
|
|
5495
|
+
*/
|
|
5496
|
+
imageSearchQueries?: string[];
|
|
5497
|
+
/** A list of supporting references retrieved from the grounding
|
|
5498
|
+
source. This field is populated when the grounding source is Google
|
|
5499
|
+
Search, Vertex AI Search, or Google Maps.
|
|
5500
|
+
*/
|
|
5240
5501
|
groundingChunks?: GroundingChunk[];
|
|
5241
|
-
/**
|
|
5502
|
+
/** List of grounding support. */
|
|
5242
5503
|
groundingSupports?: GroundingSupport[];
|
|
5243
|
-
/**
|
|
5504
|
+
/** Metadata related to retrieval in the grounding flow. */
|
|
5244
5505
|
retrievalMetadata?: RetrievalMetadata;
|
|
5245
|
-
/** Optional.
|
|
5246
|
-
|
|
5247
|
-
/** Optional. Google search entry for the following-up web searches. */
|
|
5506
|
+
/** Optional. Google search entry for the following-up web
|
|
5507
|
+
searches. */
|
|
5248
5508
|
searchEntryPoint?: SearchEntryPoint;
|
|
5249
|
-
/**
|
|
5250
|
-
sourceFlaggingUris?: GroundingMetadataSourceFlaggingUri[];
|
|
5251
|
-
/** Optional. Web search queries for the following-up web search. */
|
|
5509
|
+
/** Web search queries for the following-up web search. */
|
|
5252
5510
|
webSearchQueries?: string[];
|
|
5511
|
+
/** 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. This field is not supported in Gemini API. */
|
|
5512
|
+
googleMapsWidgetContextToken?: string;
|
|
5513
|
+
/** 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. */
|
|
5514
|
+
retrievalQueries?: string[];
|
|
5515
|
+
/** Optional. Output only. A list of URIs that can be used to flag a place or review for inappropriate content. This field is populated only when the grounding source is Google Maps. This field is not supported in Gemini API. */
|
|
5516
|
+
sourceFlaggingUris?: GroundingMetadataSourceFlaggingUri[];
|
|
5253
5517
|
}
|
|
5254
5518
|
|
|
5255
|
-
/**
|
|
5519
|
+
/** A URI that can be used to flag a place or review for inappropriate content. This is populated only when the grounding source is Google Maps. This data type is not supported in Gemini API. */
|
|
5256
5520
|
export declare interface GroundingMetadataSourceFlaggingUri {
|
|
5257
|
-
/**
|
|
5521
|
+
/** The URI that can be used to flag the content. */
|
|
5258
5522
|
flagContentUri?: string;
|
|
5259
|
-
/**
|
|
5523
|
+
/** The ID of the place or review. */
|
|
5260
5524
|
sourceId?: string;
|
|
5261
5525
|
}
|
|
5262
5526
|
|
|
5263
5527
|
/** Grounding support. */
|
|
5264
5528
|
export declare interface GroundingSupport {
|
|
5265
|
-
/** Confidence score of the support references.
|
|
5529
|
+
/** Confidence score of the support references.
|
|
5530
|
+
|
|
5531
|
+
Ranges from 0 to 1. 1 is the most confident. This list must have the
|
|
5532
|
+
same size as the grounding_chunk_indices. */
|
|
5266
5533
|
confidenceScores?: number[];
|
|
5267
|
-
/** A list of indices (into 'grounding_chunk') specifying the
|
|
5534
|
+
/** A list of indices (into 'grounding_chunk') specifying the
|
|
5535
|
+
citations associated with the claim. For instance [1,3,4] means that
|
|
5536
|
+
grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the
|
|
5537
|
+
retrieved content attributed to the claim. */
|
|
5268
5538
|
groundingChunkIndices?: number[];
|
|
5269
5539
|
/** Segment of the content this support belongs to. */
|
|
5270
5540
|
segment?: Segment;
|
|
5271
5541
|
}
|
|
5272
5542
|
|
|
5273
|
-
/**
|
|
5543
|
+
/** The method for blocking content. If not specified, the default behavior is to use the probability score. This enum is not supported in Gemini API. */
|
|
5274
5544
|
export declare enum HarmBlockMethod {
|
|
5275
5545
|
/**
|
|
5276
5546
|
* The harm block method is unspecified.
|
|
@@ -5286,54 +5556,54 @@ export declare enum HarmBlockMethod {
|
|
|
5286
5556
|
PROBABILITY = "PROBABILITY"
|
|
5287
5557
|
}
|
|
5288
5558
|
|
|
5289
|
-
/** The harm
|
|
5559
|
+
/** The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
|
|
5290
5560
|
export declare enum HarmBlockThreshold {
|
|
5291
5561
|
/**
|
|
5292
|
-
*
|
|
5562
|
+
* The harm block threshold is unspecified.
|
|
5293
5563
|
*/
|
|
5294
5564
|
HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
|
|
5295
5565
|
/**
|
|
5296
|
-
* Block
|
|
5566
|
+
* Block content with a low harm probability or higher.
|
|
5297
5567
|
*/
|
|
5298
5568
|
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
|
|
5299
5569
|
/**
|
|
5300
|
-
* Block medium
|
|
5570
|
+
* Block content with a medium harm probability or higher.
|
|
5301
5571
|
*/
|
|
5302
5572
|
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
|
|
5303
5573
|
/**
|
|
5304
|
-
* Block
|
|
5574
|
+
* Block content with a high harm probability.
|
|
5305
5575
|
*/
|
|
5306
5576
|
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
|
|
5307
5577
|
/**
|
|
5308
|
-
*
|
|
5578
|
+
* Do not block any content, regardless of its harm probability.
|
|
5309
5579
|
*/
|
|
5310
5580
|
BLOCK_NONE = "BLOCK_NONE",
|
|
5311
5581
|
/**
|
|
5312
|
-
* Turn off the safety filter.
|
|
5582
|
+
* Turn off the safety filter entirely.
|
|
5313
5583
|
*/
|
|
5314
5584
|
OFF = "OFF"
|
|
5315
5585
|
}
|
|
5316
5586
|
|
|
5317
|
-
/**
|
|
5587
|
+
/** The harm category to be blocked. */
|
|
5318
5588
|
export declare enum HarmCategory {
|
|
5319
5589
|
/**
|
|
5320
|
-
*
|
|
5590
|
+
* Default value. This value is unused.
|
|
5321
5591
|
*/
|
|
5322
5592
|
HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED",
|
|
5323
5593
|
/**
|
|
5324
|
-
*
|
|
5594
|
+
* Abusive, threatening, or content intended to bully, torment, or ridicule.
|
|
5325
5595
|
*/
|
|
5326
5596
|
HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT",
|
|
5327
5597
|
/**
|
|
5328
|
-
*
|
|
5598
|
+
* Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
|
|
5329
5599
|
*/
|
|
5330
5600
|
HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
|
|
5331
5601
|
/**
|
|
5332
|
-
*
|
|
5602
|
+
* Content that contains sexually explicit material.
|
|
5333
5603
|
*/
|
|
5334
5604
|
HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
|
5335
5605
|
/**
|
|
5336
|
-
*
|
|
5606
|
+
* Content that promotes, facilitates, or enables dangerous activities.
|
|
5337
5607
|
*/
|
|
5338
5608
|
HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
|
|
5339
5609
|
/**
|
|
@@ -5341,71 +5611,71 @@ export declare enum HarmCategory {
|
|
|
5341
5611
|
*/
|
|
5342
5612
|
HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY",
|
|
5343
5613
|
/**
|
|
5344
|
-
*
|
|
5614
|
+
* Images that contain hate speech. This enum value is not supported in Gemini API.
|
|
5345
5615
|
*/
|
|
5346
5616
|
HARM_CATEGORY_IMAGE_HATE = "HARM_CATEGORY_IMAGE_HATE",
|
|
5347
5617
|
/**
|
|
5348
|
-
*
|
|
5618
|
+
* Images that contain dangerous content. This enum value is not supported in Gemini API.
|
|
5349
5619
|
*/
|
|
5350
5620
|
HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT",
|
|
5351
5621
|
/**
|
|
5352
|
-
*
|
|
5622
|
+
* Images that contain harassment. This enum value is not supported in Gemini API.
|
|
5353
5623
|
*/
|
|
5354
5624
|
HARM_CATEGORY_IMAGE_HARASSMENT = "HARM_CATEGORY_IMAGE_HARASSMENT",
|
|
5355
5625
|
/**
|
|
5356
|
-
*
|
|
5626
|
+
* Images that contain sexually explicit content. This enum value is not supported in Gemini API.
|
|
5357
5627
|
*/
|
|
5358
5628
|
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT",
|
|
5359
5629
|
/**
|
|
5360
|
-
*
|
|
5630
|
+
* Prompts designed to bypass safety filters. This enum value is not supported in Gemini API.
|
|
5361
5631
|
*/
|
|
5362
5632
|
HARM_CATEGORY_JAILBREAK = "HARM_CATEGORY_JAILBREAK"
|
|
5363
5633
|
}
|
|
5364
5634
|
|
|
5365
|
-
/** Output only.
|
|
5635
|
+
/** Output only. The probability of harm for this category. */
|
|
5366
5636
|
export declare enum HarmProbability {
|
|
5367
5637
|
/**
|
|
5368
|
-
*
|
|
5638
|
+
* The harm probability is unspecified.
|
|
5369
5639
|
*/
|
|
5370
5640
|
HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED",
|
|
5371
5641
|
/**
|
|
5372
|
-
*
|
|
5642
|
+
* The harm probability is negligible.
|
|
5373
5643
|
*/
|
|
5374
5644
|
NEGLIGIBLE = "NEGLIGIBLE",
|
|
5375
5645
|
/**
|
|
5376
|
-
*
|
|
5646
|
+
* The harm probability is low.
|
|
5377
5647
|
*/
|
|
5378
5648
|
LOW = "LOW",
|
|
5379
5649
|
/**
|
|
5380
|
-
*
|
|
5650
|
+
* The harm probability is medium.
|
|
5381
5651
|
*/
|
|
5382
5652
|
MEDIUM = "MEDIUM",
|
|
5383
5653
|
/**
|
|
5384
|
-
*
|
|
5654
|
+
* The harm probability is high.
|
|
5385
5655
|
*/
|
|
5386
5656
|
HIGH = "HIGH"
|
|
5387
5657
|
}
|
|
5388
5658
|
|
|
5389
|
-
/** Output only.
|
|
5659
|
+
/** Output only. The severity of harm for this category. This enum is not supported in Gemini API. */
|
|
5390
5660
|
export declare enum HarmSeverity {
|
|
5391
5661
|
/**
|
|
5392
|
-
*
|
|
5662
|
+
* The harm severity is unspecified.
|
|
5393
5663
|
*/
|
|
5394
5664
|
HARM_SEVERITY_UNSPECIFIED = "HARM_SEVERITY_UNSPECIFIED",
|
|
5395
5665
|
/**
|
|
5396
|
-
*
|
|
5666
|
+
* The harm severity is negligible.
|
|
5397
5667
|
*/
|
|
5398
5668
|
HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE",
|
|
5399
5669
|
/**
|
|
5400
|
-
*
|
|
5670
|
+
* The harm severity is low.
|
|
5401
5671
|
*/
|
|
5402
5672
|
HARM_SEVERITY_LOW = "HARM_SEVERITY_LOW",
|
|
5403
5673
|
/**
|
|
5404
|
-
*
|
|
5674
|
+
* The harm severity is medium.
|
|
5405
5675
|
*/
|
|
5406
5676
|
HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM",
|
|
5407
5677
|
/**
|
|
5408
|
-
*
|
|
5678
|
+
* The harm severity is high.
|
|
5409
5679
|
*/
|
|
5410
5680
|
HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH"
|
|
5411
5681
|
}
|
|
@@ -5561,20 +5831,36 @@ export declare interface ImageConfig {
|
|
|
5561
5831
|
/** Controls the generation of people. Supported values are:
|
|
5562
5832
|
ALLOW_ALL, ALLOW_ADULT, ALLOW_NONE. */
|
|
5563
5833
|
personGeneration?: string;
|
|
5834
|
+
/** Controls whether prominent people (celebrities)
|
|
5835
|
+
generation is allowed. If used with personGeneration, personGeneration
|
|
5836
|
+
enum would take precedence. For instance, if ALLOW_NONE is set, all person
|
|
5837
|
+
generation would be blocked. If this field is unspecified, the default
|
|
5838
|
+
behavior is to allow prominent people. */
|
|
5839
|
+
prominentPeople?: ProminentPeople;
|
|
5564
5840
|
/** MIME type of the generated image. This field is not
|
|
5565
5841
|
supported in Gemini API. */
|
|
5566
5842
|
outputMimeType?: string;
|
|
5567
5843
|
/** Compression quality of the generated image (for
|
|
5568
5844
|
``image/jpeg`` only). This field is not supported in Gemini API. */
|
|
5569
5845
|
outputCompressionQuality?: number;
|
|
5846
|
+
/** Optional. The image output format for generated images. */
|
|
5847
|
+
imageOutputOptions?: ImageConfigImageOutputOptions;
|
|
5570
5848
|
}
|
|
5571
5849
|
|
|
5572
5850
|
/**
|
|
5573
5851
|
* The configuration for image interaction.
|
|
5574
5852
|
*/
|
|
5575
5853
|
declare interface ImageConfig_2 {
|
|
5576
|
-
aspect_ratio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9';
|
|
5577
|
-
image_size?: '1K' | '2K' | '4K';
|
|
5854
|
+
aspect_ratio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9' | '1:8' | '8:1' | '1:4' | '4:1';
|
|
5855
|
+
image_size?: '1K' | '2K' | '4K' | '512';
|
|
5856
|
+
}
|
|
5857
|
+
|
|
5858
|
+
/** The image output format for generated images. This data type is not supported in Gemini API. */
|
|
5859
|
+
export declare interface ImageConfigImageOutputOptions {
|
|
5860
|
+
/** Optional. The compression quality of the output image. */
|
|
5861
|
+
compressionQuality?: number;
|
|
5862
|
+
/** Optional. The image format that the output should be saved as. */
|
|
5863
|
+
mimeType?: string;
|
|
5578
5864
|
}
|
|
5579
5865
|
|
|
5580
5866
|
/**
|
|
@@ -5589,7 +5875,7 @@ declare interface ImageContent {
|
|
|
5589
5875
|
/**
|
|
5590
5876
|
* The mime type of the image.
|
|
5591
5877
|
*/
|
|
5592
|
-
mime_type?:
|
|
5878
|
+
mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif';
|
|
5593
5879
|
/**
|
|
5594
5880
|
* The resolution of the media.
|
|
5595
5881
|
*/
|
|
@@ -5600,11 +5886,6 @@ declare interface ImageContent {
|
|
|
5600
5886
|
uri?: string;
|
|
5601
5887
|
}
|
|
5602
5888
|
|
|
5603
|
-
/**
|
|
5604
|
-
* The mime type of the image.
|
|
5605
|
-
*/
|
|
5606
|
-
declare type ImageMimeType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif' | (string & {});
|
|
5607
|
-
|
|
5608
5889
|
/** Enum that specifies the language of the text in the prompt. */
|
|
5609
5890
|
export declare enum ImagePromptLanguage {
|
|
5610
5891
|
/**
|
|
@@ -5641,6 +5922,10 @@ export declare enum ImagePromptLanguage {
|
|
|
5641
5922
|
es = "es"
|
|
5642
5923
|
}
|
|
5643
5924
|
|
|
5925
|
+
/** Image search for grounding and related configurations. */
|
|
5926
|
+
export declare interface ImageSearch {
|
|
5927
|
+
}
|
|
5928
|
+
|
|
5644
5929
|
/** Optional parameters for importing a file. */
|
|
5645
5930
|
export declare interface ImportFileConfig {
|
|
5646
5931
|
/** Used to override HTTP request options. */
|
|
@@ -5744,19 +6029,32 @@ declare interface Interaction {
|
|
|
5744
6029
|
* Output only. A unique identifier for the interaction completion.
|
|
5745
6030
|
*/
|
|
5746
6031
|
id: string;
|
|
6032
|
+
/**
|
|
6033
|
+
* Output only. The time at which the response was created in ISO 8601 format
|
|
6034
|
+
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6035
|
+
*/
|
|
6036
|
+
created: string;
|
|
5747
6037
|
/**
|
|
5748
6038
|
* Output only. The status of the interaction.
|
|
5749
6039
|
*/
|
|
5750
6040
|
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
6041
|
+
/**
|
|
6042
|
+
* Output only. The time at which the response was last updated in ISO 8601 format
|
|
6043
|
+
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6044
|
+
*/
|
|
6045
|
+
updated: string;
|
|
5751
6046
|
/**
|
|
5752
6047
|
* The name of the `Agent` used for generating the interaction.
|
|
5753
6048
|
*/
|
|
5754
6049
|
agent?: (string & {}) | 'deep-research-pro-preview-12-2025';
|
|
5755
6050
|
/**
|
|
5756
|
-
*
|
|
5757
|
-
|
|
6051
|
+
* Configuration for the agent.
|
|
6052
|
+
*/
|
|
6053
|
+
agent_config?: DynamicAgentConfig | DeepResearchAgentConfig;
|
|
6054
|
+
/**
|
|
6055
|
+
* The inputs for the interaction.
|
|
5758
6056
|
*/
|
|
5759
|
-
|
|
6057
|
+
input?: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
|
|
5760
6058
|
/**
|
|
5761
6059
|
* The name of the `Model` used for generating the interaction.
|
|
5762
6060
|
*/
|
|
@@ -5769,15 +6067,31 @@ declare interface Interaction {
|
|
|
5769
6067
|
* The ID of the previous interaction, if any.
|
|
5770
6068
|
*/
|
|
5771
6069
|
previous_interaction_id?: string;
|
|
6070
|
+
/**
|
|
6071
|
+
* Enforces that the generated response is a JSON object that complies with
|
|
6072
|
+
* the JSON schema specified in this field.
|
|
6073
|
+
*/
|
|
6074
|
+
response_format?: unknown;
|
|
6075
|
+
/**
|
|
6076
|
+
* The mime type of the response. This is required if response_format is set.
|
|
6077
|
+
*/
|
|
6078
|
+
response_mime_type?: string;
|
|
6079
|
+
/**
|
|
6080
|
+
* The requested modalities of the response (TEXT, IMAGE, AUDIO).
|
|
6081
|
+
*/
|
|
6082
|
+
response_modalities?: Array<'text' | 'image' | 'audio'>;
|
|
5772
6083
|
/**
|
|
5773
6084
|
* Output only. The role of the interaction.
|
|
5774
6085
|
*/
|
|
5775
6086
|
role?: string;
|
|
5776
6087
|
/**
|
|
5777
|
-
*
|
|
5778
|
-
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6088
|
+
* System instruction for the interaction.
|
|
5779
6089
|
*/
|
|
5780
|
-
|
|
6090
|
+
system_instruction?: string;
|
|
6091
|
+
/**
|
|
6092
|
+
* A list of tool declarations the model may call during interaction.
|
|
6093
|
+
*/
|
|
6094
|
+
tools?: Array<Tool_2>;
|
|
5781
6095
|
/**
|
|
5782
6096
|
* Output only. Statistics on the interaction request's token usage.
|
|
5783
6097
|
*/
|
|
@@ -5794,13 +6108,14 @@ declare interface InteractionCancelParams {
|
|
|
5794
6108
|
declare interface InteractionCompleteEvent {
|
|
5795
6109
|
event_type: 'interaction.complete';
|
|
5796
6110
|
/**
|
|
5797
|
-
* The
|
|
6111
|
+
* The completed interaction with empty outputs to reduce the payload size.
|
|
6112
|
+
* Use the preceding ContentDelta events for the actual output.
|
|
5798
6113
|
*/
|
|
5799
|
-
|
|
6114
|
+
interaction: Interaction;
|
|
5800
6115
|
/**
|
|
5801
|
-
* The
|
|
6116
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
5802
6117
|
*/
|
|
5803
|
-
|
|
6118
|
+
event_id?: string;
|
|
5804
6119
|
}
|
|
5805
6120
|
|
|
5806
6121
|
declare type InteractionCreateParams = CreateModelInteractionParamsNonStreaming | CreateModelInteractionParamsStreaming | CreateAgentInteractionParamsNonStreaming | CreateAgentInteractionParamsStreaming;
|
|
@@ -5858,7 +6173,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
5858
6173
|
}
|
|
5859
6174
|
|
|
5860
6175
|
export declare namespace Interactions {
|
|
5861
|
-
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type
|
|
6176
|
+
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallContent as CodeExecutionCallContent, type CodeExecutionResultContent as CodeExecutionResultContent, type Content_2 as Content, type ContentDelta as ContentDelta, type ContentStart as ContentStart, type ContentStop as ContentStop, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileSearchCallContent as FileSearchCallContent, type FileSearchResultContent as FileSearchResultContent, type Function_2 as Function, type FunctionCallContent as FunctionCallContent, type FunctionResultContent as FunctionResultContent, type GenerationConfig_2 as GenerationConfig, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallContent as GoogleSearchCallContent, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultContent as GoogleSearchResultContent, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type Interaction as Interaction, type InteractionCompleteEvent as InteractionCompleteEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStartEvent as InteractionStartEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallContent as MCPServerToolCallContent, type MCPServerToolResultContent as MCPServerToolResultContent, type Model_2 as Model, type SpeechConfig_2 as SpeechConfig, type TextContent as TextContent, type ThinkingLevel_2 as ThinkingLevel, type ThoughtContent as ThoughtContent, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type Turn as Turn, type URLContextCallArguments as URLContextCallArguments, type URLContextCallContent as URLContextCallContent, type URLContextResult as URLContextResult, type URLContextResultContent as URLContextResultContent, type Usage as Usage, type VideoContent as VideoContent, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
|
|
5862
6177
|
}
|
|
5863
6178
|
|
|
5864
6179
|
declare namespace InteractionsAPI {
|
|
@@ -5868,7 +6183,6 @@ declare namespace InteractionsAPI {
|
|
|
5868
6183
|
AllowedTools,
|
|
5869
6184
|
Annotation,
|
|
5870
6185
|
AudioContent,
|
|
5871
|
-
AudioMimeType,
|
|
5872
6186
|
CodeExecutionCallArguments,
|
|
5873
6187
|
CodeExecutionCallContent,
|
|
5874
6188
|
CodeExecutionResultContent,
|
|
@@ -5878,7 +6192,6 @@ declare namespace InteractionsAPI {
|
|
|
5878
6192
|
ContentStop,
|
|
5879
6193
|
DeepResearchAgentConfig,
|
|
5880
6194
|
DocumentContent,
|
|
5881
|
-
DocumentMimeType,
|
|
5882
6195
|
DynamicAgentConfig,
|
|
5883
6196
|
ErrorEvent_2 as ErrorEvent,
|
|
5884
6197
|
FileSearchCallContent,
|
|
@@ -5893,7 +6206,6 @@ declare namespace InteractionsAPI {
|
|
|
5893
6206
|
GoogleSearchResultContent,
|
|
5894
6207
|
ImageConfig_2 as ImageConfig,
|
|
5895
6208
|
ImageContent,
|
|
5896
|
-
ImageMimeType,
|
|
5897
6209
|
Interaction,
|
|
5898
6210
|
InteractionCompleteEvent,
|
|
5899
6211
|
InteractionSSEEvent,
|
|
@@ -5907,7 +6219,6 @@ declare namespace InteractionsAPI {
|
|
|
5907
6219
|
ThinkingLevel_2 as ThinkingLevel,
|
|
5908
6220
|
ThoughtContent,
|
|
5909
6221
|
Tool_2 as Tool,
|
|
5910
|
-
ToolChoice,
|
|
5911
6222
|
ToolChoiceConfig,
|
|
5912
6223
|
ToolChoiceType,
|
|
5913
6224
|
Turn,
|
|
@@ -5917,7 +6228,6 @@ declare namespace InteractionsAPI {
|
|
|
5917
6228
|
URLContextResultContent,
|
|
5918
6229
|
Usage,
|
|
5919
6230
|
VideoContent,
|
|
5920
|
-
VideoMimeType,
|
|
5921
6231
|
InteractionDeleteResponse,
|
|
5922
6232
|
InteractionCreateParams,
|
|
5923
6233
|
BaseCreateModelInteractionParams,
|
|
@@ -5940,23 +6250,23 @@ declare type InteractionSSEEvent = InteractionStartEvent | InteractionCompleteEv
|
|
|
5940
6250
|
declare interface InteractionStartEvent {
|
|
5941
6251
|
event_type: 'interaction.start';
|
|
5942
6252
|
/**
|
|
5943
|
-
* The
|
|
6253
|
+
* The Interaction resource.
|
|
5944
6254
|
*/
|
|
5945
|
-
|
|
6255
|
+
interaction: Interaction;
|
|
5946
6256
|
/**
|
|
5947
|
-
* The
|
|
6257
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
5948
6258
|
*/
|
|
5949
|
-
|
|
6259
|
+
event_id?: string;
|
|
5950
6260
|
}
|
|
5951
6261
|
|
|
5952
6262
|
declare interface InteractionStatusUpdate {
|
|
5953
6263
|
event_type: 'interaction.status_update';
|
|
6264
|
+
interaction_id: string;
|
|
6265
|
+
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
5954
6266
|
/**
|
|
5955
6267
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
5956
6268
|
*/
|
|
5957
6269
|
event_id?: string;
|
|
5958
|
-
interaction_id?: string;
|
|
5959
|
-
status?: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
5960
6270
|
}
|
|
5961
6271
|
|
|
5962
6272
|
/** Parameters for the private _Register method. */
|
|
@@ -6270,9 +6580,9 @@ export declare interface ListTuningJobsParameters {
|
|
|
6270
6580
|
export declare class ListTuningJobsResponse {
|
|
6271
6581
|
/** Used to retain the full HTTP response. */
|
|
6272
6582
|
sdkHttpResponse?: HttpResponse;
|
|
6273
|
-
/** A token to retrieve the next page of results. Pass
|
|
6583
|
+
/** A token to retrieve the next page of results. Pass this token in a subsequent [GenAiTuningService.ListTuningJobs] call to retrieve the next page of results. */
|
|
6274
6584
|
nextPageToken?: string;
|
|
6275
|
-
/**
|
|
6585
|
+
/** The tuning jobs that match the request. */
|
|
6276
6586
|
tuningJobs?: TuningJob[];
|
|
6277
6587
|
}
|
|
6278
6588
|
|
|
@@ -7058,27 +7368,27 @@ declare type Logger = {
|
|
|
7058
7368
|
|
|
7059
7369
|
declare type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug';
|
|
7060
7370
|
|
|
7061
|
-
/**
|
|
7371
|
+
/** The log probabilities of the tokens generated by the model. This is useful for understanding the model's confidence in its predictions and for debugging. For example, you can use log probabilities to identify when the model is making a less confident prediction or to explore alternative responses that the model considered. A low log probability can also indicate that the model is "hallucinating" or generating factually incorrect information. */
|
|
7062
7372
|
export declare interface LogprobsResult {
|
|
7063
|
-
/**
|
|
7373
|
+
/** A list of the chosen candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps. Note that the chosen candidate might not be in `top_candidates`. */
|
|
7064
7374
|
chosenCandidates?: LogprobsResultCandidate[];
|
|
7065
|
-
/**
|
|
7375
|
+
/** A list of the top candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps. */
|
|
7066
7376
|
topCandidates?: LogprobsResultTopCandidates[];
|
|
7067
7377
|
}
|
|
7068
7378
|
|
|
7069
|
-
/**
|
|
7379
|
+
/** A single token and its associated log probability. */
|
|
7070
7380
|
export declare interface LogprobsResultCandidate {
|
|
7071
|
-
/** The
|
|
7381
|
+
/** The log probability of this token. A higher value indicates that the model was more confident in this token. The log probability can be used to assess the relative likelihood of different tokens and to identify when the model is uncertain. */
|
|
7072
7382
|
logProbability?: number;
|
|
7073
|
-
/** The
|
|
7383
|
+
/** The token's string representation. */
|
|
7074
7384
|
token?: string;
|
|
7075
|
-
/** The
|
|
7385
|
+
/** The token's numerical ID. While the `token` field provides the string representation of the token, the `token_id` is the numerical representation that the model uses internally. This can be useful for developers who want to build custom logic based on the model's vocabulary. */
|
|
7076
7386
|
tokenId?: number;
|
|
7077
7387
|
}
|
|
7078
7388
|
|
|
7079
|
-
/**
|
|
7389
|
+
/** A list of the top candidate tokens and their log probabilities at each decoding step. This can be used to see what other tokens the model considered. */
|
|
7080
7390
|
export declare interface LogprobsResultTopCandidates {
|
|
7081
|
-
/**
|
|
7391
|
+
/** The list of candidate tokens, sorted by log probability in descending order. */
|
|
7082
7392
|
candidates?: LogprobsResultCandidate[];
|
|
7083
7393
|
}
|
|
7084
7394
|
|
|
@@ -7126,6 +7436,14 @@ export declare enum MaskReferenceMode {
|
|
|
7126
7436
|
MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
|
|
7127
7437
|
}
|
|
7128
7438
|
|
|
7439
|
+
/** 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: 5. This data type is not supported in Vertex AI. */
|
|
7440
|
+
export declare interface McpServer {
|
|
7441
|
+
/** The name of the MCPServer. */
|
|
7442
|
+
name?: string;
|
|
7443
|
+
/** A transport that can stream HTTP requests and responses. */
|
|
7444
|
+
streamableHttpTransport?: StreamableHttpTransport;
|
|
7445
|
+
}
|
|
7446
|
+
|
|
7129
7447
|
/**
|
|
7130
7448
|
* MCPServer tool call content.
|
|
7131
7449
|
*/
|
|
@@ -7149,6 +7467,10 @@ declare interface MCPServerToolCallContent {
|
|
|
7149
7467
|
*/
|
|
7150
7468
|
server_name: string;
|
|
7151
7469
|
type: 'mcp_server_tool_call';
|
|
7470
|
+
/**
|
|
7471
|
+
* A signature hash for backend validation.
|
|
7472
|
+
*/
|
|
7473
|
+
signature?: string;
|
|
7152
7474
|
}
|
|
7153
7475
|
|
|
7154
7476
|
/**
|
|
@@ -7172,6 +7494,10 @@ declare interface MCPServerToolResultContent {
|
|
|
7172
7494
|
* The name of the used MCP server.
|
|
7173
7495
|
*/
|
|
7174
7496
|
server_name?: string;
|
|
7497
|
+
/**
|
|
7498
|
+
* A signature hash for backend validation.
|
|
7499
|
+
*/
|
|
7500
|
+
signature?: string;
|
|
7175
7501
|
}
|
|
7176
7502
|
|
|
7177
7503
|
declare namespace MCPServerToolResultContent {
|
|
@@ -7272,7 +7598,7 @@ export declare enum Modality {
|
|
|
7272
7598
|
export declare interface ModalityTokenCount {
|
|
7273
7599
|
/** The modality associated with this token count. */
|
|
7274
7600
|
modality?: MediaModality;
|
|
7275
|
-
/**
|
|
7601
|
+
/** The number of tokens counted for this modality. */
|
|
7276
7602
|
tokenCount?: number;
|
|
7277
7603
|
}
|
|
7278
7604
|
|
|
@@ -7334,13 +7660,13 @@ export declare interface Model {
|
|
|
7334
7660
|
/**
|
|
7335
7661
|
* The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
|
|
7336
7662
|
*/
|
|
7337
|
-
declare type Model_2 = 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | (string & {});
|
|
7663
|
+
declare type Model_2 = 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | (string & {});
|
|
7338
7664
|
|
|
7339
|
-
/** Configuration for Model Armor
|
|
7665
|
+
/** Configuration for Model Armor. Model Armor is a Google Cloud service that provides safety and security filtering for prompts and responses. It helps protect your AI applications from risks such as harmful content, sensitive data leakage, and prompt injection attacks. This data type is not supported in Gemini API. */
|
|
7340
7666
|
export declare interface ModelArmorConfig {
|
|
7341
|
-
/** Optional. The name of the Model Armor template to use for prompt
|
|
7667
|
+
/** Optional. The resource name of the Model Armor template to use for prompt screening. A Model Armor template is a set of customized filters and thresholds that define how Model Armor screens content. If specified, Model Armor will use this template to check the user's prompt for safety and security risks before it is sent to the model. The name must be in the format `projects/{project}/locations/{location}/templates/{template}`. */
|
|
7342
7668
|
promptTemplateName?: string;
|
|
7343
|
-
/** Optional. The name of the Model Armor template to use for response
|
|
7669
|
+
/** Optional. The resource name of the Model Armor template to use for response screening. A Model Armor template is a set of customized filters and thresholds that define how Model Armor screens content. If specified, Model Armor will use this template to check the model's response for safety and security risks before it is returned to the user. The name must be in the format `projects/{project}/locations/{location}/templates/{template}`. */
|
|
7344
7670
|
responseTemplateName?: string;
|
|
7345
7671
|
}
|
|
7346
7672
|
|
|
@@ -7887,6 +8213,12 @@ export declare enum Outcome {
|
|
|
7887
8213
|
OUTCOME_DEADLINE_EXCEEDED = "OUTCOME_DEADLINE_EXCEEDED"
|
|
7888
8214
|
}
|
|
7889
8215
|
|
|
8216
|
+
/** Describes the info for output of EvaluationService. This data type is not supported in Gemini API. */
|
|
8217
|
+
export declare interface OutputInfo {
|
|
8218
|
+
/** Output only. The full path of the Cloud Storage directory created, into which the evaluation results and aggregation results are written. */
|
|
8219
|
+
gcsOutputDirectory?: string;
|
|
8220
|
+
}
|
|
8221
|
+
|
|
7890
8222
|
/**
|
|
7891
8223
|
* Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
|
|
7892
8224
|
*/
|
|
@@ -8034,6 +8366,36 @@ export declare class Pager<T> implements AsyncIterable<T> {
|
|
|
8034
8366
|
hasNextPage(): boolean;
|
|
8035
8367
|
}
|
|
8036
8368
|
|
|
8369
|
+
/** Output only. Pairwise metric choice. This enum is not supported in Gemini API. */
|
|
8370
|
+
export declare enum PairwiseChoice {
|
|
8371
|
+
/**
|
|
8372
|
+
* Unspecified prediction choice.
|
|
8373
|
+
*/
|
|
8374
|
+
PAIRWISE_CHOICE_UNSPECIFIED = "PAIRWISE_CHOICE_UNSPECIFIED",
|
|
8375
|
+
/**
|
|
8376
|
+
* Baseline prediction wins
|
|
8377
|
+
*/
|
|
8378
|
+
BASELINE = "BASELINE",
|
|
8379
|
+
/**
|
|
8380
|
+
* Candidate prediction wins
|
|
8381
|
+
*/
|
|
8382
|
+
CANDIDATE = "CANDIDATE",
|
|
8383
|
+
/**
|
|
8384
|
+
* Winner cannot be determined
|
|
8385
|
+
*/
|
|
8386
|
+
TIE = "TIE"
|
|
8387
|
+
}
|
|
8388
|
+
|
|
8389
|
+
/** Spec for pairwise metric result. This data type is not supported in Gemini API. */
|
|
8390
|
+
export declare interface PairwiseMetricResult {
|
|
8391
|
+
/** Output only. Spec for custom output. */
|
|
8392
|
+
customOutput?: CustomOutput;
|
|
8393
|
+
/** Output only. Explanation for pairwise metric score. */
|
|
8394
|
+
explanation?: string;
|
|
8395
|
+
/** Output only. Pairwise metric choice. */
|
|
8396
|
+
pairwiseChoice?: PairwiseChoice;
|
|
8397
|
+
}
|
|
8398
|
+
|
|
8037
8399
|
/** A datatype containing media content.
|
|
8038
8400
|
|
|
8039
8401
|
Exactly one field within a Part should be set, representing the specific type
|
|
@@ -8043,21 +8405,21 @@ export declare interface Part {
|
|
|
8043
8405
|
/** Media resolution for the input media.
|
|
8044
8406
|
*/
|
|
8045
8407
|
mediaResolution?: PartMediaResolution;
|
|
8046
|
-
/** Optional.
|
|
8408
|
+
/** Optional. The result of executing the ExecutableCode. */
|
|
8047
8409
|
codeExecutionResult?: CodeExecutionResult;
|
|
8048
|
-
/** Optional. Code generated by the model that is
|
|
8410
|
+
/** Optional. Code generated by the model that is intended to be executed. */
|
|
8049
8411
|
executableCode?: ExecutableCode;
|
|
8050
|
-
/** Optional. URI
|
|
8412
|
+
/** Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage. */
|
|
8051
8413
|
fileData?: FileData;
|
|
8052
|
-
/** Optional. A predicted
|
|
8414
|
+
/** Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function. */
|
|
8053
8415
|
functionCall?: FunctionCall;
|
|
8054
|
-
/** Optional. The result
|
|
8416
|
+
/** Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted. */
|
|
8055
8417
|
functionResponse?: FunctionResponse;
|
|
8056
|
-
/** Optional.
|
|
8418
|
+
/** Optional. The inline data content of the part. This can be used to include images, audio, or video in a request. */
|
|
8057
8419
|
inlineData?: Blob_2;
|
|
8058
|
-
/** Optional.
|
|
8420
|
+
/** Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent. */
|
|
8059
8421
|
text?: string;
|
|
8060
|
-
/** Optional. Indicates
|
|
8422
|
+
/** Optional. Indicates whether the `part` represents the model's thought process or reasoning. */
|
|
8061
8423
|
thought?: boolean;
|
|
8062
8424
|
/** Optional. An opaque signature for the thought so it can be reused in subsequent requests.
|
|
8063
8425
|
* @remarks Encoded as base64 string. */
|
|
@@ -8068,16 +8430,16 @@ export declare interface Part {
|
|
|
8068
8430
|
|
|
8069
8431
|
/** Partial argument value of the function call. This data type is not supported in Gemini API. */
|
|
8070
8432
|
export declare interface PartialArg {
|
|
8433
|
+
/** Optional. Represents a boolean value. */
|
|
8434
|
+
boolValue?: boolean;
|
|
8435
|
+
/** Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". */
|
|
8436
|
+
jsonPath?: string;
|
|
8071
8437
|
/** Optional. Represents a null value. */
|
|
8072
8438
|
nullValue?: 'NULL_VALUE';
|
|
8073
8439
|
/** Optional. Represents a double value. */
|
|
8074
8440
|
numberValue?: number;
|
|
8075
8441
|
/** Optional. Represents a string value. */
|
|
8076
8442
|
stringValue?: string;
|
|
8077
|
-
/** Optional. Represents a boolean value. */
|
|
8078
|
-
boolValue?: boolean;
|
|
8079
|
-
/** Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". */
|
|
8080
|
-
jsonPath?: string;
|
|
8081
8443
|
/** Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow. */
|
|
8082
8444
|
willContinue?: boolean;
|
|
8083
8445
|
}
|
|
@@ -8181,14 +8543,28 @@ export declare enum PhishBlockThreshold {
|
|
|
8181
8543
|
BLOCK_ONLY_EXTREMELY_HIGH = "BLOCK_ONLY_EXTREMELY_HIGH"
|
|
8182
8544
|
}
|
|
8183
8545
|
|
|
8184
|
-
/**
|
|
8546
|
+
/** Spec for pointwise metric result. This data type is not supported in Gemini API. */
|
|
8547
|
+
export declare interface PointwiseMetricResult {
|
|
8548
|
+
/** Output only. Spec for custom output. */
|
|
8549
|
+
customOutput?: CustomOutput;
|
|
8550
|
+
/** Output only. Explanation for pointwise metric score. */
|
|
8551
|
+
explanation?: string;
|
|
8552
|
+
/** Output only. Pointwise metric score. */
|
|
8553
|
+
score?: number;
|
|
8554
|
+
}
|
|
8555
|
+
|
|
8556
|
+
/** Configuration for a prebuilt voice. */
|
|
8185
8557
|
export declare interface PrebuiltVoiceConfig {
|
|
8186
|
-
/** The name of the
|
|
8558
|
+
/** The name of the prebuilt voice to use. */
|
|
8187
8559
|
voiceName?: string;
|
|
8188
8560
|
}
|
|
8189
8561
|
|
|
8190
8562
|
/** Statistics computed for datasets used for preference optimization. This data type is not supported in Gemini API. */
|
|
8191
8563
|
export declare interface PreferenceOptimizationDataStats {
|
|
8564
|
+
/** Output only. A partial sample of the indices (starting from 1) of the dropped examples. */
|
|
8565
|
+
droppedExampleIndices?: string[];
|
|
8566
|
+
/** Output only. For each index in `dropped_example_indices`, the user-facing reason why the example was dropped. */
|
|
8567
|
+
droppedExampleReasons?: string[];
|
|
8192
8568
|
/** Output only. Dataset distributions for scores variance per example. */
|
|
8193
8569
|
scoreVariancePerExampleDistribution?: DatasetDistribution;
|
|
8194
8570
|
/** Output only. Dataset distributions for scores. */
|
|
@@ -8255,6 +8631,22 @@ export declare interface ProductImage {
|
|
|
8255
8631
|
productImage?: Image_2;
|
|
8256
8632
|
}
|
|
8257
8633
|
|
|
8634
|
+
/** Enum for controlling whether the model can generate images of prominent people (celebrities). */
|
|
8635
|
+
export declare enum ProminentPeople {
|
|
8636
|
+
/**
|
|
8637
|
+
* Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
|
|
8638
|
+
*/
|
|
8639
|
+
PROMINENT_PEOPLE_UNSPECIFIED = "PROMINENT_PEOPLE_UNSPECIFIED",
|
|
8640
|
+
/**
|
|
8641
|
+
* Allows the model to generate images of prominent people.
|
|
8642
|
+
*/
|
|
8643
|
+
ALLOW_PROMINENT_PEOPLE = "ALLOW_PROMINENT_PEOPLE",
|
|
8644
|
+
/**
|
|
8645
|
+
* Prevents the model from generating images of prominent people.
|
|
8646
|
+
*/
|
|
8647
|
+
BLOCK_PROMINENT_PEOPLE = "BLOCK_PROMINENT_PEOPLE"
|
|
8648
|
+
}
|
|
8649
|
+
|
|
8258
8650
|
/**
|
|
8259
8651
|
* @license
|
|
8260
8652
|
* Copyright 2025 Google LLC
|
|
@@ -8329,6 +8721,12 @@ export declare interface RagRetrievalConfigRankingRankService {
|
|
|
8329
8721
|
declare class RateLimitError extends APIError<429, Headers> {
|
|
8330
8722
|
}
|
|
8331
8723
|
|
|
8724
|
+
/** Raw output. This data type is not supported in Gemini API. */
|
|
8725
|
+
export declare interface RawOutput {
|
|
8726
|
+
/** Output only. Raw output string. */
|
|
8727
|
+
rawOutput?: string[];
|
|
8728
|
+
}
|
|
8729
|
+
|
|
8332
8730
|
/** A raw reference image.
|
|
8333
8731
|
|
|
8334
8732
|
A raw reference image represents the base image to edit, provided by the user.
|
|
@@ -8630,12 +9028,23 @@ export declare interface RetrievalConfig {
|
|
|
8630
9028
|
languageCode?: string;
|
|
8631
9029
|
}
|
|
8632
9030
|
|
|
8633
|
-
/** Metadata
|
|
9031
|
+
/** Metadata returned to client when grounding is enabled. */
|
|
8634
9032
|
export declare interface RetrievalMetadata {
|
|
8635
|
-
/** Optional. Score indicating how likely information from
|
|
9033
|
+
/** Optional. Score indicating how likely information from google
|
|
9034
|
+
search could help answer the prompt. The score is in the range [0, 1],
|
|
9035
|
+
where 0 is the least likely and 1 is the most likely. This score is only
|
|
9036
|
+
populated when google search grounding and dynamic retrieval is enabled.
|
|
9037
|
+
It will be compared to the threshold to determine whether to trigger
|
|
9038
|
+
Google search. */
|
|
8636
9039
|
googleSearchDynamicRetrievalScore?: number;
|
|
8637
9040
|
}
|
|
8638
9041
|
|
|
9042
|
+
/** Rouge metric value for an instance. This data type is not supported in Gemini API. */
|
|
9043
|
+
export declare interface RougeMetricValue {
|
|
9044
|
+
/** Output only. Rouge score. */
|
|
9045
|
+
score?: number;
|
|
9046
|
+
}
|
|
9047
|
+
|
|
8639
9048
|
/** Safety attributes of a GeneratedImage or the user-provided prompt. */
|
|
8640
9049
|
export declare interface SafetyAttributes {
|
|
8641
9050
|
/** List of RAI categories. */
|
|
@@ -8654,31 +9063,31 @@ export declare enum SafetyFilterLevel {
|
|
|
8654
9063
|
BLOCK_NONE = "BLOCK_NONE"
|
|
8655
9064
|
}
|
|
8656
9065
|
|
|
8657
|
-
/**
|
|
9066
|
+
/** A safety rating for a piece of content. The safety rating contains the harm category and the harm probability level. */
|
|
8658
9067
|
export declare interface SafetyRating {
|
|
8659
|
-
/** Output only. Indicates whether the content was
|
|
9068
|
+
/** Output only. Indicates whether the content was blocked because of this rating. */
|
|
8660
9069
|
blocked?: boolean;
|
|
8661
|
-
/** Output only.
|
|
9070
|
+
/** Output only. The harm category of this rating. */
|
|
8662
9071
|
category?: HarmCategory;
|
|
8663
9072
|
/** Output only. The overwritten threshold for the safety category of Gemini 2.0 image out. If minors are detected in the output image, the threshold of each safety category will be overwritten if user sets a lower threshold. This field is not supported in Gemini API. */
|
|
8664
9073
|
overwrittenThreshold?: HarmBlockThreshold;
|
|
8665
|
-
/** Output only.
|
|
9074
|
+
/** Output only. The probability of harm for this category. */
|
|
8666
9075
|
probability?: HarmProbability;
|
|
8667
|
-
/** Output only.
|
|
9076
|
+
/** Output only. The probability score of harm for this category. This field is not supported in Gemini API. */
|
|
8668
9077
|
probabilityScore?: number;
|
|
8669
|
-
/** Output only.
|
|
9078
|
+
/** Output only. The severity of harm for this category. This field is not supported in Gemini API. */
|
|
8670
9079
|
severity?: HarmSeverity;
|
|
8671
|
-
/** Output only.
|
|
9080
|
+
/** Output only. The severity score of harm for this category. This field is not supported in Gemini API. */
|
|
8672
9081
|
severityScore?: number;
|
|
8673
9082
|
}
|
|
8674
9083
|
|
|
8675
|
-
/**
|
|
9084
|
+
/** A safety setting that affects the safety-blocking behavior. A SafetySetting consists of a harm category and a threshold for that category. */
|
|
8676
9085
|
export declare interface SafetySetting {
|
|
8677
|
-
/** Required.
|
|
9086
|
+
/** Required. The harm category to be blocked. */
|
|
8678
9087
|
category?: HarmCategory;
|
|
8679
|
-
/** Optional.
|
|
9088
|
+
/** Optional. The method for blocking content. If not specified, the default behavior is to use the probability score. This field is not supported in Gemini API. */
|
|
8680
9089
|
method?: HarmBlockMethod;
|
|
8681
|
-
/** Required. The harm
|
|
9090
|
+
/** Required. The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
|
|
8682
9091
|
threshold?: HarmBlockThreshold;
|
|
8683
9092
|
}
|
|
8684
9093
|
|
|
@@ -8744,49 +9153,49 @@ export declare enum Scale {
|
|
|
8744
9153
|
object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
|
|
8745
9154
|
be added in the future as needed. */
|
|
8746
9155
|
export declare interface Schema {
|
|
8747
|
-
/** Optional. The
|
|
9156
|
+
/** Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`. */
|
|
8748
9157
|
anyOf?: Schema[];
|
|
8749
|
-
/** Optional. Default value
|
|
9158
|
+
/** Optional. Default value to use if the field is not specified. */
|
|
8750
9159
|
default?: unknown;
|
|
8751
|
-
/** Optional.
|
|
9160
|
+
/** Optional. Description of the schema. */
|
|
8752
9161
|
description?: string;
|
|
8753
|
-
/** Optional. Possible values of the
|
|
9162
|
+
/** Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:["EAST", "NORTH", "SOUTH", "WEST"]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:["101", "201", "301"]}` */
|
|
8754
9163
|
enum?: string[];
|
|
8755
|
-
/** Optional. Example of
|
|
9164
|
+
/** Optional. Example of an instance of this schema. */
|
|
8756
9165
|
example?: unknown;
|
|
8757
|
-
/** Optional. The format of the data.
|
|
9166
|
+
/** Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type. */
|
|
8758
9167
|
format?: string;
|
|
8759
|
-
/** Optional.
|
|
9168
|
+
/** Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array. */
|
|
8760
9169
|
items?: Schema;
|
|
8761
|
-
/** Optional.
|
|
9170
|
+
/** Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array. */
|
|
8762
9171
|
maxItems?: string;
|
|
8763
|
-
/** Optional.
|
|
9172
|
+
/** Optional. If type is `STRING`, `max_length` specifies the maximum length of the string. */
|
|
8764
9173
|
maxLength?: string;
|
|
8765
|
-
/** Optional.
|
|
9174
|
+
/** Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided. */
|
|
8766
9175
|
maxProperties?: string;
|
|
8767
|
-
/** Optional.
|
|
9176
|
+
/** Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value. */
|
|
8768
9177
|
maximum?: number;
|
|
8769
|
-
/** Optional.
|
|
9178
|
+
/** Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array. */
|
|
8770
9179
|
minItems?: string;
|
|
8771
|
-
/** Optional.
|
|
9180
|
+
/** Optional. If type is `STRING`, `min_length` specifies the minimum length of the string. */
|
|
8772
9181
|
minLength?: string;
|
|
8773
|
-
/** Optional.
|
|
9182
|
+
/** Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided. */
|
|
8774
9183
|
minProperties?: string;
|
|
8775
|
-
/** Optional.
|
|
9184
|
+
/** Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value. */
|
|
8776
9185
|
minimum?: number;
|
|
8777
|
-
/** Optional. Indicates if the value
|
|
9186
|
+
/** Optional. Indicates if the value of this field can be null. */
|
|
8778
9187
|
nullable?: boolean;
|
|
8779
|
-
/** Optional.
|
|
9188
|
+
/** Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match. */
|
|
8780
9189
|
pattern?: string;
|
|
8781
|
-
/** Optional.
|
|
9190
|
+
/** Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object. */
|
|
8782
9191
|
properties?: Record<string, Schema>;
|
|
8783
|
-
/** Optional.
|
|
9192
|
+
/** Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties. */
|
|
8784
9193
|
propertyOrdering?: string[];
|
|
8785
|
-
/** Optional.
|
|
9194
|
+
/** Optional. If type is `OBJECT`, `required` lists the names of properties that must be present. */
|
|
8786
9195
|
required?: string[];
|
|
8787
|
-
/** Optional.
|
|
9196
|
+
/** Optional. Title for the schema. */
|
|
8788
9197
|
title?: string;
|
|
8789
|
-
/** Optional.
|
|
9198
|
+
/** Optional. Data type of the schema field. */
|
|
8790
9199
|
type?: Type;
|
|
8791
9200
|
}
|
|
8792
9201
|
|
|
@@ -8798,24 +9207,40 @@ export declare interface ScribbleImage {
|
|
|
8798
9207
|
image?: Image_2;
|
|
8799
9208
|
}
|
|
8800
9209
|
|
|
8801
|
-
/**
|
|
9210
|
+
/** The entry point used to search for grounding sources. */
|
|
8802
9211
|
export declare interface SearchEntryPoint {
|
|
8803
|
-
/** Optional. Web content snippet that can be embedded in a web page
|
|
9212
|
+
/** Optional. Web content snippet that can be embedded in a web page
|
|
9213
|
+
or an app webview. */
|
|
8804
9214
|
renderedContent?: string;
|
|
8805
|
-
/** Optional.
|
|
9215
|
+
/** Optional. JSON representing array of tuples.
|
|
8806
9216
|
* @remarks Encoded as base64 string. */
|
|
8807
9217
|
sdkBlob?: string;
|
|
8808
9218
|
}
|
|
8809
9219
|
|
|
8810
|
-
/**
|
|
9220
|
+
/** Tool to support computer use. */
|
|
9221
|
+
export declare interface SearchTypes {
|
|
9222
|
+
/** Setting this field enables web search. Only text results are
|
|
9223
|
+
returned. */
|
|
9224
|
+
webSearch?: WebSearch;
|
|
9225
|
+
/** Setting this field enables image search. Image bytes are returned. */
|
|
9226
|
+
imageSearch?: ImageSearch;
|
|
9227
|
+
}
|
|
9228
|
+
|
|
9229
|
+
/** Segment of the content this support belongs to. */
|
|
8811
9230
|
export declare interface Segment {
|
|
8812
|
-
/** Output only.
|
|
9231
|
+
/** Output only. Start index in the given Part, measured in bytes.
|
|
9232
|
+
|
|
9233
|
+
Offset from the start of the Part, inclusive, starting at zero. */
|
|
9234
|
+
startIndex?: number;
|
|
9235
|
+
/** Output only. End index in the given Part, measured in bytes.
|
|
9236
|
+
|
|
9237
|
+
Offset from the start of the Part, exclusive, starting at zero. */
|
|
8813
9238
|
endIndex?: number;
|
|
8814
|
-
/** Output only. The index of a Part object within its parent
|
|
9239
|
+
/** Output only. The index of a Part object within its parent
|
|
9240
|
+
Content object. */
|
|
8815
9241
|
partIndex?: number;
|
|
8816
|
-
/** Output only.
|
|
8817
|
-
|
|
8818
|
-
/** Output only. The text corresponding to the segment from the response. */
|
|
9242
|
+
/** Output only. The text corresponding to the segment from the
|
|
9243
|
+
response. */
|
|
8819
9244
|
text?: string;
|
|
8820
9245
|
}
|
|
8821
9246
|
|
|
@@ -9091,7 +9516,7 @@ export declare interface SlidingWindow {
|
|
|
9091
9516
|
targetTokens?: string;
|
|
9092
9517
|
}
|
|
9093
9518
|
|
|
9094
|
-
/** Configuration for a single speaker in a multi
|
|
9519
|
+
/** Configuration for a single speaker in a multi-speaker setup. */
|
|
9095
9520
|
export declare interface SpeakerVoiceConfig {
|
|
9096
9521
|
/** Required. The name of the speaker. This should be the same as the speaker name used in the prompt. */
|
|
9097
9522
|
speaker?: string;
|
|
@@ -9102,7 +9527,7 @@ export declare interface SpeakerVoiceConfig {
|
|
|
9102
9527
|
export declare interface SpeechConfig {
|
|
9103
9528
|
/** Configuration for the voice of the response. */
|
|
9104
9529
|
voiceConfig?: VoiceConfig;
|
|
9105
|
-
/** Optional.
|
|
9530
|
+
/** Optional. The language code (ISO 639-1) for the speech synthesis. */
|
|
9106
9531
|
languageCode?: string;
|
|
9107
9532
|
/** The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`. */
|
|
9108
9533
|
multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
|
|
@@ -9169,6 +9594,20 @@ declare class Stream<Item> implements AsyncIterable<Item> {
|
|
|
9169
9594
|
toReadableStream(): _ReadableStream_2;
|
|
9170
9595
|
}
|
|
9171
9596
|
|
|
9597
|
+
/** A transport that can stream HTTP requests and responses. Next ID: 6. This data type is not supported in Vertex AI. */
|
|
9598
|
+
export declare interface StreamableHttpTransport {
|
|
9599
|
+
/** Optional: Fields for authentication headers, timeouts, etc., if needed. */
|
|
9600
|
+
headers?: Record<string, string>;
|
|
9601
|
+
/** Timeout for SSE read operations. */
|
|
9602
|
+
sseReadTimeout?: string;
|
|
9603
|
+
/** Whether to close the client session when the transport closes. */
|
|
9604
|
+
terminateOnClose?: boolean;
|
|
9605
|
+
/** HTTP timeout for regular operations. */
|
|
9606
|
+
timeout?: string;
|
|
9607
|
+
/** The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp". */
|
|
9608
|
+
url?: string;
|
|
9609
|
+
}
|
|
9610
|
+
|
|
9172
9611
|
/** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
|
|
9173
9612
|
export declare interface StringList {
|
|
9174
9613
|
/** The string values of the metadata to store. */
|
|
@@ -9354,15 +9793,15 @@ export declare interface TestTableItem {
|
|
|
9354
9793
|
* A text content block.
|
|
9355
9794
|
*/
|
|
9356
9795
|
declare interface TextContent {
|
|
9796
|
+
/**
|
|
9797
|
+
* The text content.
|
|
9798
|
+
*/
|
|
9799
|
+
text: string;
|
|
9357
9800
|
type: 'text';
|
|
9358
9801
|
/**
|
|
9359
9802
|
* Citation information for model-generated content.
|
|
9360
9803
|
*/
|
|
9361
9804
|
annotations?: Array<Annotation>;
|
|
9362
|
-
/**
|
|
9363
|
-
* The text content.
|
|
9364
|
-
*/
|
|
9365
|
-
text?: string;
|
|
9366
9805
|
}
|
|
9367
9806
|
|
|
9368
9807
|
/** The thinking features configuration. */
|
|
@@ -9528,20 +9967,25 @@ export declare interface Tool {
|
|
|
9528
9967
|
computerUse?: ComputerUse;
|
|
9529
9968
|
/** Optional. Tool to retrieve knowledge from the File Search Stores. */
|
|
9530
9969
|
fileSearch?: FileSearch;
|
|
9970
|
+
/** Enables the model to execute Google Search as part of generation. */
|
|
9971
|
+
googleSearch?: GoogleSearch;
|
|
9972
|
+
/** Optional. Tool that allows grounding the model's response with
|
|
9973
|
+
geospatial context related to the user's query. */
|
|
9974
|
+
googleMaps?: GoogleMaps;
|
|
9531
9975
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
9532
9976
|
codeExecution?: ToolCodeExecution;
|
|
9533
9977
|
/** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
|
|
9534
9978
|
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
9535
9979
|
/** Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided. */
|
|
9536
9980
|
functionDeclarations?: FunctionDeclaration[];
|
|
9537
|
-
/** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
|
|
9538
|
-
googleMaps?: GoogleMaps;
|
|
9539
|
-
/** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
|
|
9540
|
-
googleSearch?: GoogleSearch;
|
|
9541
9981
|
/** Optional. Specialized retrieval tool that is powered by Google Search. */
|
|
9542
9982
|
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
9983
|
+
/** Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation. This field is not supported in Gemini API. */
|
|
9984
|
+
parallelAiSearch?: ToolParallelAiSearch;
|
|
9543
9985
|
/** Optional. Tool to support URL context retrieval. */
|
|
9544
9986
|
urlContext?: UrlContext;
|
|
9987
|
+
/** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
|
|
9988
|
+
mcpServers?: McpServer[];
|
|
9545
9989
|
}
|
|
9546
9990
|
|
|
9547
9991
|
/**
|
|
@@ -9555,6 +9999,10 @@ declare namespace Tool_2 {
|
|
|
9555
9999
|
*/
|
|
9556
10000
|
interface GoogleSearch {
|
|
9557
10001
|
type: 'google_search';
|
|
10002
|
+
/**
|
|
10003
|
+
* The types of search grounding to enable.
|
|
10004
|
+
*/
|
|
10005
|
+
search_types?: Array<'web_search' | 'image_search'>;
|
|
9558
10006
|
}
|
|
9559
10007
|
/**
|
|
9560
10008
|
* A tool that can be used by the model to execute code.
|
|
@@ -9628,13 +10076,11 @@ declare namespace Tool_2 {
|
|
|
9628
10076
|
}
|
|
9629
10077
|
|
|
9630
10078
|
/**
|
|
9631
|
-
* The configuration
|
|
10079
|
+
* The tool choice configuration containing allowed tools.
|
|
9632
10080
|
*/
|
|
9633
|
-
declare type ToolChoice = ToolChoiceType | ToolChoiceConfig;
|
|
9634
|
-
|
|
9635
10081
|
declare interface ToolChoiceConfig {
|
|
9636
10082
|
/**
|
|
9637
|
-
* The
|
|
10083
|
+
* The allowed tools.
|
|
9638
10084
|
*/
|
|
9639
10085
|
allowed_tools?: AllowedTools;
|
|
9640
10086
|
}
|
|
@@ -9657,6 +10103,14 @@ export declare interface ToolConfig {
|
|
|
9657
10103
|
|
|
9658
10104
|
export declare type ToolListUnion = ToolUnion[];
|
|
9659
10105
|
|
|
10106
|
+
/** ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. This data type is not supported in Gemini API. */
|
|
10107
|
+
export declare interface ToolParallelAiSearch {
|
|
10108
|
+
/** Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details. */
|
|
10109
|
+
apiKey?: string;
|
|
10110
|
+
/** Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { "source_policy": { "include_domains": ["google.com", "wikipedia.org"], "exclude_domains": ["example.com"] }, "fetch_policy": { "max_age_seconds": 3600 } } */
|
|
10111
|
+
customConfigs?: Record<string, unknown>;
|
|
10112
|
+
}
|
|
10113
|
+
|
|
9660
10114
|
export declare type ToolUnion = Tool | CallableTool;
|
|
9661
10115
|
|
|
9662
10116
|
/** Output only. The traffic type for this request. This enum is not supported in Gemini API. */
|
|
@@ -9669,6 +10123,14 @@ export declare enum TrafficType {
|
|
|
9669
10123
|
* The request was processed using Pay-As-You-Go quota.
|
|
9670
10124
|
*/
|
|
9671
10125
|
ON_DEMAND = "ON_DEMAND",
|
|
10126
|
+
/**
|
|
10127
|
+
* Type for Priority Pay-As-You-Go traffic.
|
|
10128
|
+
*/
|
|
10129
|
+
ON_DEMAND_PRIORITY = "ON_DEMAND_PRIORITY",
|
|
10130
|
+
/**
|
|
10131
|
+
* Type for Flex traffic.
|
|
10132
|
+
*/
|
|
10133
|
+
ON_DEMAND_FLEX = "ON_DEMAND_FLEX",
|
|
9672
10134
|
/**
|
|
9673
10135
|
* Type for Provisioned Throughput traffic.
|
|
9674
10136
|
*/
|
|
@@ -9743,7 +10205,7 @@ export declare interface TuningDataset {
|
|
|
9743
10205
|
|
|
9744
10206
|
/** The tuning data statistic values for TuningJob. This data type is not supported in Gemini API. */
|
|
9745
10207
|
export declare interface TuningDataStats {
|
|
9746
|
-
/** Output only. Statistics for distillation. */
|
|
10208
|
+
/** Output only. Statistics for distillation prompt dataset. These statistics do not include the responses sampled from the teacher model. */
|
|
9747
10209
|
distillationDataStats?: DistillationDataStats;
|
|
9748
10210
|
/** Output only. Statistics for preference optimization. */
|
|
9749
10211
|
preferenceOptimizationDataStats?: PreferenceOptimizationDataStats;
|
|
@@ -9799,8 +10261,12 @@ export declare interface TuningJob {
|
|
|
9799
10261
|
partnerModelTuningSpec?: PartnerModelTuningSpec;
|
|
9800
10262
|
/** Optional. The user-provided path to custom model weights. Set this field to tune a custom model. The path must be a Cloud Storage directory that contains the model weights in .safetensors format along with associated model metadata files. If this field is set, the base_model field must still be set to indicate which base model the custom model is derived from. This feature is only available for open source models. */
|
|
9801
10263
|
customBaseModel?: string;
|
|
10264
|
+
/** Output only. Evaluation runs for the Tuning Job. */
|
|
10265
|
+
evaluateDatasetRuns?: EvaluateDatasetRun[];
|
|
9802
10266
|
/** Output only. The Experiment associated with this TuningJob. */
|
|
9803
10267
|
experiment?: string;
|
|
10268
|
+
/** Tuning Spec for Full Fine Tuning. */
|
|
10269
|
+
fullFineTuningSpec?: FullFineTuningSpec;
|
|
9804
10270
|
/** Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. */
|
|
9805
10271
|
labels?: Record<string, string>;
|
|
9806
10272
|
/** Optional. Cloud Storage path to the directory where tuning job outputs are written to. This field is only available and required for open source models. */
|
|
@@ -9811,10 +10277,40 @@ export declare interface TuningJob {
|
|
|
9811
10277
|
serviceAccount?: string;
|
|
9812
10278
|
/** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. For continuous tuning, tuned_model_display_name will by default use the same display name as the pre-tuned model. If a new display name is provided, the tuning job will create a new model instead of a new version. */
|
|
9813
10279
|
tunedModelDisplayName?: string;
|
|
10280
|
+
/** Output only. The detail state of the tuning job (while the overall `JobState` is running). */
|
|
10281
|
+
tuningJobState?: TuningJobState;
|
|
9814
10282
|
/** Tuning Spec for Veo Tuning. */
|
|
9815
10283
|
veoTuningSpec?: VeoTuningSpec;
|
|
9816
10284
|
}
|
|
9817
10285
|
|
|
10286
|
+
/** Output only. The detail state of the tuning job (while the overall `JobState` is running). This enum is not supported in Gemini API. */
|
|
10287
|
+
export declare enum TuningJobState {
|
|
10288
|
+
/**
|
|
10289
|
+
* Default tuning job state.
|
|
10290
|
+
*/
|
|
10291
|
+
TUNING_JOB_STATE_UNSPECIFIED = "TUNING_JOB_STATE_UNSPECIFIED",
|
|
10292
|
+
/**
|
|
10293
|
+
* Tuning job is waiting for job quota.
|
|
10294
|
+
*/
|
|
10295
|
+
TUNING_JOB_STATE_WAITING_FOR_QUOTA = "TUNING_JOB_STATE_WAITING_FOR_QUOTA",
|
|
10296
|
+
/**
|
|
10297
|
+
* Tuning job is validating the dataset.
|
|
10298
|
+
*/
|
|
10299
|
+
TUNING_JOB_STATE_PROCESSING_DATASET = "TUNING_JOB_STATE_PROCESSING_DATASET",
|
|
10300
|
+
/**
|
|
10301
|
+
* Tuning job is waiting for hardware capacity.
|
|
10302
|
+
*/
|
|
10303
|
+
TUNING_JOB_STATE_WAITING_FOR_CAPACITY = "TUNING_JOB_STATE_WAITING_FOR_CAPACITY",
|
|
10304
|
+
/**
|
|
10305
|
+
* Tuning job is running.
|
|
10306
|
+
*/
|
|
10307
|
+
TUNING_JOB_STATE_TUNING = "TUNING_JOB_STATE_TUNING",
|
|
10308
|
+
/**
|
|
10309
|
+
* Tuning job is doing some post processing steps.
|
|
10310
|
+
*/
|
|
10311
|
+
TUNING_JOB_STATE_POST_PROCESSING = "TUNING_JOB_STATE_POST_PROCESSING"
|
|
10312
|
+
}
|
|
10313
|
+
|
|
9818
10314
|
/** Enum representing the tuning method. */
|
|
9819
10315
|
export declare enum TuningMethod {
|
|
9820
10316
|
/**
|
|
@@ -9992,7 +10488,7 @@ export declare enum TurnCoverage {
|
|
|
9992
10488
|
TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT"
|
|
9993
10489
|
}
|
|
9994
10490
|
|
|
9995
|
-
/**
|
|
10491
|
+
/** Data type of the schema field. */
|
|
9996
10492
|
export declare enum Type {
|
|
9997
10493
|
/**
|
|
9998
10494
|
* Not specified, should not be used.
|
|
@@ -10045,14 +10541,15 @@ declare namespace types {
|
|
|
10045
10541
|
Language,
|
|
10046
10542
|
FunctionResponseScheduling,
|
|
10047
10543
|
Type,
|
|
10048
|
-
|
|
10544
|
+
PhishBlockThreshold,
|
|
10049
10545
|
AuthType,
|
|
10050
10546
|
HttpElementLocation,
|
|
10051
|
-
|
|
10547
|
+
ApiSpec,
|
|
10052
10548
|
Behavior,
|
|
10053
10549
|
DynamicRetrievalConfigMode,
|
|
10054
10550
|
FunctionCallingConfigMode,
|
|
10055
10551
|
ThinkingLevel,
|
|
10552
|
+
PersonGeneration,
|
|
10056
10553
|
HarmCategory,
|
|
10057
10554
|
HarmBlockMethod,
|
|
10058
10555
|
HarmBlockThreshold,
|
|
@@ -10067,14 +10564,17 @@ declare namespace types {
|
|
|
10067
10564
|
TuningMode,
|
|
10068
10565
|
AdapterSize,
|
|
10069
10566
|
JobState,
|
|
10567
|
+
TuningJobState,
|
|
10568
|
+
AggregationMetric,
|
|
10569
|
+
PairwiseChoice,
|
|
10070
10570
|
TuningTask,
|
|
10071
10571
|
PartMediaResolutionLevel,
|
|
10072
10572
|
ResourceScope,
|
|
10073
10573
|
FeatureSelectionPreference,
|
|
10074
10574
|
Environment,
|
|
10575
|
+
ProminentPeople,
|
|
10075
10576
|
EmbeddingApiType,
|
|
10076
10577
|
SafetyFilterLevel,
|
|
10077
|
-
PersonGeneration,
|
|
10078
10578
|
ImagePromptLanguage,
|
|
10079
10579
|
MaskReferenceMode,
|
|
10080
10580
|
ControlReferenceType,
|
|
@@ -10119,14 +10619,20 @@ declare namespace types {
|
|
|
10119
10619
|
ModelSelectionConfig,
|
|
10120
10620
|
ComputerUse,
|
|
10121
10621
|
FileSearch,
|
|
10122
|
-
|
|
10123
|
-
|
|
10622
|
+
WebSearch,
|
|
10623
|
+
ImageSearch,
|
|
10624
|
+
SearchTypes,
|
|
10625
|
+
Interval,
|
|
10626
|
+
GoogleSearch,
|
|
10124
10627
|
ApiKeyConfig,
|
|
10125
10628
|
AuthConfigGoogleServiceAccountConfig,
|
|
10126
10629
|
AuthConfigHttpBasicAuthConfig,
|
|
10127
10630
|
AuthConfigOauthConfig,
|
|
10128
10631
|
AuthConfigOidcConfig,
|
|
10129
10632
|
AuthConfig,
|
|
10633
|
+
GoogleMaps,
|
|
10634
|
+
ApiAuthApiKeyConfig,
|
|
10635
|
+
ApiAuth,
|
|
10130
10636
|
ExternalApiElasticSearchParams,
|
|
10131
10637
|
ExternalApiSimpleSearchParams,
|
|
10132
10638
|
ExternalApi,
|
|
@@ -10144,12 +10650,12 @@ declare namespace types {
|
|
|
10144
10650
|
ToolCodeExecution,
|
|
10145
10651
|
EnterpriseWebSearch,
|
|
10146
10652
|
FunctionDeclaration,
|
|
10147
|
-
GoogleMaps,
|
|
10148
|
-
Interval,
|
|
10149
|
-
GoogleSearch,
|
|
10150
10653
|
DynamicRetrievalConfig,
|
|
10151
10654
|
GoogleSearchRetrieval,
|
|
10655
|
+
ToolParallelAiSearch,
|
|
10152
10656
|
UrlContext,
|
|
10657
|
+
StreamableHttpTransport,
|
|
10658
|
+
McpServer,
|
|
10153
10659
|
Tool,
|
|
10154
10660
|
LatLng,
|
|
10155
10661
|
RetrievalConfig,
|
|
@@ -10163,6 +10669,7 @@ declare namespace types {
|
|
|
10163
10669
|
SpeechConfig,
|
|
10164
10670
|
AutomaticFunctionCallingConfig,
|
|
10165
10671
|
ThinkingConfig,
|
|
10672
|
+
ImageConfigImageOutputOptions,
|
|
10166
10673
|
ImageConfig,
|
|
10167
10674
|
GenerationConfigRoutingConfigAutoRoutingMode,
|
|
10168
10675
|
GenerationConfigRoutingConfigManualRoutingMode,
|
|
@@ -10176,6 +10683,7 @@ declare namespace types {
|
|
|
10176
10683
|
GoogleTypeDate,
|
|
10177
10684
|
Citation,
|
|
10178
10685
|
CitationMetadata,
|
|
10686
|
+
GroundingChunkImage,
|
|
10179
10687
|
GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
|
|
10180
10688
|
GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
|
|
10181
10689
|
GroundingChunkMapsPlaceAnswerSources,
|
|
@@ -10292,6 +10800,23 @@ declare namespace types {
|
|
|
10292
10800
|
TuningDataStats,
|
|
10293
10801
|
EncryptionSpec,
|
|
10294
10802
|
PartnerModelTuningSpec,
|
|
10803
|
+
BleuMetricValue,
|
|
10804
|
+
CustomCodeExecutionResult,
|
|
10805
|
+
ExactMatchMetricValue,
|
|
10806
|
+
RawOutput,
|
|
10807
|
+
CustomOutput,
|
|
10808
|
+
PairwiseMetricResult,
|
|
10809
|
+
PointwiseMetricResult,
|
|
10810
|
+
RougeMetricValue,
|
|
10811
|
+
AggregationResult,
|
|
10812
|
+
BigQuerySource,
|
|
10813
|
+
GcsSource,
|
|
10814
|
+
EvaluationDataset,
|
|
10815
|
+
AggregationOutput,
|
|
10816
|
+
OutputInfo,
|
|
10817
|
+
EvaluateDatasetResponse,
|
|
10818
|
+
EvaluateDatasetRun,
|
|
10819
|
+
FullFineTuningSpec,
|
|
10295
10820
|
VeoHyperParameters,
|
|
10296
10821
|
VeoTuningSpec,
|
|
10297
10822
|
TuningJob,
|
|
@@ -10786,20 +11311,24 @@ declare interface URLContextCallArguments {
|
|
|
10786
11311
|
* URL context content.
|
|
10787
11312
|
*/
|
|
10788
11313
|
declare interface URLContextCallContent {
|
|
10789
|
-
type: 'url_context_call';
|
|
10790
11314
|
/**
|
|
10791
11315
|
* A unique ID for this specific tool call.
|
|
10792
11316
|
*/
|
|
10793
|
-
id
|
|
11317
|
+
id: string;
|
|
10794
11318
|
/**
|
|
10795
11319
|
* The arguments to pass to the URL context.
|
|
10796
11320
|
*/
|
|
10797
|
-
arguments
|
|
11321
|
+
arguments: URLContextCallArguments;
|
|
11322
|
+
type: 'url_context_call';
|
|
11323
|
+
/**
|
|
11324
|
+
* A signature hash for backend validation.
|
|
11325
|
+
*/
|
|
11326
|
+
signature?: string;
|
|
10798
11327
|
}
|
|
10799
11328
|
|
|
10800
|
-
/** Metadata
|
|
11329
|
+
/** Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL. */
|
|
10801
11330
|
export declare interface UrlContextMetadata {
|
|
10802
|
-
/** Output only.
|
|
11331
|
+
/** Output only. A list of URL metadata, with one entry for each URL retrieved by the tool. */
|
|
10803
11332
|
urlMetadata?: UrlMetadata[];
|
|
10804
11333
|
}
|
|
10805
11334
|
|
|
@@ -10821,45 +11350,45 @@ declare interface URLContextResult {
|
|
|
10821
11350
|
* URL context result content.
|
|
10822
11351
|
*/
|
|
10823
11352
|
declare interface URLContextResultContent {
|
|
10824
|
-
type: 'url_context_result';
|
|
10825
11353
|
/**
|
|
10826
11354
|
* ID to match the ID from the url context call block.
|
|
10827
11355
|
*/
|
|
10828
|
-
call_id
|
|
11356
|
+
call_id: string;
|
|
10829
11357
|
/**
|
|
10830
|
-
*
|
|
11358
|
+
* The results of the URL context.
|
|
10831
11359
|
*/
|
|
10832
|
-
|
|
11360
|
+
result: Array<URLContextResult>;
|
|
11361
|
+
type: 'url_context_result';
|
|
10833
11362
|
/**
|
|
10834
|
-
*
|
|
11363
|
+
* Whether the URL context resulted in an error.
|
|
10835
11364
|
*/
|
|
10836
|
-
|
|
11365
|
+
is_error?: boolean;
|
|
10837
11366
|
/**
|
|
10838
|
-
*
|
|
11367
|
+
* A signature hash for backend validation.
|
|
10839
11368
|
*/
|
|
10840
11369
|
signature?: string;
|
|
10841
11370
|
}
|
|
10842
11371
|
|
|
10843
|
-
/**
|
|
11372
|
+
/** The metadata for a single URL retrieval. */
|
|
10844
11373
|
export declare interface UrlMetadata {
|
|
10845
|
-
/**
|
|
11374
|
+
/** The URL retrieved by the tool. */
|
|
10846
11375
|
retrievedUrl?: string;
|
|
10847
|
-
/**
|
|
11376
|
+
/** The status of the URL retrieval. */
|
|
10848
11377
|
urlRetrievalStatus?: UrlRetrievalStatus;
|
|
10849
11378
|
}
|
|
10850
11379
|
|
|
10851
|
-
/**
|
|
11380
|
+
/** The status of the URL retrieval. */
|
|
10852
11381
|
export declare enum UrlRetrievalStatus {
|
|
10853
11382
|
/**
|
|
10854
11383
|
* Default value. This value is unused.
|
|
10855
11384
|
*/
|
|
10856
11385
|
URL_RETRIEVAL_STATUS_UNSPECIFIED = "URL_RETRIEVAL_STATUS_UNSPECIFIED",
|
|
10857
11386
|
/**
|
|
10858
|
-
*
|
|
11387
|
+
* The URL was retrieved successfully.
|
|
10859
11388
|
*/
|
|
10860
11389
|
URL_RETRIEVAL_STATUS_SUCCESS = "URL_RETRIEVAL_STATUS_SUCCESS",
|
|
10861
11390
|
/**
|
|
10862
|
-
*
|
|
11391
|
+
* The URL retrieval failed.
|
|
10863
11392
|
*/
|
|
10864
11393
|
URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR",
|
|
10865
11394
|
/**
|
|
@@ -11025,6 +11554,8 @@ export declare interface VeoHyperParameters {
|
|
|
11025
11554
|
learningRateMultiplier?: number;
|
|
11026
11555
|
/** Optional. The tuning task. Either I2V or T2V. */
|
|
11027
11556
|
tuningTask?: TuningTask;
|
|
11557
|
+
/** Optional. The ratio of Google internal dataset to use in the training mixture, in range of `[0, 1)`. If `0.2`, it means 20% of Google internal dataset and 80% of user dataset will be used for training. If not set, the default value is 0.1. */
|
|
11558
|
+
veoDataMixtureRatio?: number;
|
|
11028
11559
|
}
|
|
11029
11560
|
|
|
11030
11561
|
/** Tuning Spec for Veo Model Tuning. This data type is not supported in Gemini API. */
|
|
@@ -11120,7 +11651,7 @@ declare interface VideoContent {
|
|
|
11120
11651
|
/**
|
|
11121
11652
|
* The mime type of the video.
|
|
11122
11653
|
*/
|
|
11123
|
-
mime_type?:
|
|
11654
|
+
mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
|
|
11124
11655
|
/**
|
|
11125
11656
|
* The resolution of the media.
|
|
11126
11657
|
*/
|
|
@@ -11192,21 +11723,16 @@ export declare enum VideoGenerationReferenceType {
|
|
|
11192
11723
|
STYLE = "STYLE"
|
|
11193
11724
|
}
|
|
11194
11725
|
|
|
11195
|
-
/**
|
|
11726
|
+
/** Provides metadata for a video, including the start and end offsets for clipping and the frame rate. */
|
|
11196
11727
|
export declare interface VideoMetadata {
|
|
11197
11728
|
/** Optional. The end offset of the video. */
|
|
11198
11729
|
endOffset?: string;
|
|
11199
|
-
/** Optional. The frame rate of the video sent to the model. If not specified, the default value
|
|
11730
|
+
/** Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0]. */
|
|
11200
11731
|
fps?: number;
|
|
11201
11732
|
/** Optional. The start offset of the video. */
|
|
11202
11733
|
startOffset?: string;
|
|
11203
11734
|
}
|
|
11204
11735
|
|
|
11205
|
-
/**
|
|
11206
|
-
* The mime type of the video.
|
|
11207
|
-
*/
|
|
11208
|
-
declare type VideoMimeType = 'video/mp4' | 'video/mpeg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/mpg' | 'video/webm' | 'video/wmv' | 'video/3gpp' | (string & {});
|
|
11209
|
-
|
|
11210
11736
|
/** Voice activity signal. */
|
|
11211
11737
|
export declare interface VoiceActivity {
|
|
11212
11738
|
/** The type of the voice activity signal. */
|
|
@@ -11237,10 +11763,16 @@ export declare enum VoiceActivityType {
|
|
|
11237
11763
|
export declare interface VoiceConfig {
|
|
11238
11764
|
/** If true, the model will use a replicated voice for the response. */
|
|
11239
11765
|
replicatedVoiceConfig?: ReplicatedVoiceConfig;
|
|
11240
|
-
/** The configuration for
|
|
11766
|
+
/** The configuration for a prebuilt voice. */
|
|
11241
11767
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
11242
11768
|
}
|
|
11243
11769
|
|
|
11770
|
+
/** Standard web search for grounding and related configurations.
|
|
11771
|
+
|
|
11772
|
+
Only text results are returned. */
|
|
11773
|
+
export declare interface WebSearch {
|
|
11774
|
+
}
|
|
11775
|
+
|
|
11244
11776
|
declare interface WebSocket_2 {
|
|
11245
11777
|
/**
|
|
11246
11778
|
* Connects the socket to the server.
|