@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/node/node.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
|
|
|
@@ -5050,11 +5254,11 @@ export declare interface GoogleGenAIOptions {
|
|
|
5050
5254
|
httpOptions?: HttpOptions;
|
|
5051
5255
|
}
|
|
5052
5256
|
|
|
5053
|
-
/** Tool to retrieve
|
|
5257
|
+
/** Tool to retrieve knowledge from Google Maps. */
|
|
5054
5258
|
export declare interface GoogleMaps {
|
|
5055
5259
|
/** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
|
|
5056
5260
|
authConfig?: AuthConfig;
|
|
5057
|
-
/** Optional.
|
|
5261
|
+
/** 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. */
|
|
5058
5262
|
enableWidget?: boolean;
|
|
5059
5263
|
}
|
|
5060
5264
|
|
|
@@ -5068,12 +5272,14 @@ export declare interface GoogleRpcStatus {
|
|
|
5068
5272
|
message?: string;
|
|
5069
5273
|
}
|
|
5070
5274
|
|
|
5071
|
-
/**
|
|
5275
|
+
/** Tool to support web search. */
|
|
5072
5276
|
export declare interface GoogleSearch {
|
|
5073
|
-
/**
|
|
5074
|
-
|
|
5277
|
+
/** Different types of search that can be enabled on the GoogleSearch tool. */
|
|
5278
|
+
searchTypes?: SearchTypes;
|
|
5075
5279
|
/** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API. */
|
|
5076
5280
|
blockingConfidence?: PhishBlockThreshold;
|
|
5281
|
+
/** 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. */
|
|
5282
|
+
excludeDomains?: string[];
|
|
5077
5283
|
/** 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. */
|
|
5078
5284
|
timeRangeFilter?: Interval;
|
|
5079
5285
|
}
|
|
@@ -5092,15 +5298,23 @@ declare interface GoogleSearchCallArguments {
|
|
|
5092
5298
|
* Google Search content.
|
|
5093
5299
|
*/
|
|
5094
5300
|
declare interface GoogleSearchCallContent {
|
|
5095
|
-
type: 'google_search_call';
|
|
5096
5301
|
/**
|
|
5097
5302
|
* A unique ID for this specific tool call.
|
|
5098
5303
|
*/
|
|
5099
|
-
id
|
|
5304
|
+
id: string;
|
|
5100
5305
|
/**
|
|
5101
5306
|
* The arguments to pass to Google Search.
|
|
5102
5307
|
*/
|
|
5103
|
-
arguments
|
|
5308
|
+
arguments: GoogleSearchCallArguments;
|
|
5309
|
+
type: 'google_search_call';
|
|
5310
|
+
/**
|
|
5311
|
+
* The type of search grounding enabled.
|
|
5312
|
+
*/
|
|
5313
|
+
search_type?: 'web_search' | 'image_search';
|
|
5314
|
+
/**
|
|
5315
|
+
* A signature hash for backend validation.
|
|
5316
|
+
*/
|
|
5317
|
+
signature?: string;
|
|
5104
5318
|
}
|
|
5105
5319
|
|
|
5106
5320
|
/**
|
|
@@ -5125,21 +5339,21 @@ declare interface GoogleSearchResult {
|
|
|
5125
5339
|
* Google Search result content.
|
|
5126
5340
|
*/
|
|
5127
5341
|
declare interface GoogleSearchResultContent {
|
|
5128
|
-
type: 'google_search_result';
|
|
5129
5342
|
/**
|
|
5130
5343
|
* ID to match the ID from the google search call block.
|
|
5131
5344
|
*/
|
|
5132
|
-
call_id
|
|
5345
|
+
call_id: string;
|
|
5133
5346
|
/**
|
|
5134
|
-
*
|
|
5347
|
+
* The results of the Google Search.
|
|
5135
5348
|
*/
|
|
5136
|
-
|
|
5349
|
+
result: Array<GoogleSearchResult>;
|
|
5350
|
+
type: 'google_search_result';
|
|
5137
5351
|
/**
|
|
5138
|
-
*
|
|
5352
|
+
* Whether the Google Search resulted in an error.
|
|
5139
5353
|
*/
|
|
5140
|
-
|
|
5354
|
+
is_error?: boolean;
|
|
5141
5355
|
/**
|
|
5142
|
-
*
|
|
5356
|
+
* A signature hash for backend validation.
|
|
5143
5357
|
*/
|
|
5144
5358
|
signature?: string;
|
|
5145
5359
|
}
|
|
@@ -5160,39 +5374,80 @@ export declare interface GoogleTypeDate {
|
|
|
5160
5374
|
year?: number;
|
|
5161
5375
|
}
|
|
5162
5376
|
|
|
5163
|
-
/**
|
|
5377
|
+
/** A piece of evidence that supports a claim made by the model.
|
|
5378
|
+
|
|
5379
|
+
This is used to show a citation for a claim made by the model. When grounding
|
|
5380
|
+
is enabled, the model returns a `GroundingChunk` that contains a reference to
|
|
5381
|
+
the source of the information. */
|
|
5164
5382
|
export declare interface GroundingChunk {
|
|
5165
|
-
/**
|
|
5383
|
+
/** A grounding chunk from an image search result. See the `Image`
|
|
5384
|
+
message for details.
|
|
5385
|
+
*/
|
|
5386
|
+
image?: GroundingChunkImage;
|
|
5387
|
+
/** A `Maps` chunk is a piece of evidence that comes from Google Maps.
|
|
5388
|
+
|
|
5389
|
+
It contains information about a place, such as its name, address, and
|
|
5390
|
+
reviews. This is used to provide the user with rich, location-based
|
|
5391
|
+
information. */
|
|
5166
5392
|
maps?: GroundingChunkMaps;
|
|
5167
|
-
/**
|
|
5393
|
+
/** 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. */
|
|
5168
5394
|
retrievedContext?: GroundingChunkRetrievedContext;
|
|
5169
|
-
/**
|
|
5395
|
+
/** A grounding chunk from a web page, typically from Google Search. See the `Web` message for details. */
|
|
5170
5396
|
web?: GroundingChunkWeb;
|
|
5171
5397
|
}
|
|
5172
5398
|
|
|
5173
|
-
/**
|
|
5399
|
+
/** A piece of evidence that comes from an image search result.
|
|
5400
|
+
|
|
5401
|
+
It contains the URI of the image search result and the URI of the image.
|
|
5402
|
+
This is used to provide the user with a link to the source of the
|
|
5403
|
+
information. */
|
|
5404
|
+
export declare interface GroundingChunkImage {
|
|
5405
|
+
/** The URI of the image search result page. */
|
|
5406
|
+
sourceUri?: string;
|
|
5407
|
+
/** The URI of the image. */
|
|
5408
|
+
imageUri?: string;
|
|
5409
|
+
/** The title of the image search result page. */
|
|
5410
|
+
title?: string;
|
|
5411
|
+
/** The domain of the image search result page. */
|
|
5412
|
+
domain?: string;
|
|
5413
|
+
}
|
|
5414
|
+
|
|
5415
|
+
/** A `Maps` chunk is a piece of evidence that comes from Google Maps.
|
|
5416
|
+
|
|
5417
|
+
It contains information about a place, such as its name, address, and reviews.
|
|
5418
|
+
This is used to provide the user with rich, location-based information. */
|
|
5174
5419
|
export declare interface GroundingChunkMaps {
|
|
5175
|
-
/**
|
|
5420
|
+
/** The sources that were used to generate the place answer.
|
|
5421
|
+
|
|
5422
|
+
This includes review snippets and photos that were used to generate the
|
|
5423
|
+
answer, as well as URIs to flag content. */
|
|
5176
5424
|
placeAnswerSources?: GroundingChunkMapsPlaceAnswerSources;
|
|
5177
|
-
/** This Place's resource name, in `places/{place_id}` format.
|
|
5425
|
+
/** This Place's resource name, in `places/{place_id}` format.
|
|
5426
|
+
|
|
5427
|
+
This can be used to look up the place in the Google Maps API. */
|
|
5178
5428
|
placeId?: string;
|
|
5179
|
-
/**
|
|
5429
|
+
/** The text of the place answer. */
|
|
5180
5430
|
text?: string;
|
|
5181
|
-
/**
|
|
5431
|
+
/** The title of the place. */
|
|
5182
5432
|
title?: string;
|
|
5183
|
-
/** URI
|
|
5433
|
+
/** The URI of the place. */
|
|
5184
5434
|
uri?: string;
|
|
5185
5435
|
}
|
|
5186
5436
|
|
|
5187
|
-
/**
|
|
5437
|
+
/** The sources that were used to generate the place answer.
|
|
5438
|
+
|
|
5439
|
+
This includes review snippets and photos that were used to generate the
|
|
5440
|
+
answer, as well as URIs to flag content. */
|
|
5188
5441
|
export declare interface GroundingChunkMapsPlaceAnswerSources {
|
|
5442
|
+
/** Snippets of reviews that were used to generate the answer. */
|
|
5443
|
+
reviewSnippet?: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet[];
|
|
5189
5444
|
/** A link where users can flag a problem with the generated answer. */
|
|
5190
5445
|
flagContentUri?: string;
|
|
5191
|
-
/** Snippets of reviews that
|
|
5446
|
+
/** Snippets of reviews that were used to generate the answer. */
|
|
5192
5447
|
reviewSnippets?: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet[];
|
|
5193
5448
|
}
|
|
5194
5449
|
|
|
5195
|
-
/** Author attribution for a photo or review.
|
|
5450
|
+
/** Author attribution for a photo or review. */
|
|
5196
5451
|
export declare interface GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution {
|
|
5197
5452
|
/** Name of the author of the Photo or Review. */
|
|
5198
5453
|
displayName?: string;
|
|
@@ -5202,7 +5457,7 @@ export declare interface GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution {
|
|
|
5202
5457
|
uri?: string;
|
|
5203
5458
|
}
|
|
5204
5459
|
|
|
5205
|
-
/** Encapsulates a review snippet.
|
|
5460
|
+
/** Encapsulates a review snippet. */
|
|
5206
5461
|
export declare interface GroundingChunkMapsPlaceAnswerSourcesReviewSnippet {
|
|
5207
5462
|
/** This review's author. */
|
|
5208
5463
|
authorAttribution?: GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution;
|
|
@@ -5220,69 +5475,84 @@ export declare interface GroundingChunkMapsPlaceAnswerSourcesReviewSnippet {
|
|
|
5220
5475
|
title?: string;
|
|
5221
5476
|
}
|
|
5222
5477
|
|
|
5223
|
-
/**
|
|
5478
|
+
/** 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. */
|
|
5224
5479
|
export declare interface GroundingChunkRetrievedContext {
|
|
5225
|
-
/** Output only. The full
|
|
5480
|
+
/** 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}`. */
|
|
5226
5481
|
documentName?: string;
|
|
5227
|
-
/** Additional context for
|
|
5482
|
+
/** Additional context for a Retrieval-Augmented Generation (RAG) retrieval result. This is populated only when the RAG retrieval tool is used. */
|
|
5228
5483
|
ragChunk?: RagChunk;
|
|
5229
|
-
/**
|
|
5484
|
+
/** The content of the retrieved data source. */
|
|
5230
5485
|
text?: string;
|
|
5231
|
-
/**
|
|
5486
|
+
/** The title of the retrieved data source. */
|
|
5232
5487
|
title?: string;
|
|
5233
|
-
/** URI
|
|
5488
|
+
/** The URI of the retrieved data source. */
|
|
5234
5489
|
uri?: string;
|
|
5235
5490
|
}
|
|
5236
5491
|
|
|
5237
|
-
/**
|
|
5492
|
+
/** 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. */
|
|
5238
5493
|
export declare interface GroundingChunkWeb {
|
|
5239
|
-
/**
|
|
5494
|
+
/** 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. */
|
|
5240
5495
|
domain?: string;
|
|
5241
|
-
/**
|
|
5496
|
+
/** The title of the web page that contains the evidence. */
|
|
5242
5497
|
title?: string;
|
|
5243
|
-
/** URI
|
|
5498
|
+
/** The URI of the web page that contains the evidence. */
|
|
5244
5499
|
uri?: string;
|
|
5245
5500
|
}
|
|
5246
5501
|
|
|
5247
|
-
/**
|
|
5502
|
+
/** Information for various kinds of grounding. */
|
|
5248
5503
|
export declare interface GroundingMetadata {
|
|
5249
|
-
/** Optional.
|
|
5250
|
-
|
|
5251
|
-
|
|
5504
|
+
/** Optional. The image search queries that were used to generate the
|
|
5505
|
+
content. This field is populated only when the grounding source is Google
|
|
5506
|
+
Search with the Image Search search_type enabled.
|
|
5507
|
+
*/
|
|
5508
|
+
imageSearchQueries?: string[];
|
|
5509
|
+
/** A list of supporting references retrieved from the grounding
|
|
5510
|
+
source. This field is populated when the grounding source is Google
|
|
5511
|
+
Search, Vertex AI Search, or Google Maps.
|
|
5512
|
+
*/
|
|
5252
5513
|
groundingChunks?: GroundingChunk[];
|
|
5253
|
-
/**
|
|
5514
|
+
/** List of grounding support. */
|
|
5254
5515
|
groundingSupports?: GroundingSupport[];
|
|
5255
|
-
/**
|
|
5516
|
+
/** Metadata related to retrieval in the grounding flow. */
|
|
5256
5517
|
retrievalMetadata?: RetrievalMetadata;
|
|
5257
|
-
/** Optional.
|
|
5258
|
-
|
|
5259
|
-
/** Optional. Google search entry for the following-up web searches. */
|
|
5518
|
+
/** Optional. Google search entry for the following-up web
|
|
5519
|
+
searches. */
|
|
5260
5520
|
searchEntryPoint?: SearchEntryPoint;
|
|
5261
|
-
/**
|
|
5262
|
-
sourceFlaggingUris?: GroundingMetadataSourceFlaggingUri[];
|
|
5263
|
-
/** Optional. Web search queries for the following-up web search. */
|
|
5521
|
+
/** Web search queries for the following-up web search. */
|
|
5264
5522
|
webSearchQueries?: string[];
|
|
5523
|
+
/** 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. */
|
|
5524
|
+
googleMapsWidgetContextToken?: string;
|
|
5525
|
+
/** 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. */
|
|
5526
|
+
retrievalQueries?: string[];
|
|
5527
|
+
/** 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. */
|
|
5528
|
+
sourceFlaggingUris?: GroundingMetadataSourceFlaggingUri[];
|
|
5265
5529
|
}
|
|
5266
5530
|
|
|
5267
|
-
/**
|
|
5531
|
+
/** 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. */
|
|
5268
5532
|
export declare interface GroundingMetadataSourceFlaggingUri {
|
|
5269
|
-
/**
|
|
5533
|
+
/** The URI that can be used to flag the content. */
|
|
5270
5534
|
flagContentUri?: string;
|
|
5271
|
-
/**
|
|
5535
|
+
/** The ID of the place or review. */
|
|
5272
5536
|
sourceId?: string;
|
|
5273
5537
|
}
|
|
5274
5538
|
|
|
5275
5539
|
/** Grounding support. */
|
|
5276
5540
|
export declare interface GroundingSupport {
|
|
5277
|
-
/** Confidence score of the support references.
|
|
5541
|
+
/** Confidence score of the support references.
|
|
5542
|
+
|
|
5543
|
+
Ranges from 0 to 1. 1 is the most confident. This list must have the
|
|
5544
|
+
same size as the grounding_chunk_indices. */
|
|
5278
5545
|
confidenceScores?: number[];
|
|
5279
|
-
/** A list of indices (into 'grounding_chunk') specifying the
|
|
5546
|
+
/** A list of indices (into 'grounding_chunk') specifying the
|
|
5547
|
+
citations associated with the claim. For instance [1,3,4] means that
|
|
5548
|
+
grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the
|
|
5549
|
+
retrieved content attributed to the claim. */
|
|
5280
5550
|
groundingChunkIndices?: number[];
|
|
5281
5551
|
/** Segment of the content this support belongs to. */
|
|
5282
5552
|
segment?: Segment;
|
|
5283
5553
|
}
|
|
5284
5554
|
|
|
5285
|
-
/**
|
|
5555
|
+
/** 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. */
|
|
5286
5556
|
export declare enum HarmBlockMethod {
|
|
5287
5557
|
/**
|
|
5288
5558
|
* The harm block method is unspecified.
|
|
@@ -5298,54 +5568,54 @@ export declare enum HarmBlockMethod {
|
|
|
5298
5568
|
PROBABILITY = "PROBABILITY"
|
|
5299
5569
|
}
|
|
5300
5570
|
|
|
5301
|
-
/** The harm
|
|
5571
|
+
/** The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
|
|
5302
5572
|
export declare enum HarmBlockThreshold {
|
|
5303
5573
|
/**
|
|
5304
|
-
*
|
|
5574
|
+
* The harm block threshold is unspecified.
|
|
5305
5575
|
*/
|
|
5306
5576
|
HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
|
|
5307
5577
|
/**
|
|
5308
|
-
* Block
|
|
5578
|
+
* Block content with a low harm probability or higher.
|
|
5309
5579
|
*/
|
|
5310
5580
|
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
|
|
5311
5581
|
/**
|
|
5312
|
-
* Block medium
|
|
5582
|
+
* Block content with a medium harm probability or higher.
|
|
5313
5583
|
*/
|
|
5314
5584
|
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
|
|
5315
5585
|
/**
|
|
5316
|
-
* Block
|
|
5586
|
+
* Block content with a high harm probability.
|
|
5317
5587
|
*/
|
|
5318
5588
|
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
|
|
5319
5589
|
/**
|
|
5320
|
-
*
|
|
5590
|
+
* Do not block any content, regardless of its harm probability.
|
|
5321
5591
|
*/
|
|
5322
5592
|
BLOCK_NONE = "BLOCK_NONE",
|
|
5323
5593
|
/**
|
|
5324
|
-
* Turn off the safety filter.
|
|
5594
|
+
* Turn off the safety filter entirely.
|
|
5325
5595
|
*/
|
|
5326
5596
|
OFF = "OFF"
|
|
5327
5597
|
}
|
|
5328
5598
|
|
|
5329
|
-
/**
|
|
5599
|
+
/** The harm category to be blocked. */
|
|
5330
5600
|
export declare enum HarmCategory {
|
|
5331
5601
|
/**
|
|
5332
|
-
*
|
|
5602
|
+
* Default value. This value is unused.
|
|
5333
5603
|
*/
|
|
5334
5604
|
HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED",
|
|
5335
5605
|
/**
|
|
5336
|
-
*
|
|
5606
|
+
* Abusive, threatening, or content intended to bully, torment, or ridicule.
|
|
5337
5607
|
*/
|
|
5338
5608
|
HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT",
|
|
5339
5609
|
/**
|
|
5340
|
-
*
|
|
5610
|
+
* Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
|
|
5341
5611
|
*/
|
|
5342
5612
|
HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
|
|
5343
5613
|
/**
|
|
5344
|
-
*
|
|
5614
|
+
* Content that contains sexually explicit material.
|
|
5345
5615
|
*/
|
|
5346
5616
|
HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
|
5347
5617
|
/**
|
|
5348
|
-
*
|
|
5618
|
+
* Content that promotes, facilitates, or enables dangerous activities.
|
|
5349
5619
|
*/
|
|
5350
5620
|
HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
|
|
5351
5621
|
/**
|
|
@@ -5353,71 +5623,71 @@ export declare enum HarmCategory {
|
|
|
5353
5623
|
*/
|
|
5354
5624
|
HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY",
|
|
5355
5625
|
/**
|
|
5356
|
-
*
|
|
5626
|
+
* Images that contain hate speech. This enum value is not supported in Gemini API.
|
|
5357
5627
|
*/
|
|
5358
5628
|
HARM_CATEGORY_IMAGE_HATE = "HARM_CATEGORY_IMAGE_HATE",
|
|
5359
5629
|
/**
|
|
5360
|
-
*
|
|
5630
|
+
* Images that contain dangerous content. This enum value is not supported in Gemini API.
|
|
5361
5631
|
*/
|
|
5362
5632
|
HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT",
|
|
5363
5633
|
/**
|
|
5364
|
-
*
|
|
5634
|
+
* Images that contain harassment. This enum value is not supported in Gemini API.
|
|
5365
5635
|
*/
|
|
5366
5636
|
HARM_CATEGORY_IMAGE_HARASSMENT = "HARM_CATEGORY_IMAGE_HARASSMENT",
|
|
5367
5637
|
/**
|
|
5368
|
-
*
|
|
5638
|
+
* Images that contain sexually explicit content. This enum value is not supported in Gemini API.
|
|
5369
5639
|
*/
|
|
5370
5640
|
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT",
|
|
5371
5641
|
/**
|
|
5372
|
-
*
|
|
5642
|
+
* Prompts designed to bypass safety filters. This enum value is not supported in Gemini API.
|
|
5373
5643
|
*/
|
|
5374
5644
|
HARM_CATEGORY_JAILBREAK = "HARM_CATEGORY_JAILBREAK"
|
|
5375
5645
|
}
|
|
5376
5646
|
|
|
5377
|
-
/** Output only.
|
|
5647
|
+
/** Output only. The probability of harm for this category. */
|
|
5378
5648
|
export declare enum HarmProbability {
|
|
5379
5649
|
/**
|
|
5380
|
-
*
|
|
5650
|
+
* The harm probability is unspecified.
|
|
5381
5651
|
*/
|
|
5382
5652
|
HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED",
|
|
5383
5653
|
/**
|
|
5384
|
-
*
|
|
5654
|
+
* The harm probability is negligible.
|
|
5385
5655
|
*/
|
|
5386
5656
|
NEGLIGIBLE = "NEGLIGIBLE",
|
|
5387
5657
|
/**
|
|
5388
|
-
*
|
|
5658
|
+
* The harm probability is low.
|
|
5389
5659
|
*/
|
|
5390
5660
|
LOW = "LOW",
|
|
5391
5661
|
/**
|
|
5392
|
-
*
|
|
5662
|
+
* The harm probability is medium.
|
|
5393
5663
|
*/
|
|
5394
5664
|
MEDIUM = "MEDIUM",
|
|
5395
5665
|
/**
|
|
5396
|
-
*
|
|
5666
|
+
* The harm probability is high.
|
|
5397
5667
|
*/
|
|
5398
5668
|
HIGH = "HIGH"
|
|
5399
5669
|
}
|
|
5400
5670
|
|
|
5401
|
-
/** Output only.
|
|
5671
|
+
/** Output only. The severity of harm for this category. This enum is not supported in Gemini API. */
|
|
5402
5672
|
export declare enum HarmSeverity {
|
|
5403
5673
|
/**
|
|
5404
|
-
*
|
|
5674
|
+
* The harm severity is unspecified.
|
|
5405
5675
|
*/
|
|
5406
5676
|
HARM_SEVERITY_UNSPECIFIED = "HARM_SEVERITY_UNSPECIFIED",
|
|
5407
5677
|
/**
|
|
5408
|
-
*
|
|
5678
|
+
* The harm severity is negligible.
|
|
5409
5679
|
*/
|
|
5410
5680
|
HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE",
|
|
5411
5681
|
/**
|
|
5412
|
-
*
|
|
5682
|
+
* The harm severity is low.
|
|
5413
5683
|
*/
|
|
5414
5684
|
HARM_SEVERITY_LOW = "HARM_SEVERITY_LOW",
|
|
5415
5685
|
/**
|
|
5416
|
-
*
|
|
5686
|
+
* The harm severity is medium.
|
|
5417
5687
|
*/
|
|
5418
5688
|
HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM",
|
|
5419
5689
|
/**
|
|
5420
|
-
*
|
|
5690
|
+
* The harm severity is high.
|
|
5421
5691
|
*/
|
|
5422
5692
|
HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH"
|
|
5423
5693
|
}
|
|
@@ -5573,20 +5843,36 @@ export declare interface ImageConfig {
|
|
|
5573
5843
|
/** Controls the generation of people. Supported values are:
|
|
5574
5844
|
ALLOW_ALL, ALLOW_ADULT, ALLOW_NONE. */
|
|
5575
5845
|
personGeneration?: string;
|
|
5846
|
+
/** Controls whether prominent people (celebrities)
|
|
5847
|
+
generation is allowed. If used with personGeneration, personGeneration
|
|
5848
|
+
enum would take precedence. For instance, if ALLOW_NONE is set, all person
|
|
5849
|
+
generation would be blocked. If this field is unspecified, the default
|
|
5850
|
+
behavior is to allow prominent people. */
|
|
5851
|
+
prominentPeople?: ProminentPeople;
|
|
5576
5852
|
/** MIME type of the generated image. This field is not
|
|
5577
5853
|
supported in Gemini API. */
|
|
5578
5854
|
outputMimeType?: string;
|
|
5579
5855
|
/** Compression quality of the generated image (for
|
|
5580
5856
|
``image/jpeg`` only). This field is not supported in Gemini API. */
|
|
5581
5857
|
outputCompressionQuality?: number;
|
|
5858
|
+
/** Optional. The image output format for generated images. */
|
|
5859
|
+
imageOutputOptions?: ImageConfigImageOutputOptions;
|
|
5582
5860
|
}
|
|
5583
5861
|
|
|
5584
5862
|
/**
|
|
5585
5863
|
* The configuration for image interaction.
|
|
5586
5864
|
*/
|
|
5587
5865
|
declare interface ImageConfig_2 {
|
|
5588
|
-
aspect_ratio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9';
|
|
5589
|
-
image_size?: '1K' | '2K' | '4K';
|
|
5866
|
+
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';
|
|
5867
|
+
image_size?: '1K' | '2K' | '4K' | '512';
|
|
5868
|
+
}
|
|
5869
|
+
|
|
5870
|
+
/** The image output format for generated images. This data type is not supported in Gemini API. */
|
|
5871
|
+
export declare interface ImageConfigImageOutputOptions {
|
|
5872
|
+
/** Optional. The compression quality of the output image. */
|
|
5873
|
+
compressionQuality?: number;
|
|
5874
|
+
/** Optional. The image format that the output should be saved as. */
|
|
5875
|
+
mimeType?: string;
|
|
5590
5876
|
}
|
|
5591
5877
|
|
|
5592
5878
|
/**
|
|
@@ -5601,7 +5887,7 @@ declare interface ImageContent {
|
|
|
5601
5887
|
/**
|
|
5602
5888
|
* The mime type of the image.
|
|
5603
5889
|
*/
|
|
5604
|
-
mime_type?:
|
|
5890
|
+
mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif';
|
|
5605
5891
|
/**
|
|
5606
5892
|
* The resolution of the media.
|
|
5607
5893
|
*/
|
|
@@ -5612,11 +5898,6 @@ declare interface ImageContent {
|
|
|
5612
5898
|
uri?: string;
|
|
5613
5899
|
}
|
|
5614
5900
|
|
|
5615
|
-
/**
|
|
5616
|
-
* The mime type of the image.
|
|
5617
|
-
*/
|
|
5618
|
-
declare type ImageMimeType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif' | (string & {});
|
|
5619
|
-
|
|
5620
5901
|
/** Enum that specifies the language of the text in the prompt. */
|
|
5621
5902
|
export declare enum ImagePromptLanguage {
|
|
5622
5903
|
/**
|
|
@@ -5653,6 +5934,10 @@ export declare enum ImagePromptLanguage {
|
|
|
5653
5934
|
es = "es"
|
|
5654
5935
|
}
|
|
5655
5936
|
|
|
5937
|
+
/** Image search for grounding and related configurations. */
|
|
5938
|
+
export declare interface ImageSearch {
|
|
5939
|
+
}
|
|
5940
|
+
|
|
5656
5941
|
/** Optional parameters for importing a file. */
|
|
5657
5942
|
export declare interface ImportFileConfig {
|
|
5658
5943
|
/** Used to override HTTP request options. */
|
|
@@ -5756,19 +6041,32 @@ declare interface Interaction {
|
|
|
5756
6041
|
* Output only. A unique identifier for the interaction completion.
|
|
5757
6042
|
*/
|
|
5758
6043
|
id: string;
|
|
6044
|
+
/**
|
|
6045
|
+
* Output only. The time at which the response was created in ISO 8601 format
|
|
6046
|
+
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6047
|
+
*/
|
|
6048
|
+
created: string;
|
|
5759
6049
|
/**
|
|
5760
6050
|
* Output only. The status of the interaction.
|
|
5761
6051
|
*/
|
|
5762
6052
|
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
6053
|
+
/**
|
|
6054
|
+
* Output only. The time at which the response was last updated in ISO 8601 format
|
|
6055
|
+
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6056
|
+
*/
|
|
6057
|
+
updated: string;
|
|
5763
6058
|
/**
|
|
5764
6059
|
* The name of the `Agent` used for generating the interaction.
|
|
5765
6060
|
*/
|
|
5766
6061
|
agent?: (string & {}) | 'deep-research-pro-preview-12-2025';
|
|
5767
6062
|
/**
|
|
5768
|
-
*
|
|
5769
|
-
|
|
6063
|
+
* Configuration for the agent.
|
|
6064
|
+
*/
|
|
6065
|
+
agent_config?: DynamicAgentConfig | DeepResearchAgentConfig;
|
|
6066
|
+
/**
|
|
6067
|
+
* The inputs for the interaction.
|
|
5770
6068
|
*/
|
|
5771
|
-
|
|
6069
|
+
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;
|
|
5772
6070
|
/**
|
|
5773
6071
|
* The name of the `Model` used for generating the interaction.
|
|
5774
6072
|
*/
|
|
@@ -5781,15 +6079,31 @@ declare interface Interaction {
|
|
|
5781
6079
|
* The ID of the previous interaction, if any.
|
|
5782
6080
|
*/
|
|
5783
6081
|
previous_interaction_id?: string;
|
|
6082
|
+
/**
|
|
6083
|
+
* Enforces that the generated response is a JSON object that complies with
|
|
6084
|
+
* the JSON schema specified in this field.
|
|
6085
|
+
*/
|
|
6086
|
+
response_format?: unknown;
|
|
6087
|
+
/**
|
|
6088
|
+
* The mime type of the response. This is required if response_format is set.
|
|
6089
|
+
*/
|
|
6090
|
+
response_mime_type?: string;
|
|
6091
|
+
/**
|
|
6092
|
+
* The requested modalities of the response (TEXT, IMAGE, AUDIO).
|
|
6093
|
+
*/
|
|
6094
|
+
response_modalities?: Array<'text' | 'image' | 'audio'>;
|
|
5784
6095
|
/**
|
|
5785
6096
|
* Output only. The role of the interaction.
|
|
5786
6097
|
*/
|
|
5787
6098
|
role?: string;
|
|
5788
6099
|
/**
|
|
5789
|
-
*
|
|
5790
|
-
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6100
|
+
* System instruction for the interaction.
|
|
5791
6101
|
*/
|
|
5792
|
-
|
|
6102
|
+
system_instruction?: string;
|
|
6103
|
+
/**
|
|
6104
|
+
* A list of tool declarations the model may call during interaction.
|
|
6105
|
+
*/
|
|
6106
|
+
tools?: Array<Tool_2>;
|
|
5793
6107
|
/**
|
|
5794
6108
|
* Output only. Statistics on the interaction request's token usage.
|
|
5795
6109
|
*/
|
|
@@ -5806,13 +6120,14 @@ declare interface InteractionCancelParams {
|
|
|
5806
6120
|
declare interface InteractionCompleteEvent {
|
|
5807
6121
|
event_type: 'interaction.complete';
|
|
5808
6122
|
/**
|
|
5809
|
-
* The
|
|
6123
|
+
* The completed interaction with empty outputs to reduce the payload size.
|
|
6124
|
+
* Use the preceding ContentDelta events for the actual output.
|
|
5810
6125
|
*/
|
|
5811
|
-
|
|
6126
|
+
interaction: Interaction;
|
|
5812
6127
|
/**
|
|
5813
|
-
* The
|
|
6128
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
5814
6129
|
*/
|
|
5815
|
-
|
|
6130
|
+
event_id?: string;
|
|
5816
6131
|
}
|
|
5817
6132
|
|
|
5818
6133
|
declare type InteractionCreateParams = CreateModelInteractionParamsNonStreaming | CreateModelInteractionParamsStreaming | CreateAgentInteractionParamsNonStreaming | CreateAgentInteractionParamsStreaming;
|
|
@@ -5870,7 +6185,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
5870
6185
|
}
|
|
5871
6186
|
|
|
5872
6187
|
export declare namespace Interactions {
|
|
5873
|
-
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type
|
|
6188
|
+
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, };
|
|
5874
6189
|
}
|
|
5875
6190
|
|
|
5876
6191
|
declare namespace InteractionsAPI {
|
|
@@ -5880,7 +6195,6 @@ declare namespace InteractionsAPI {
|
|
|
5880
6195
|
AllowedTools,
|
|
5881
6196
|
Annotation,
|
|
5882
6197
|
AudioContent,
|
|
5883
|
-
AudioMimeType,
|
|
5884
6198
|
CodeExecutionCallArguments,
|
|
5885
6199
|
CodeExecutionCallContent,
|
|
5886
6200
|
CodeExecutionResultContent,
|
|
@@ -5890,7 +6204,6 @@ declare namespace InteractionsAPI {
|
|
|
5890
6204
|
ContentStop,
|
|
5891
6205
|
DeepResearchAgentConfig,
|
|
5892
6206
|
DocumentContent,
|
|
5893
|
-
DocumentMimeType,
|
|
5894
6207
|
DynamicAgentConfig,
|
|
5895
6208
|
ErrorEvent_2 as ErrorEvent,
|
|
5896
6209
|
FileSearchCallContent,
|
|
@@ -5905,7 +6218,6 @@ declare namespace InteractionsAPI {
|
|
|
5905
6218
|
GoogleSearchResultContent,
|
|
5906
6219
|
ImageConfig_2 as ImageConfig,
|
|
5907
6220
|
ImageContent,
|
|
5908
|
-
ImageMimeType,
|
|
5909
6221
|
Interaction,
|
|
5910
6222
|
InteractionCompleteEvent,
|
|
5911
6223
|
InteractionSSEEvent,
|
|
@@ -5919,7 +6231,6 @@ declare namespace InteractionsAPI {
|
|
|
5919
6231
|
ThinkingLevel_2 as ThinkingLevel,
|
|
5920
6232
|
ThoughtContent,
|
|
5921
6233
|
Tool_2 as Tool,
|
|
5922
|
-
ToolChoice,
|
|
5923
6234
|
ToolChoiceConfig,
|
|
5924
6235
|
ToolChoiceType,
|
|
5925
6236
|
Turn,
|
|
@@ -5929,7 +6240,6 @@ declare namespace InteractionsAPI {
|
|
|
5929
6240
|
URLContextResultContent,
|
|
5930
6241
|
Usage,
|
|
5931
6242
|
VideoContent,
|
|
5932
|
-
VideoMimeType,
|
|
5933
6243
|
InteractionDeleteResponse,
|
|
5934
6244
|
InteractionCreateParams,
|
|
5935
6245
|
BaseCreateModelInteractionParams,
|
|
@@ -5952,23 +6262,23 @@ declare type InteractionSSEEvent = InteractionStartEvent | InteractionCompleteEv
|
|
|
5952
6262
|
declare interface InteractionStartEvent {
|
|
5953
6263
|
event_type: 'interaction.start';
|
|
5954
6264
|
/**
|
|
5955
|
-
* The
|
|
6265
|
+
* The Interaction resource.
|
|
5956
6266
|
*/
|
|
5957
|
-
|
|
6267
|
+
interaction: Interaction;
|
|
5958
6268
|
/**
|
|
5959
|
-
* The
|
|
6269
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
5960
6270
|
*/
|
|
5961
|
-
|
|
6271
|
+
event_id?: string;
|
|
5962
6272
|
}
|
|
5963
6273
|
|
|
5964
6274
|
declare interface InteractionStatusUpdate {
|
|
5965
6275
|
event_type: 'interaction.status_update';
|
|
6276
|
+
interaction_id: string;
|
|
6277
|
+
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
5966
6278
|
/**
|
|
5967
6279
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
5968
6280
|
*/
|
|
5969
6281
|
event_id?: string;
|
|
5970
|
-
interaction_id?: string;
|
|
5971
|
-
status?: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
5972
6282
|
}
|
|
5973
6283
|
|
|
5974
6284
|
/** Parameters for the private _Register method. */
|
|
@@ -6282,9 +6592,9 @@ export declare interface ListTuningJobsParameters {
|
|
|
6282
6592
|
export declare class ListTuningJobsResponse {
|
|
6283
6593
|
/** Used to retain the full HTTP response. */
|
|
6284
6594
|
sdkHttpResponse?: HttpResponse;
|
|
6285
|
-
/** A token to retrieve the next page of results. Pass
|
|
6595
|
+
/** 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. */
|
|
6286
6596
|
nextPageToken?: string;
|
|
6287
|
-
/**
|
|
6597
|
+
/** The tuning jobs that match the request. */
|
|
6288
6598
|
tuningJobs?: TuningJob[];
|
|
6289
6599
|
}
|
|
6290
6600
|
|
|
@@ -7070,27 +7380,27 @@ declare type Logger = {
|
|
|
7070
7380
|
|
|
7071
7381
|
declare type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug';
|
|
7072
7382
|
|
|
7073
|
-
/**
|
|
7383
|
+
/** 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. */
|
|
7074
7384
|
export declare interface LogprobsResult {
|
|
7075
|
-
/**
|
|
7385
|
+
/** 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`. */
|
|
7076
7386
|
chosenCandidates?: LogprobsResultCandidate[];
|
|
7077
|
-
/**
|
|
7387
|
+
/** 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. */
|
|
7078
7388
|
topCandidates?: LogprobsResultTopCandidates[];
|
|
7079
7389
|
}
|
|
7080
7390
|
|
|
7081
|
-
/**
|
|
7391
|
+
/** A single token and its associated log probability. */
|
|
7082
7392
|
export declare interface LogprobsResultCandidate {
|
|
7083
|
-
/** The
|
|
7393
|
+
/** 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. */
|
|
7084
7394
|
logProbability?: number;
|
|
7085
|
-
/** The
|
|
7395
|
+
/** The token's string representation. */
|
|
7086
7396
|
token?: string;
|
|
7087
|
-
/** The
|
|
7397
|
+
/** 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. */
|
|
7088
7398
|
tokenId?: number;
|
|
7089
7399
|
}
|
|
7090
7400
|
|
|
7091
|
-
/**
|
|
7401
|
+
/** 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. */
|
|
7092
7402
|
export declare interface LogprobsResultTopCandidates {
|
|
7093
|
-
/**
|
|
7403
|
+
/** The list of candidate tokens, sorted by log probability in descending order. */
|
|
7094
7404
|
candidates?: LogprobsResultCandidate[];
|
|
7095
7405
|
}
|
|
7096
7406
|
|
|
@@ -7138,6 +7448,14 @@ export declare enum MaskReferenceMode {
|
|
|
7138
7448
|
MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
|
|
7139
7449
|
}
|
|
7140
7450
|
|
|
7451
|
+
/** 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. */
|
|
7452
|
+
export declare interface McpServer {
|
|
7453
|
+
/** The name of the MCPServer. */
|
|
7454
|
+
name?: string;
|
|
7455
|
+
/** A transport that can stream HTTP requests and responses. */
|
|
7456
|
+
streamableHttpTransport?: StreamableHttpTransport;
|
|
7457
|
+
}
|
|
7458
|
+
|
|
7141
7459
|
/**
|
|
7142
7460
|
* MCPServer tool call content.
|
|
7143
7461
|
*/
|
|
@@ -7161,6 +7479,10 @@ declare interface MCPServerToolCallContent {
|
|
|
7161
7479
|
*/
|
|
7162
7480
|
server_name: string;
|
|
7163
7481
|
type: 'mcp_server_tool_call';
|
|
7482
|
+
/**
|
|
7483
|
+
* A signature hash for backend validation.
|
|
7484
|
+
*/
|
|
7485
|
+
signature?: string;
|
|
7164
7486
|
}
|
|
7165
7487
|
|
|
7166
7488
|
/**
|
|
@@ -7184,6 +7506,10 @@ declare interface MCPServerToolResultContent {
|
|
|
7184
7506
|
* The name of the used MCP server.
|
|
7185
7507
|
*/
|
|
7186
7508
|
server_name?: string;
|
|
7509
|
+
/**
|
|
7510
|
+
* A signature hash for backend validation.
|
|
7511
|
+
*/
|
|
7512
|
+
signature?: string;
|
|
7187
7513
|
}
|
|
7188
7514
|
|
|
7189
7515
|
declare namespace MCPServerToolResultContent {
|
|
@@ -7284,7 +7610,7 @@ export declare enum Modality {
|
|
|
7284
7610
|
export declare interface ModalityTokenCount {
|
|
7285
7611
|
/** The modality associated with this token count. */
|
|
7286
7612
|
modality?: MediaModality;
|
|
7287
|
-
/**
|
|
7613
|
+
/** The number of tokens counted for this modality. */
|
|
7288
7614
|
tokenCount?: number;
|
|
7289
7615
|
}
|
|
7290
7616
|
|
|
@@ -7346,13 +7672,13 @@ export declare interface Model {
|
|
|
7346
7672
|
/**
|
|
7347
7673
|
* The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
|
|
7348
7674
|
*/
|
|
7349
|
-
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 & {});
|
|
7675
|
+
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 & {});
|
|
7350
7676
|
|
|
7351
|
-
/** Configuration for Model Armor
|
|
7677
|
+
/** 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. */
|
|
7352
7678
|
export declare interface ModelArmorConfig {
|
|
7353
|
-
/** Optional. The name of the Model Armor template to use for prompt
|
|
7679
|
+
/** 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}`. */
|
|
7354
7680
|
promptTemplateName?: string;
|
|
7355
|
-
/** Optional. The name of the Model Armor template to use for response
|
|
7681
|
+
/** 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}`. */
|
|
7356
7682
|
responseTemplateName?: string;
|
|
7357
7683
|
}
|
|
7358
7684
|
|
|
@@ -7899,6 +8225,12 @@ export declare enum Outcome {
|
|
|
7899
8225
|
OUTCOME_DEADLINE_EXCEEDED = "OUTCOME_DEADLINE_EXCEEDED"
|
|
7900
8226
|
}
|
|
7901
8227
|
|
|
8228
|
+
/** Describes the info for output of EvaluationService. This data type is not supported in Gemini API. */
|
|
8229
|
+
export declare interface OutputInfo {
|
|
8230
|
+
/** Output only. The full path of the Cloud Storage directory created, into which the evaluation results and aggregation results are written. */
|
|
8231
|
+
gcsOutputDirectory?: string;
|
|
8232
|
+
}
|
|
8233
|
+
|
|
7902
8234
|
/**
|
|
7903
8235
|
* Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
|
|
7904
8236
|
*/
|
|
@@ -8046,6 +8378,36 @@ export declare class Pager<T> implements AsyncIterable<T> {
|
|
|
8046
8378
|
hasNextPage(): boolean;
|
|
8047
8379
|
}
|
|
8048
8380
|
|
|
8381
|
+
/** Output only. Pairwise metric choice. This enum is not supported in Gemini API. */
|
|
8382
|
+
export declare enum PairwiseChoice {
|
|
8383
|
+
/**
|
|
8384
|
+
* Unspecified prediction choice.
|
|
8385
|
+
*/
|
|
8386
|
+
PAIRWISE_CHOICE_UNSPECIFIED = "PAIRWISE_CHOICE_UNSPECIFIED",
|
|
8387
|
+
/**
|
|
8388
|
+
* Baseline prediction wins
|
|
8389
|
+
*/
|
|
8390
|
+
BASELINE = "BASELINE",
|
|
8391
|
+
/**
|
|
8392
|
+
* Candidate prediction wins
|
|
8393
|
+
*/
|
|
8394
|
+
CANDIDATE = "CANDIDATE",
|
|
8395
|
+
/**
|
|
8396
|
+
* Winner cannot be determined
|
|
8397
|
+
*/
|
|
8398
|
+
TIE = "TIE"
|
|
8399
|
+
}
|
|
8400
|
+
|
|
8401
|
+
/** Spec for pairwise metric result. This data type is not supported in Gemini API. */
|
|
8402
|
+
export declare interface PairwiseMetricResult {
|
|
8403
|
+
/** Output only. Spec for custom output. */
|
|
8404
|
+
customOutput?: CustomOutput;
|
|
8405
|
+
/** Output only. Explanation for pairwise metric score. */
|
|
8406
|
+
explanation?: string;
|
|
8407
|
+
/** Output only. Pairwise metric choice. */
|
|
8408
|
+
pairwiseChoice?: PairwiseChoice;
|
|
8409
|
+
}
|
|
8410
|
+
|
|
8049
8411
|
/** A datatype containing media content.
|
|
8050
8412
|
|
|
8051
8413
|
Exactly one field within a Part should be set, representing the specific type
|
|
@@ -8055,21 +8417,21 @@ export declare interface Part {
|
|
|
8055
8417
|
/** Media resolution for the input media.
|
|
8056
8418
|
*/
|
|
8057
8419
|
mediaResolution?: PartMediaResolution;
|
|
8058
|
-
/** Optional.
|
|
8420
|
+
/** Optional. The result of executing the ExecutableCode. */
|
|
8059
8421
|
codeExecutionResult?: CodeExecutionResult;
|
|
8060
|
-
/** Optional. Code generated by the model that is
|
|
8422
|
+
/** Optional. Code generated by the model that is intended to be executed. */
|
|
8061
8423
|
executableCode?: ExecutableCode;
|
|
8062
|
-
/** Optional. URI
|
|
8424
|
+
/** Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage. */
|
|
8063
8425
|
fileData?: FileData;
|
|
8064
|
-
/** Optional. A predicted
|
|
8426
|
+
/** 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. */
|
|
8065
8427
|
functionCall?: FunctionCall;
|
|
8066
|
-
/** Optional. The result
|
|
8428
|
+
/** Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted. */
|
|
8067
8429
|
functionResponse?: FunctionResponse;
|
|
8068
|
-
/** Optional.
|
|
8430
|
+
/** Optional. The inline data content of the part. This can be used to include images, audio, or video in a request. */
|
|
8069
8431
|
inlineData?: Blob_2;
|
|
8070
|
-
/** Optional.
|
|
8432
|
+
/** 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. */
|
|
8071
8433
|
text?: string;
|
|
8072
|
-
/** Optional. Indicates
|
|
8434
|
+
/** Optional. Indicates whether the `part` represents the model's thought process or reasoning. */
|
|
8073
8435
|
thought?: boolean;
|
|
8074
8436
|
/** Optional. An opaque signature for the thought so it can be reused in subsequent requests.
|
|
8075
8437
|
* @remarks Encoded as base64 string. */
|
|
@@ -8080,16 +8442,16 @@ export declare interface Part {
|
|
|
8080
8442
|
|
|
8081
8443
|
/** Partial argument value of the function call. This data type is not supported in Gemini API. */
|
|
8082
8444
|
export declare interface PartialArg {
|
|
8445
|
+
/** Optional. Represents a boolean value. */
|
|
8446
|
+
boolValue?: boolean;
|
|
8447
|
+
/** Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". */
|
|
8448
|
+
jsonPath?: string;
|
|
8083
8449
|
/** Optional. Represents a null value. */
|
|
8084
8450
|
nullValue?: 'NULL_VALUE';
|
|
8085
8451
|
/** Optional. Represents a double value. */
|
|
8086
8452
|
numberValue?: number;
|
|
8087
8453
|
/** Optional. Represents a string value. */
|
|
8088
8454
|
stringValue?: string;
|
|
8089
|
-
/** Optional. Represents a boolean value. */
|
|
8090
|
-
boolValue?: boolean;
|
|
8091
|
-
/** Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". */
|
|
8092
|
-
jsonPath?: string;
|
|
8093
8455
|
/** 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. */
|
|
8094
8456
|
willContinue?: boolean;
|
|
8095
8457
|
}
|
|
@@ -8193,14 +8555,28 @@ export declare enum PhishBlockThreshold {
|
|
|
8193
8555
|
BLOCK_ONLY_EXTREMELY_HIGH = "BLOCK_ONLY_EXTREMELY_HIGH"
|
|
8194
8556
|
}
|
|
8195
8557
|
|
|
8196
|
-
/**
|
|
8558
|
+
/** Spec for pointwise metric result. This data type is not supported in Gemini API. */
|
|
8559
|
+
export declare interface PointwiseMetricResult {
|
|
8560
|
+
/** Output only. Spec for custom output. */
|
|
8561
|
+
customOutput?: CustomOutput;
|
|
8562
|
+
/** Output only. Explanation for pointwise metric score. */
|
|
8563
|
+
explanation?: string;
|
|
8564
|
+
/** Output only. Pointwise metric score. */
|
|
8565
|
+
score?: number;
|
|
8566
|
+
}
|
|
8567
|
+
|
|
8568
|
+
/** Configuration for a prebuilt voice. */
|
|
8197
8569
|
export declare interface PrebuiltVoiceConfig {
|
|
8198
|
-
/** The name of the
|
|
8570
|
+
/** The name of the prebuilt voice to use. */
|
|
8199
8571
|
voiceName?: string;
|
|
8200
8572
|
}
|
|
8201
8573
|
|
|
8202
8574
|
/** Statistics computed for datasets used for preference optimization. This data type is not supported in Gemini API. */
|
|
8203
8575
|
export declare interface PreferenceOptimizationDataStats {
|
|
8576
|
+
/** Output only. A partial sample of the indices (starting from 1) of the dropped examples. */
|
|
8577
|
+
droppedExampleIndices?: string[];
|
|
8578
|
+
/** Output only. For each index in `dropped_example_indices`, the user-facing reason why the example was dropped. */
|
|
8579
|
+
droppedExampleReasons?: string[];
|
|
8204
8580
|
/** Output only. Dataset distributions for scores variance per example. */
|
|
8205
8581
|
scoreVariancePerExampleDistribution?: DatasetDistribution;
|
|
8206
8582
|
/** Output only. Dataset distributions for scores. */
|
|
@@ -8267,6 +8643,22 @@ export declare interface ProductImage {
|
|
|
8267
8643
|
productImage?: Image_2;
|
|
8268
8644
|
}
|
|
8269
8645
|
|
|
8646
|
+
/** Enum for controlling whether the model can generate images of prominent people (celebrities). */
|
|
8647
|
+
export declare enum ProminentPeople {
|
|
8648
|
+
/**
|
|
8649
|
+
* Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
|
|
8650
|
+
*/
|
|
8651
|
+
PROMINENT_PEOPLE_UNSPECIFIED = "PROMINENT_PEOPLE_UNSPECIFIED",
|
|
8652
|
+
/**
|
|
8653
|
+
* Allows the model to generate images of prominent people.
|
|
8654
|
+
*/
|
|
8655
|
+
ALLOW_PROMINENT_PEOPLE = "ALLOW_PROMINENT_PEOPLE",
|
|
8656
|
+
/**
|
|
8657
|
+
* Prevents the model from generating images of prominent people.
|
|
8658
|
+
*/
|
|
8659
|
+
BLOCK_PROMINENT_PEOPLE = "BLOCK_PROMINENT_PEOPLE"
|
|
8660
|
+
}
|
|
8661
|
+
|
|
8270
8662
|
/**
|
|
8271
8663
|
* @license
|
|
8272
8664
|
* Copyright 2025 Google LLC
|
|
@@ -8341,6 +8733,12 @@ export declare interface RagRetrievalConfigRankingRankService {
|
|
|
8341
8733
|
declare class RateLimitError extends APIError<429, Headers> {
|
|
8342
8734
|
}
|
|
8343
8735
|
|
|
8736
|
+
/** Raw output. This data type is not supported in Gemini API. */
|
|
8737
|
+
export declare interface RawOutput {
|
|
8738
|
+
/** Output only. Raw output string. */
|
|
8739
|
+
rawOutput?: string[];
|
|
8740
|
+
}
|
|
8741
|
+
|
|
8344
8742
|
/** A raw reference image.
|
|
8345
8743
|
|
|
8346
8744
|
A raw reference image represents the base image to edit, provided by the user.
|
|
@@ -8642,12 +9040,23 @@ export declare interface RetrievalConfig {
|
|
|
8642
9040
|
languageCode?: string;
|
|
8643
9041
|
}
|
|
8644
9042
|
|
|
8645
|
-
/** Metadata
|
|
9043
|
+
/** Metadata returned to client when grounding is enabled. */
|
|
8646
9044
|
export declare interface RetrievalMetadata {
|
|
8647
|
-
/** Optional. Score indicating how likely information from
|
|
9045
|
+
/** Optional. Score indicating how likely information from google
|
|
9046
|
+
search could help answer the prompt. The score is in the range [0, 1],
|
|
9047
|
+
where 0 is the least likely and 1 is the most likely. This score is only
|
|
9048
|
+
populated when google search grounding and dynamic retrieval is enabled.
|
|
9049
|
+
It will be compared to the threshold to determine whether to trigger
|
|
9050
|
+
Google search. */
|
|
8648
9051
|
googleSearchDynamicRetrievalScore?: number;
|
|
8649
9052
|
}
|
|
8650
9053
|
|
|
9054
|
+
/** Rouge metric value for an instance. This data type is not supported in Gemini API. */
|
|
9055
|
+
export declare interface RougeMetricValue {
|
|
9056
|
+
/** Output only. Rouge score. */
|
|
9057
|
+
score?: number;
|
|
9058
|
+
}
|
|
9059
|
+
|
|
8651
9060
|
/** Safety attributes of a GeneratedImage or the user-provided prompt. */
|
|
8652
9061
|
export declare interface SafetyAttributes {
|
|
8653
9062
|
/** List of RAI categories. */
|
|
@@ -8666,31 +9075,31 @@ export declare enum SafetyFilterLevel {
|
|
|
8666
9075
|
BLOCK_NONE = "BLOCK_NONE"
|
|
8667
9076
|
}
|
|
8668
9077
|
|
|
8669
|
-
/**
|
|
9078
|
+
/** A safety rating for a piece of content. The safety rating contains the harm category and the harm probability level. */
|
|
8670
9079
|
export declare interface SafetyRating {
|
|
8671
|
-
/** Output only. Indicates whether the content was
|
|
9080
|
+
/** Output only. Indicates whether the content was blocked because of this rating. */
|
|
8672
9081
|
blocked?: boolean;
|
|
8673
|
-
/** Output only.
|
|
9082
|
+
/** Output only. The harm category of this rating. */
|
|
8674
9083
|
category?: HarmCategory;
|
|
8675
9084
|
/** 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. */
|
|
8676
9085
|
overwrittenThreshold?: HarmBlockThreshold;
|
|
8677
|
-
/** Output only.
|
|
9086
|
+
/** Output only. The probability of harm for this category. */
|
|
8678
9087
|
probability?: HarmProbability;
|
|
8679
|
-
/** Output only.
|
|
9088
|
+
/** Output only. The probability score of harm for this category. This field is not supported in Gemini API. */
|
|
8680
9089
|
probabilityScore?: number;
|
|
8681
|
-
/** Output only.
|
|
9090
|
+
/** Output only. The severity of harm for this category. This field is not supported in Gemini API. */
|
|
8682
9091
|
severity?: HarmSeverity;
|
|
8683
|
-
/** Output only.
|
|
9092
|
+
/** Output only. The severity score of harm for this category. This field is not supported in Gemini API. */
|
|
8684
9093
|
severityScore?: number;
|
|
8685
9094
|
}
|
|
8686
9095
|
|
|
8687
|
-
/**
|
|
9096
|
+
/** A safety setting that affects the safety-blocking behavior. A SafetySetting consists of a harm category and a threshold for that category. */
|
|
8688
9097
|
export declare interface SafetySetting {
|
|
8689
|
-
/** Required.
|
|
9098
|
+
/** Required. The harm category to be blocked. */
|
|
8690
9099
|
category?: HarmCategory;
|
|
8691
|
-
/** Optional.
|
|
9100
|
+
/** 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. */
|
|
8692
9101
|
method?: HarmBlockMethod;
|
|
8693
|
-
/** Required. The harm
|
|
9102
|
+
/** Required. The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
|
|
8694
9103
|
threshold?: HarmBlockThreshold;
|
|
8695
9104
|
}
|
|
8696
9105
|
|
|
@@ -8756,49 +9165,49 @@ export declare enum Scale {
|
|
|
8756
9165
|
object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
|
|
8757
9166
|
be added in the future as needed. */
|
|
8758
9167
|
export declare interface Schema {
|
|
8759
|
-
/** Optional. The
|
|
9168
|
+
/** Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`. */
|
|
8760
9169
|
anyOf?: Schema[];
|
|
8761
|
-
/** Optional. Default value
|
|
9170
|
+
/** Optional. Default value to use if the field is not specified. */
|
|
8762
9171
|
default?: unknown;
|
|
8763
|
-
/** Optional.
|
|
9172
|
+
/** Optional. Description of the schema. */
|
|
8764
9173
|
description?: string;
|
|
8765
|
-
/** Optional. Possible values of the
|
|
9174
|
+
/** 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"]}` */
|
|
8766
9175
|
enum?: string[];
|
|
8767
|
-
/** Optional. Example of
|
|
9176
|
+
/** Optional. Example of an instance of this schema. */
|
|
8768
9177
|
example?: unknown;
|
|
8769
|
-
/** Optional. The format of the data.
|
|
9178
|
+
/** 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. */
|
|
8770
9179
|
format?: string;
|
|
8771
|
-
/** Optional.
|
|
9180
|
+
/** Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array. */
|
|
8772
9181
|
items?: Schema;
|
|
8773
|
-
/** Optional.
|
|
9182
|
+
/** Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array. */
|
|
8774
9183
|
maxItems?: string;
|
|
8775
|
-
/** Optional.
|
|
9184
|
+
/** Optional. If type is `STRING`, `max_length` specifies the maximum length of the string. */
|
|
8776
9185
|
maxLength?: string;
|
|
8777
|
-
/** Optional.
|
|
9186
|
+
/** Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided. */
|
|
8778
9187
|
maxProperties?: string;
|
|
8779
|
-
/** Optional.
|
|
9188
|
+
/** Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value. */
|
|
8780
9189
|
maximum?: number;
|
|
8781
|
-
/** Optional.
|
|
9190
|
+
/** Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array. */
|
|
8782
9191
|
minItems?: string;
|
|
8783
|
-
/** Optional.
|
|
9192
|
+
/** Optional. If type is `STRING`, `min_length` specifies the minimum length of the string. */
|
|
8784
9193
|
minLength?: string;
|
|
8785
|
-
/** Optional.
|
|
9194
|
+
/** Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided. */
|
|
8786
9195
|
minProperties?: string;
|
|
8787
|
-
/** Optional.
|
|
9196
|
+
/** Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value. */
|
|
8788
9197
|
minimum?: number;
|
|
8789
|
-
/** Optional. Indicates if the value
|
|
9198
|
+
/** Optional. Indicates if the value of this field can be null. */
|
|
8790
9199
|
nullable?: boolean;
|
|
8791
|
-
/** Optional.
|
|
9200
|
+
/** Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match. */
|
|
8792
9201
|
pattern?: string;
|
|
8793
|
-
/** Optional.
|
|
9202
|
+
/** Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object. */
|
|
8794
9203
|
properties?: Record<string, Schema>;
|
|
8795
|
-
/** Optional.
|
|
9204
|
+
/** 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. */
|
|
8796
9205
|
propertyOrdering?: string[];
|
|
8797
|
-
/** Optional.
|
|
9206
|
+
/** Optional. If type is `OBJECT`, `required` lists the names of properties that must be present. */
|
|
8798
9207
|
required?: string[];
|
|
8799
|
-
/** Optional.
|
|
9208
|
+
/** Optional. Title for the schema. */
|
|
8800
9209
|
title?: string;
|
|
8801
|
-
/** Optional.
|
|
9210
|
+
/** Optional. Data type of the schema field. */
|
|
8802
9211
|
type?: Type;
|
|
8803
9212
|
}
|
|
8804
9213
|
|
|
@@ -8810,24 +9219,40 @@ export declare interface ScribbleImage {
|
|
|
8810
9219
|
image?: Image_2;
|
|
8811
9220
|
}
|
|
8812
9221
|
|
|
8813
|
-
/**
|
|
9222
|
+
/** The entry point used to search for grounding sources. */
|
|
8814
9223
|
export declare interface SearchEntryPoint {
|
|
8815
|
-
/** Optional. Web content snippet that can be embedded in a web page
|
|
9224
|
+
/** Optional. Web content snippet that can be embedded in a web page
|
|
9225
|
+
or an app webview. */
|
|
8816
9226
|
renderedContent?: string;
|
|
8817
|
-
/** Optional.
|
|
9227
|
+
/** Optional. JSON representing array of tuples.
|
|
8818
9228
|
* @remarks Encoded as base64 string. */
|
|
8819
9229
|
sdkBlob?: string;
|
|
8820
9230
|
}
|
|
8821
9231
|
|
|
8822
|
-
/**
|
|
9232
|
+
/** Tool to support computer use. */
|
|
9233
|
+
export declare interface SearchTypes {
|
|
9234
|
+
/** Setting this field enables web search. Only text results are
|
|
9235
|
+
returned. */
|
|
9236
|
+
webSearch?: WebSearch;
|
|
9237
|
+
/** Setting this field enables image search. Image bytes are returned. */
|
|
9238
|
+
imageSearch?: ImageSearch;
|
|
9239
|
+
}
|
|
9240
|
+
|
|
9241
|
+
/** Segment of the content this support belongs to. */
|
|
8823
9242
|
export declare interface Segment {
|
|
8824
|
-
/** Output only.
|
|
9243
|
+
/** Output only. Start index in the given Part, measured in bytes.
|
|
9244
|
+
|
|
9245
|
+
Offset from the start of the Part, inclusive, starting at zero. */
|
|
9246
|
+
startIndex?: number;
|
|
9247
|
+
/** Output only. End index in the given Part, measured in bytes.
|
|
9248
|
+
|
|
9249
|
+
Offset from the start of the Part, exclusive, starting at zero. */
|
|
8825
9250
|
endIndex?: number;
|
|
8826
|
-
/** Output only. The index of a Part object within its parent
|
|
9251
|
+
/** Output only. The index of a Part object within its parent
|
|
9252
|
+
Content object. */
|
|
8827
9253
|
partIndex?: number;
|
|
8828
|
-
/** Output only.
|
|
8829
|
-
|
|
8830
|
-
/** Output only. The text corresponding to the segment from the response. */
|
|
9254
|
+
/** Output only. The text corresponding to the segment from the
|
|
9255
|
+
response. */
|
|
8831
9256
|
text?: string;
|
|
8832
9257
|
}
|
|
8833
9258
|
|
|
@@ -9103,7 +9528,7 @@ export declare interface SlidingWindow {
|
|
|
9103
9528
|
targetTokens?: string;
|
|
9104
9529
|
}
|
|
9105
9530
|
|
|
9106
|
-
/** Configuration for a single speaker in a multi
|
|
9531
|
+
/** Configuration for a single speaker in a multi-speaker setup. */
|
|
9107
9532
|
export declare interface SpeakerVoiceConfig {
|
|
9108
9533
|
/** Required. The name of the speaker. This should be the same as the speaker name used in the prompt. */
|
|
9109
9534
|
speaker?: string;
|
|
@@ -9114,7 +9539,7 @@ export declare interface SpeakerVoiceConfig {
|
|
|
9114
9539
|
export declare interface SpeechConfig {
|
|
9115
9540
|
/** Configuration for the voice of the response. */
|
|
9116
9541
|
voiceConfig?: VoiceConfig;
|
|
9117
|
-
/** Optional.
|
|
9542
|
+
/** Optional. The language code (ISO 639-1) for the speech synthesis. */
|
|
9118
9543
|
languageCode?: string;
|
|
9119
9544
|
/** The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`. */
|
|
9120
9545
|
multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
|
|
@@ -9181,6 +9606,20 @@ declare class Stream<Item> implements AsyncIterable<Item> {
|
|
|
9181
9606
|
toReadableStream(): _ReadableStream_2;
|
|
9182
9607
|
}
|
|
9183
9608
|
|
|
9609
|
+
/** A transport that can stream HTTP requests and responses. Next ID: 6. This data type is not supported in Vertex AI. */
|
|
9610
|
+
export declare interface StreamableHttpTransport {
|
|
9611
|
+
/** Optional: Fields for authentication headers, timeouts, etc., if needed. */
|
|
9612
|
+
headers?: Record<string, string>;
|
|
9613
|
+
/** Timeout for SSE read operations. */
|
|
9614
|
+
sseReadTimeout?: string;
|
|
9615
|
+
/** Whether to close the client session when the transport closes. */
|
|
9616
|
+
terminateOnClose?: boolean;
|
|
9617
|
+
/** HTTP timeout for regular operations. */
|
|
9618
|
+
timeout?: string;
|
|
9619
|
+
/** The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp". */
|
|
9620
|
+
url?: string;
|
|
9621
|
+
}
|
|
9622
|
+
|
|
9184
9623
|
/** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
|
|
9185
9624
|
export declare interface StringList {
|
|
9186
9625
|
/** The string values of the metadata to store. */
|
|
@@ -9366,15 +9805,15 @@ export declare interface TestTableItem {
|
|
|
9366
9805
|
* A text content block.
|
|
9367
9806
|
*/
|
|
9368
9807
|
declare interface TextContent {
|
|
9808
|
+
/**
|
|
9809
|
+
* The text content.
|
|
9810
|
+
*/
|
|
9811
|
+
text: string;
|
|
9369
9812
|
type: 'text';
|
|
9370
9813
|
/**
|
|
9371
9814
|
* Citation information for model-generated content.
|
|
9372
9815
|
*/
|
|
9373
9816
|
annotations?: Array<Annotation>;
|
|
9374
|
-
/**
|
|
9375
|
-
* The text content.
|
|
9376
|
-
*/
|
|
9377
|
-
text?: string;
|
|
9378
9817
|
}
|
|
9379
9818
|
|
|
9380
9819
|
/** The thinking features configuration. */
|
|
@@ -9540,20 +9979,25 @@ export declare interface Tool {
|
|
|
9540
9979
|
computerUse?: ComputerUse;
|
|
9541
9980
|
/** Optional. Tool to retrieve knowledge from the File Search Stores. */
|
|
9542
9981
|
fileSearch?: FileSearch;
|
|
9982
|
+
/** Enables the model to execute Google Search as part of generation. */
|
|
9983
|
+
googleSearch?: GoogleSearch;
|
|
9984
|
+
/** Optional. Tool that allows grounding the model's response with
|
|
9985
|
+
geospatial context related to the user's query. */
|
|
9986
|
+
googleMaps?: GoogleMaps;
|
|
9543
9987
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
9544
9988
|
codeExecution?: ToolCodeExecution;
|
|
9545
9989
|
/** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
|
|
9546
9990
|
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
9547
9991
|
/** 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. */
|
|
9548
9992
|
functionDeclarations?: FunctionDeclaration[];
|
|
9549
|
-
/** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
|
|
9550
|
-
googleMaps?: GoogleMaps;
|
|
9551
|
-
/** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
|
|
9552
|
-
googleSearch?: GoogleSearch;
|
|
9553
9993
|
/** Optional. Specialized retrieval tool that is powered by Google Search. */
|
|
9554
9994
|
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
9995
|
+
/** 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. */
|
|
9996
|
+
parallelAiSearch?: ToolParallelAiSearch;
|
|
9555
9997
|
/** Optional. Tool to support URL context retrieval. */
|
|
9556
9998
|
urlContext?: UrlContext;
|
|
9999
|
+
/** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
|
|
10000
|
+
mcpServers?: McpServer[];
|
|
9557
10001
|
}
|
|
9558
10002
|
|
|
9559
10003
|
/**
|
|
@@ -9567,6 +10011,10 @@ declare namespace Tool_2 {
|
|
|
9567
10011
|
*/
|
|
9568
10012
|
interface GoogleSearch {
|
|
9569
10013
|
type: 'google_search';
|
|
10014
|
+
/**
|
|
10015
|
+
* The types of search grounding to enable.
|
|
10016
|
+
*/
|
|
10017
|
+
search_types?: Array<'web_search' | 'image_search'>;
|
|
9570
10018
|
}
|
|
9571
10019
|
/**
|
|
9572
10020
|
* A tool that can be used by the model to execute code.
|
|
@@ -9640,13 +10088,11 @@ declare namespace Tool_2 {
|
|
|
9640
10088
|
}
|
|
9641
10089
|
|
|
9642
10090
|
/**
|
|
9643
|
-
* The configuration
|
|
10091
|
+
* The tool choice configuration containing allowed tools.
|
|
9644
10092
|
*/
|
|
9645
|
-
declare type ToolChoice = ToolChoiceType | ToolChoiceConfig;
|
|
9646
|
-
|
|
9647
10093
|
declare interface ToolChoiceConfig {
|
|
9648
10094
|
/**
|
|
9649
|
-
* The
|
|
10095
|
+
* The allowed tools.
|
|
9650
10096
|
*/
|
|
9651
10097
|
allowed_tools?: AllowedTools;
|
|
9652
10098
|
}
|
|
@@ -9669,6 +10115,14 @@ export declare interface ToolConfig {
|
|
|
9669
10115
|
|
|
9670
10116
|
export declare type ToolListUnion = ToolUnion[];
|
|
9671
10117
|
|
|
10118
|
+
/** ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. This data type is not supported in Gemini API. */
|
|
10119
|
+
export declare interface ToolParallelAiSearch {
|
|
10120
|
+
/** 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. */
|
|
10121
|
+
apiKey?: string;
|
|
10122
|
+
/** 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 } } */
|
|
10123
|
+
customConfigs?: Record<string, unknown>;
|
|
10124
|
+
}
|
|
10125
|
+
|
|
9672
10126
|
export declare type ToolUnion = Tool | CallableTool;
|
|
9673
10127
|
|
|
9674
10128
|
/** Output only. The traffic type for this request. This enum is not supported in Gemini API. */
|
|
@@ -9681,6 +10135,14 @@ export declare enum TrafficType {
|
|
|
9681
10135
|
* The request was processed using Pay-As-You-Go quota.
|
|
9682
10136
|
*/
|
|
9683
10137
|
ON_DEMAND = "ON_DEMAND",
|
|
10138
|
+
/**
|
|
10139
|
+
* Type for Priority Pay-As-You-Go traffic.
|
|
10140
|
+
*/
|
|
10141
|
+
ON_DEMAND_PRIORITY = "ON_DEMAND_PRIORITY",
|
|
10142
|
+
/**
|
|
10143
|
+
* Type for Flex traffic.
|
|
10144
|
+
*/
|
|
10145
|
+
ON_DEMAND_FLEX = "ON_DEMAND_FLEX",
|
|
9684
10146
|
/**
|
|
9685
10147
|
* Type for Provisioned Throughput traffic.
|
|
9686
10148
|
*/
|
|
@@ -9755,7 +10217,7 @@ export declare interface TuningDataset {
|
|
|
9755
10217
|
|
|
9756
10218
|
/** The tuning data statistic values for TuningJob. This data type is not supported in Gemini API. */
|
|
9757
10219
|
export declare interface TuningDataStats {
|
|
9758
|
-
/** Output only. Statistics for distillation. */
|
|
10220
|
+
/** Output only. Statistics for distillation prompt dataset. These statistics do not include the responses sampled from the teacher model. */
|
|
9759
10221
|
distillationDataStats?: DistillationDataStats;
|
|
9760
10222
|
/** Output only. Statistics for preference optimization. */
|
|
9761
10223
|
preferenceOptimizationDataStats?: PreferenceOptimizationDataStats;
|
|
@@ -9811,8 +10273,12 @@ export declare interface TuningJob {
|
|
|
9811
10273
|
partnerModelTuningSpec?: PartnerModelTuningSpec;
|
|
9812
10274
|
/** 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. */
|
|
9813
10275
|
customBaseModel?: string;
|
|
10276
|
+
/** Output only. Evaluation runs for the Tuning Job. */
|
|
10277
|
+
evaluateDatasetRuns?: EvaluateDatasetRun[];
|
|
9814
10278
|
/** Output only. The Experiment associated with this TuningJob. */
|
|
9815
10279
|
experiment?: string;
|
|
10280
|
+
/** Tuning Spec for Full Fine Tuning. */
|
|
10281
|
+
fullFineTuningSpec?: FullFineTuningSpec;
|
|
9816
10282
|
/** 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. */
|
|
9817
10283
|
labels?: Record<string, string>;
|
|
9818
10284
|
/** 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. */
|
|
@@ -9823,10 +10289,40 @@ export declare interface TuningJob {
|
|
|
9823
10289
|
serviceAccount?: string;
|
|
9824
10290
|
/** 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. */
|
|
9825
10291
|
tunedModelDisplayName?: string;
|
|
10292
|
+
/** Output only. The detail state of the tuning job (while the overall `JobState` is running). */
|
|
10293
|
+
tuningJobState?: TuningJobState;
|
|
9826
10294
|
/** Tuning Spec for Veo Tuning. */
|
|
9827
10295
|
veoTuningSpec?: VeoTuningSpec;
|
|
9828
10296
|
}
|
|
9829
10297
|
|
|
10298
|
+
/** Output only. The detail state of the tuning job (while the overall `JobState` is running). This enum is not supported in Gemini API. */
|
|
10299
|
+
export declare enum TuningJobState {
|
|
10300
|
+
/**
|
|
10301
|
+
* Default tuning job state.
|
|
10302
|
+
*/
|
|
10303
|
+
TUNING_JOB_STATE_UNSPECIFIED = "TUNING_JOB_STATE_UNSPECIFIED",
|
|
10304
|
+
/**
|
|
10305
|
+
* Tuning job is waiting for job quota.
|
|
10306
|
+
*/
|
|
10307
|
+
TUNING_JOB_STATE_WAITING_FOR_QUOTA = "TUNING_JOB_STATE_WAITING_FOR_QUOTA",
|
|
10308
|
+
/**
|
|
10309
|
+
* Tuning job is validating the dataset.
|
|
10310
|
+
*/
|
|
10311
|
+
TUNING_JOB_STATE_PROCESSING_DATASET = "TUNING_JOB_STATE_PROCESSING_DATASET",
|
|
10312
|
+
/**
|
|
10313
|
+
* Tuning job is waiting for hardware capacity.
|
|
10314
|
+
*/
|
|
10315
|
+
TUNING_JOB_STATE_WAITING_FOR_CAPACITY = "TUNING_JOB_STATE_WAITING_FOR_CAPACITY",
|
|
10316
|
+
/**
|
|
10317
|
+
* Tuning job is running.
|
|
10318
|
+
*/
|
|
10319
|
+
TUNING_JOB_STATE_TUNING = "TUNING_JOB_STATE_TUNING",
|
|
10320
|
+
/**
|
|
10321
|
+
* Tuning job is doing some post processing steps.
|
|
10322
|
+
*/
|
|
10323
|
+
TUNING_JOB_STATE_POST_PROCESSING = "TUNING_JOB_STATE_POST_PROCESSING"
|
|
10324
|
+
}
|
|
10325
|
+
|
|
9830
10326
|
/** Enum representing the tuning method. */
|
|
9831
10327
|
export declare enum TuningMethod {
|
|
9832
10328
|
/**
|
|
@@ -10004,7 +10500,7 @@ export declare enum TurnCoverage {
|
|
|
10004
10500
|
TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT"
|
|
10005
10501
|
}
|
|
10006
10502
|
|
|
10007
|
-
/**
|
|
10503
|
+
/** Data type of the schema field. */
|
|
10008
10504
|
export declare enum Type {
|
|
10009
10505
|
/**
|
|
10010
10506
|
* Not specified, should not be used.
|
|
@@ -10057,14 +10553,15 @@ declare namespace types {
|
|
|
10057
10553
|
Language,
|
|
10058
10554
|
FunctionResponseScheduling,
|
|
10059
10555
|
Type,
|
|
10060
|
-
|
|
10556
|
+
PhishBlockThreshold,
|
|
10061
10557
|
AuthType,
|
|
10062
10558
|
HttpElementLocation,
|
|
10063
|
-
|
|
10559
|
+
ApiSpec,
|
|
10064
10560
|
Behavior,
|
|
10065
10561
|
DynamicRetrievalConfigMode,
|
|
10066
10562
|
FunctionCallingConfigMode,
|
|
10067
10563
|
ThinkingLevel,
|
|
10564
|
+
PersonGeneration,
|
|
10068
10565
|
HarmCategory,
|
|
10069
10566
|
HarmBlockMethod,
|
|
10070
10567
|
HarmBlockThreshold,
|
|
@@ -10079,14 +10576,17 @@ declare namespace types {
|
|
|
10079
10576
|
TuningMode,
|
|
10080
10577
|
AdapterSize,
|
|
10081
10578
|
JobState,
|
|
10579
|
+
TuningJobState,
|
|
10580
|
+
AggregationMetric,
|
|
10581
|
+
PairwiseChoice,
|
|
10082
10582
|
TuningTask,
|
|
10083
10583
|
PartMediaResolutionLevel,
|
|
10084
10584
|
ResourceScope,
|
|
10085
10585
|
FeatureSelectionPreference,
|
|
10086
10586
|
Environment,
|
|
10587
|
+
ProminentPeople,
|
|
10087
10588
|
EmbeddingApiType,
|
|
10088
10589
|
SafetyFilterLevel,
|
|
10089
|
-
PersonGeneration,
|
|
10090
10590
|
ImagePromptLanguage,
|
|
10091
10591
|
MaskReferenceMode,
|
|
10092
10592
|
ControlReferenceType,
|
|
@@ -10131,14 +10631,20 @@ declare namespace types {
|
|
|
10131
10631
|
ModelSelectionConfig,
|
|
10132
10632
|
ComputerUse,
|
|
10133
10633
|
FileSearch,
|
|
10134
|
-
|
|
10135
|
-
|
|
10634
|
+
WebSearch,
|
|
10635
|
+
ImageSearch,
|
|
10636
|
+
SearchTypes,
|
|
10637
|
+
Interval,
|
|
10638
|
+
GoogleSearch,
|
|
10136
10639
|
ApiKeyConfig,
|
|
10137
10640
|
AuthConfigGoogleServiceAccountConfig,
|
|
10138
10641
|
AuthConfigHttpBasicAuthConfig,
|
|
10139
10642
|
AuthConfigOauthConfig,
|
|
10140
10643
|
AuthConfigOidcConfig,
|
|
10141
10644
|
AuthConfig,
|
|
10645
|
+
GoogleMaps,
|
|
10646
|
+
ApiAuthApiKeyConfig,
|
|
10647
|
+
ApiAuth,
|
|
10142
10648
|
ExternalApiElasticSearchParams,
|
|
10143
10649
|
ExternalApiSimpleSearchParams,
|
|
10144
10650
|
ExternalApi,
|
|
@@ -10156,12 +10662,12 @@ declare namespace types {
|
|
|
10156
10662
|
ToolCodeExecution,
|
|
10157
10663
|
EnterpriseWebSearch,
|
|
10158
10664
|
FunctionDeclaration,
|
|
10159
|
-
GoogleMaps,
|
|
10160
|
-
Interval,
|
|
10161
|
-
GoogleSearch,
|
|
10162
10665
|
DynamicRetrievalConfig,
|
|
10163
10666
|
GoogleSearchRetrieval,
|
|
10667
|
+
ToolParallelAiSearch,
|
|
10164
10668
|
UrlContext,
|
|
10669
|
+
StreamableHttpTransport,
|
|
10670
|
+
McpServer,
|
|
10165
10671
|
Tool,
|
|
10166
10672
|
LatLng,
|
|
10167
10673
|
RetrievalConfig,
|
|
@@ -10175,6 +10681,7 @@ declare namespace types {
|
|
|
10175
10681
|
SpeechConfig,
|
|
10176
10682
|
AutomaticFunctionCallingConfig,
|
|
10177
10683
|
ThinkingConfig,
|
|
10684
|
+
ImageConfigImageOutputOptions,
|
|
10178
10685
|
ImageConfig,
|
|
10179
10686
|
GenerationConfigRoutingConfigAutoRoutingMode,
|
|
10180
10687
|
GenerationConfigRoutingConfigManualRoutingMode,
|
|
@@ -10188,6 +10695,7 @@ declare namespace types {
|
|
|
10188
10695
|
GoogleTypeDate,
|
|
10189
10696
|
Citation,
|
|
10190
10697
|
CitationMetadata,
|
|
10698
|
+
GroundingChunkImage,
|
|
10191
10699
|
GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
|
|
10192
10700
|
GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
|
|
10193
10701
|
GroundingChunkMapsPlaceAnswerSources,
|
|
@@ -10304,6 +10812,23 @@ declare namespace types {
|
|
|
10304
10812
|
TuningDataStats,
|
|
10305
10813
|
EncryptionSpec,
|
|
10306
10814
|
PartnerModelTuningSpec,
|
|
10815
|
+
BleuMetricValue,
|
|
10816
|
+
CustomCodeExecutionResult,
|
|
10817
|
+
ExactMatchMetricValue,
|
|
10818
|
+
RawOutput,
|
|
10819
|
+
CustomOutput,
|
|
10820
|
+
PairwiseMetricResult,
|
|
10821
|
+
PointwiseMetricResult,
|
|
10822
|
+
RougeMetricValue,
|
|
10823
|
+
AggregationResult,
|
|
10824
|
+
BigQuerySource,
|
|
10825
|
+
GcsSource,
|
|
10826
|
+
EvaluationDataset,
|
|
10827
|
+
AggregationOutput,
|
|
10828
|
+
OutputInfo,
|
|
10829
|
+
EvaluateDatasetResponse,
|
|
10830
|
+
EvaluateDatasetRun,
|
|
10831
|
+
FullFineTuningSpec,
|
|
10307
10832
|
VeoHyperParameters,
|
|
10308
10833
|
VeoTuningSpec,
|
|
10309
10834
|
TuningJob,
|
|
@@ -10798,20 +11323,24 @@ declare interface URLContextCallArguments {
|
|
|
10798
11323
|
* URL context content.
|
|
10799
11324
|
*/
|
|
10800
11325
|
declare interface URLContextCallContent {
|
|
10801
|
-
type: 'url_context_call';
|
|
10802
11326
|
/**
|
|
10803
11327
|
* A unique ID for this specific tool call.
|
|
10804
11328
|
*/
|
|
10805
|
-
id
|
|
11329
|
+
id: string;
|
|
10806
11330
|
/**
|
|
10807
11331
|
* The arguments to pass to the URL context.
|
|
10808
11332
|
*/
|
|
10809
|
-
arguments
|
|
11333
|
+
arguments: URLContextCallArguments;
|
|
11334
|
+
type: 'url_context_call';
|
|
11335
|
+
/**
|
|
11336
|
+
* A signature hash for backend validation.
|
|
11337
|
+
*/
|
|
11338
|
+
signature?: string;
|
|
10810
11339
|
}
|
|
10811
11340
|
|
|
10812
|
-
/** Metadata
|
|
11341
|
+
/** Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL. */
|
|
10813
11342
|
export declare interface UrlContextMetadata {
|
|
10814
|
-
/** Output only.
|
|
11343
|
+
/** Output only. A list of URL metadata, with one entry for each URL retrieved by the tool. */
|
|
10815
11344
|
urlMetadata?: UrlMetadata[];
|
|
10816
11345
|
}
|
|
10817
11346
|
|
|
@@ -10833,45 +11362,45 @@ declare interface URLContextResult {
|
|
|
10833
11362
|
* URL context result content.
|
|
10834
11363
|
*/
|
|
10835
11364
|
declare interface URLContextResultContent {
|
|
10836
|
-
type: 'url_context_result';
|
|
10837
11365
|
/**
|
|
10838
11366
|
* ID to match the ID from the url context call block.
|
|
10839
11367
|
*/
|
|
10840
|
-
call_id
|
|
11368
|
+
call_id: string;
|
|
10841
11369
|
/**
|
|
10842
|
-
*
|
|
11370
|
+
* The results of the URL context.
|
|
10843
11371
|
*/
|
|
10844
|
-
|
|
11372
|
+
result: Array<URLContextResult>;
|
|
11373
|
+
type: 'url_context_result';
|
|
10845
11374
|
/**
|
|
10846
|
-
*
|
|
11375
|
+
* Whether the URL context resulted in an error.
|
|
10847
11376
|
*/
|
|
10848
|
-
|
|
11377
|
+
is_error?: boolean;
|
|
10849
11378
|
/**
|
|
10850
|
-
*
|
|
11379
|
+
* A signature hash for backend validation.
|
|
10851
11380
|
*/
|
|
10852
11381
|
signature?: string;
|
|
10853
11382
|
}
|
|
10854
11383
|
|
|
10855
|
-
/**
|
|
11384
|
+
/** The metadata for a single URL retrieval. */
|
|
10856
11385
|
export declare interface UrlMetadata {
|
|
10857
|
-
/**
|
|
11386
|
+
/** The URL retrieved by the tool. */
|
|
10858
11387
|
retrievedUrl?: string;
|
|
10859
|
-
/**
|
|
11388
|
+
/** The status of the URL retrieval. */
|
|
10860
11389
|
urlRetrievalStatus?: UrlRetrievalStatus;
|
|
10861
11390
|
}
|
|
10862
11391
|
|
|
10863
|
-
/**
|
|
11392
|
+
/** The status of the URL retrieval. */
|
|
10864
11393
|
export declare enum UrlRetrievalStatus {
|
|
10865
11394
|
/**
|
|
10866
11395
|
* Default value. This value is unused.
|
|
10867
11396
|
*/
|
|
10868
11397
|
URL_RETRIEVAL_STATUS_UNSPECIFIED = "URL_RETRIEVAL_STATUS_UNSPECIFIED",
|
|
10869
11398
|
/**
|
|
10870
|
-
*
|
|
11399
|
+
* The URL was retrieved successfully.
|
|
10871
11400
|
*/
|
|
10872
11401
|
URL_RETRIEVAL_STATUS_SUCCESS = "URL_RETRIEVAL_STATUS_SUCCESS",
|
|
10873
11402
|
/**
|
|
10874
|
-
*
|
|
11403
|
+
* The URL retrieval failed.
|
|
10875
11404
|
*/
|
|
10876
11405
|
URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR",
|
|
10877
11406
|
/**
|
|
@@ -11037,6 +11566,8 @@ export declare interface VeoHyperParameters {
|
|
|
11037
11566
|
learningRateMultiplier?: number;
|
|
11038
11567
|
/** Optional. The tuning task. Either I2V or T2V. */
|
|
11039
11568
|
tuningTask?: TuningTask;
|
|
11569
|
+
/** 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. */
|
|
11570
|
+
veoDataMixtureRatio?: number;
|
|
11040
11571
|
}
|
|
11041
11572
|
|
|
11042
11573
|
/** Tuning Spec for Veo Model Tuning. This data type is not supported in Gemini API. */
|
|
@@ -11132,7 +11663,7 @@ declare interface VideoContent {
|
|
|
11132
11663
|
/**
|
|
11133
11664
|
* The mime type of the video.
|
|
11134
11665
|
*/
|
|
11135
|
-
mime_type?:
|
|
11666
|
+
mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
|
|
11136
11667
|
/**
|
|
11137
11668
|
* The resolution of the media.
|
|
11138
11669
|
*/
|
|
@@ -11204,21 +11735,16 @@ export declare enum VideoGenerationReferenceType {
|
|
|
11204
11735
|
STYLE = "STYLE"
|
|
11205
11736
|
}
|
|
11206
11737
|
|
|
11207
|
-
/**
|
|
11738
|
+
/** Provides metadata for a video, including the start and end offsets for clipping and the frame rate. */
|
|
11208
11739
|
export declare interface VideoMetadata {
|
|
11209
11740
|
/** Optional. The end offset of the video. */
|
|
11210
11741
|
endOffset?: string;
|
|
11211
|
-
/** Optional. The frame rate of the video sent to the model. If not specified, the default value
|
|
11742
|
+
/** 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]. */
|
|
11212
11743
|
fps?: number;
|
|
11213
11744
|
/** Optional. The start offset of the video. */
|
|
11214
11745
|
startOffset?: string;
|
|
11215
11746
|
}
|
|
11216
11747
|
|
|
11217
|
-
/**
|
|
11218
|
-
* The mime type of the video.
|
|
11219
|
-
*/
|
|
11220
|
-
declare type VideoMimeType = 'video/mp4' | 'video/mpeg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/mpg' | 'video/webm' | 'video/wmv' | 'video/3gpp' | (string & {});
|
|
11221
|
-
|
|
11222
11748
|
/** Voice activity signal. */
|
|
11223
11749
|
export declare interface VoiceActivity {
|
|
11224
11750
|
/** The type of the voice activity signal. */
|
|
@@ -11249,10 +11775,16 @@ export declare enum VoiceActivityType {
|
|
|
11249
11775
|
export declare interface VoiceConfig {
|
|
11250
11776
|
/** If true, the model will use a replicated voice for the response. */
|
|
11251
11777
|
replicatedVoiceConfig?: ReplicatedVoiceConfig;
|
|
11252
|
-
/** The configuration for
|
|
11778
|
+
/** The configuration for a prebuilt voice. */
|
|
11253
11779
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
11254
11780
|
}
|
|
11255
11781
|
|
|
11782
|
+
/** Standard web search for grounding and related configurations.
|
|
11783
|
+
|
|
11784
|
+
Only text results are returned. */
|
|
11785
|
+
export declare interface WebSearch {
|
|
11786
|
+
}
|
|
11787
|
+
|
|
11256
11788
|
declare interface WebSocket_2 {
|
|
11257
11789
|
/**
|
|
11258
11790
|
* Connects the socket to the server.
|