@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/web/web.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
|
|
|
@@ -5043,11 +5247,11 @@ export declare interface GoogleGenAIOptions {
|
|
|
5043
5247
|
httpOptions?: HttpOptions;
|
|
5044
5248
|
}
|
|
5045
5249
|
|
|
5046
|
-
/** Tool to retrieve
|
|
5250
|
+
/** Tool to retrieve knowledge from Google Maps. */
|
|
5047
5251
|
export declare interface GoogleMaps {
|
|
5048
5252
|
/** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
|
|
5049
5253
|
authConfig?: AuthConfig;
|
|
5050
|
-
/** Optional.
|
|
5254
|
+
/** 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. */
|
|
5051
5255
|
enableWidget?: boolean;
|
|
5052
5256
|
}
|
|
5053
5257
|
|
|
@@ -5061,12 +5265,14 @@ export declare interface GoogleRpcStatus {
|
|
|
5061
5265
|
message?: string;
|
|
5062
5266
|
}
|
|
5063
5267
|
|
|
5064
|
-
/**
|
|
5268
|
+
/** Tool to support web search. */
|
|
5065
5269
|
export declare interface GoogleSearch {
|
|
5066
|
-
/**
|
|
5067
|
-
|
|
5270
|
+
/** Different types of search that can be enabled on the GoogleSearch tool. */
|
|
5271
|
+
searchTypes?: SearchTypes;
|
|
5068
5272
|
/** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API. */
|
|
5069
5273
|
blockingConfidence?: PhishBlockThreshold;
|
|
5274
|
+
/** 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. */
|
|
5275
|
+
excludeDomains?: string[];
|
|
5070
5276
|
/** 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. */
|
|
5071
5277
|
timeRangeFilter?: Interval;
|
|
5072
5278
|
}
|
|
@@ -5085,15 +5291,23 @@ declare interface GoogleSearchCallArguments {
|
|
|
5085
5291
|
* Google Search content.
|
|
5086
5292
|
*/
|
|
5087
5293
|
declare interface GoogleSearchCallContent {
|
|
5088
|
-
type: 'google_search_call';
|
|
5089
5294
|
/**
|
|
5090
5295
|
* A unique ID for this specific tool call.
|
|
5091
5296
|
*/
|
|
5092
|
-
id
|
|
5297
|
+
id: string;
|
|
5093
5298
|
/**
|
|
5094
5299
|
* The arguments to pass to Google Search.
|
|
5095
5300
|
*/
|
|
5096
|
-
arguments
|
|
5301
|
+
arguments: GoogleSearchCallArguments;
|
|
5302
|
+
type: 'google_search_call';
|
|
5303
|
+
/**
|
|
5304
|
+
* The type of search grounding enabled.
|
|
5305
|
+
*/
|
|
5306
|
+
search_type?: 'web_search' | 'image_search';
|
|
5307
|
+
/**
|
|
5308
|
+
* A signature hash for backend validation.
|
|
5309
|
+
*/
|
|
5310
|
+
signature?: string;
|
|
5097
5311
|
}
|
|
5098
5312
|
|
|
5099
5313
|
/**
|
|
@@ -5118,21 +5332,21 @@ declare interface GoogleSearchResult {
|
|
|
5118
5332
|
* Google Search result content.
|
|
5119
5333
|
*/
|
|
5120
5334
|
declare interface GoogleSearchResultContent {
|
|
5121
|
-
type: 'google_search_result';
|
|
5122
5335
|
/**
|
|
5123
5336
|
* ID to match the ID from the google search call block.
|
|
5124
5337
|
*/
|
|
5125
|
-
call_id
|
|
5338
|
+
call_id: string;
|
|
5126
5339
|
/**
|
|
5127
|
-
*
|
|
5340
|
+
* The results of the Google Search.
|
|
5128
5341
|
*/
|
|
5129
|
-
|
|
5342
|
+
result: Array<GoogleSearchResult>;
|
|
5343
|
+
type: 'google_search_result';
|
|
5130
5344
|
/**
|
|
5131
|
-
*
|
|
5345
|
+
* Whether the Google Search resulted in an error.
|
|
5132
5346
|
*/
|
|
5133
|
-
|
|
5347
|
+
is_error?: boolean;
|
|
5134
5348
|
/**
|
|
5135
|
-
*
|
|
5349
|
+
* A signature hash for backend validation.
|
|
5136
5350
|
*/
|
|
5137
5351
|
signature?: string;
|
|
5138
5352
|
}
|
|
@@ -5153,39 +5367,80 @@ export declare interface GoogleTypeDate {
|
|
|
5153
5367
|
year?: number;
|
|
5154
5368
|
}
|
|
5155
5369
|
|
|
5156
|
-
/**
|
|
5370
|
+
/** A piece of evidence that supports a claim made by the model.
|
|
5371
|
+
|
|
5372
|
+
This is used to show a citation for a claim made by the model. When grounding
|
|
5373
|
+
is enabled, the model returns a `GroundingChunk` that contains a reference to
|
|
5374
|
+
the source of the information. */
|
|
5157
5375
|
export declare interface GroundingChunk {
|
|
5158
|
-
/**
|
|
5376
|
+
/** A grounding chunk from an image search result. See the `Image`
|
|
5377
|
+
message for details.
|
|
5378
|
+
*/
|
|
5379
|
+
image?: GroundingChunkImage;
|
|
5380
|
+
/** A `Maps` chunk is a piece of evidence that comes from Google Maps.
|
|
5381
|
+
|
|
5382
|
+
It contains information about a place, such as its name, address, and
|
|
5383
|
+
reviews. This is used to provide the user with rich, location-based
|
|
5384
|
+
information. */
|
|
5159
5385
|
maps?: GroundingChunkMaps;
|
|
5160
|
-
/**
|
|
5386
|
+
/** 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. */
|
|
5161
5387
|
retrievedContext?: GroundingChunkRetrievedContext;
|
|
5162
|
-
/**
|
|
5388
|
+
/** A grounding chunk from a web page, typically from Google Search. See the `Web` message for details. */
|
|
5163
5389
|
web?: GroundingChunkWeb;
|
|
5164
5390
|
}
|
|
5165
5391
|
|
|
5166
|
-
/**
|
|
5392
|
+
/** A piece of evidence that comes from an image search result.
|
|
5393
|
+
|
|
5394
|
+
It contains the URI of the image search result and the URI of the image.
|
|
5395
|
+
This is used to provide the user with a link to the source of the
|
|
5396
|
+
information. */
|
|
5397
|
+
export declare interface GroundingChunkImage {
|
|
5398
|
+
/** The URI of the image search result page. */
|
|
5399
|
+
sourceUri?: string;
|
|
5400
|
+
/** The URI of the image. */
|
|
5401
|
+
imageUri?: string;
|
|
5402
|
+
/** The title of the image search result page. */
|
|
5403
|
+
title?: string;
|
|
5404
|
+
/** The domain of the image search result page. */
|
|
5405
|
+
domain?: string;
|
|
5406
|
+
}
|
|
5407
|
+
|
|
5408
|
+
/** A `Maps` chunk is a piece of evidence that comes from Google Maps.
|
|
5409
|
+
|
|
5410
|
+
It contains information about a place, such as its name, address, and reviews.
|
|
5411
|
+
This is used to provide the user with rich, location-based information. */
|
|
5167
5412
|
export declare interface GroundingChunkMaps {
|
|
5168
|
-
/**
|
|
5413
|
+
/** The sources that were used to generate the place answer.
|
|
5414
|
+
|
|
5415
|
+
This includes review snippets and photos that were used to generate the
|
|
5416
|
+
answer, as well as URIs to flag content. */
|
|
5169
5417
|
placeAnswerSources?: GroundingChunkMapsPlaceAnswerSources;
|
|
5170
|
-
/** This Place's resource name, in `places/{place_id}` format.
|
|
5418
|
+
/** This Place's resource name, in `places/{place_id}` format.
|
|
5419
|
+
|
|
5420
|
+
This can be used to look up the place in the Google Maps API. */
|
|
5171
5421
|
placeId?: string;
|
|
5172
|
-
/**
|
|
5422
|
+
/** The text of the place answer. */
|
|
5173
5423
|
text?: string;
|
|
5174
|
-
/**
|
|
5424
|
+
/** The title of the place. */
|
|
5175
5425
|
title?: string;
|
|
5176
|
-
/** URI
|
|
5426
|
+
/** The URI of the place. */
|
|
5177
5427
|
uri?: string;
|
|
5178
5428
|
}
|
|
5179
5429
|
|
|
5180
|
-
/**
|
|
5430
|
+
/** The sources that were used to generate the place answer.
|
|
5431
|
+
|
|
5432
|
+
This includes review snippets and photos that were used to generate the
|
|
5433
|
+
answer, as well as URIs to flag content. */
|
|
5181
5434
|
export declare interface GroundingChunkMapsPlaceAnswerSources {
|
|
5435
|
+
/** Snippets of reviews that were used to generate the answer. */
|
|
5436
|
+
reviewSnippet?: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet[];
|
|
5182
5437
|
/** A link where users can flag a problem with the generated answer. */
|
|
5183
5438
|
flagContentUri?: string;
|
|
5184
|
-
/** Snippets of reviews that
|
|
5439
|
+
/** Snippets of reviews that were used to generate the answer. */
|
|
5185
5440
|
reviewSnippets?: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet[];
|
|
5186
5441
|
}
|
|
5187
5442
|
|
|
5188
|
-
/** Author attribution for a photo or review.
|
|
5443
|
+
/** Author attribution for a photo or review. */
|
|
5189
5444
|
export declare interface GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution {
|
|
5190
5445
|
/** Name of the author of the Photo or Review. */
|
|
5191
5446
|
displayName?: string;
|
|
@@ -5195,7 +5450,7 @@ export declare interface GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution {
|
|
|
5195
5450
|
uri?: string;
|
|
5196
5451
|
}
|
|
5197
5452
|
|
|
5198
|
-
/** Encapsulates a review snippet.
|
|
5453
|
+
/** Encapsulates a review snippet. */
|
|
5199
5454
|
export declare interface GroundingChunkMapsPlaceAnswerSourcesReviewSnippet {
|
|
5200
5455
|
/** This review's author. */
|
|
5201
5456
|
authorAttribution?: GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution;
|
|
@@ -5213,69 +5468,84 @@ export declare interface GroundingChunkMapsPlaceAnswerSourcesReviewSnippet {
|
|
|
5213
5468
|
title?: string;
|
|
5214
5469
|
}
|
|
5215
5470
|
|
|
5216
|
-
/**
|
|
5471
|
+
/** 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. */
|
|
5217
5472
|
export declare interface GroundingChunkRetrievedContext {
|
|
5218
|
-
/** Output only. The full
|
|
5473
|
+
/** 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}`. */
|
|
5219
5474
|
documentName?: string;
|
|
5220
|
-
/** Additional context for
|
|
5475
|
+
/** Additional context for a Retrieval-Augmented Generation (RAG) retrieval result. This is populated only when the RAG retrieval tool is used. */
|
|
5221
5476
|
ragChunk?: RagChunk;
|
|
5222
|
-
/**
|
|
5477
|
+
/** The content of the retrieved data source. */
|
|
5223
5478
|
text?: string;
|
|
5224
|
-
/**
|
|
5479
|
+
/** The title of the retrieved data source. */
|
|
5225
5480
|
title?: string;
|
|
5226
|
-
/** URI
|
|
5481
|
+
/** The URI of the retrieved data source. */
|
|
5227
5482
|
uri?: string;
|
|
5228
5483
|
}
|
|
5229
5484
|
|
|
5230
|
-
/**
|
|
5485
|
+
/** 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. */
|
|
5231
5486
|
export declare interface GroundingChunkWeb {
|
|
5232
|
-
/**
|
|
5487
|
+
/** 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. */
|
|
5233
5488
|
domain?: string;
|
|
5234
|
-
/**
|
|
5489
|
+
/** The title of the web page that contains the evidence. */
|
|
5235
5490
|
title?: string;
|
|
5236
|
-
/** URI
|
|
5491
|
+
/** The URI of the web page that contains the evidence. */
|
|
5237
5492
|
uri?: string;
|
|
5238
5493
|
}
|
|
5239
5494
|
|
|
5240
|
-
/**
|
|
5495
|
+
/** Information for various kinds of grounding. */
|
|
5241
5496
|
export declare interface GroundingMetadata {
|
|
5242
|
-
/** Optional.
|
|
5243
|
-
|
|
5244
|
-
|
|
5497
|
+
/** Optional. The image search queries that were used to generate the
|
|
5498
|
+
content. This field is populated only when the grounding source is Google
|
|
5499
|
+
Search with the Image Search search_type enabled.
|
|
5500
|
+
*/
|
|
5501
|
+
imageSearchQueries?: string[];
|
|
5502
|
+
/** A list of supporting references retrieved from the grounding
|
|
5503
|
+
source. This field is populated when the grounding source is Google
|
|
5504
|
+
Search, Vertex AI Search, or Google Maps.
|
|
5505
|
+
*/
|
|
5245
5506
|
groundingChunks?: GroundingChunk[];
|
|
5246
|
-
/**
|
|
5507
|
+
/** List of grounding support. */
|
|
5247
5508
|
groundingSupports?: GroundingSupport[];
|
|
5248
|
-
/**
|
|
5509
|
+
/** Metadata related to retrieval in the grounding flow. */
|
|
5249
5510
|
retrievalMetadata?: RetrievalMetadata;
|
|
5250
|
-
/** Optional.
|
|
5251
|
-
|
|
5252
|
-
/** Optional. Google search entry for the following-up web searches. */
|
|
5511
|
+
/** Optional. Google search entry for the following-up web
|
|
5512
|
+
searches. */
|
|
5253
5513
|
searchEntryPoint?: SearchEntryPoint;
|
|
5254
|
-
/**
|
|
5255
|
-
sourceFlaggingUris?: GroundingMetadataSourceFlaggingUri[];
|
|
5256
|
-
/** Optional. Web search queries for the following-up web search. */
|
|
5514
|
+
/** Web search queries for the following-up web search. */
|
|
5257
5515
|
webSearchQueries?: string[];
|
|
5516
|
+
/** 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. */
|
|
5517
|
+
googleMapsWidgetContextToken?: string;
|
|
5518
|
+
/** 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. */
|
|
5519
|
+
retrievalQueries?: string[];
|
|
5520
|
+
/** 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. */
|
|
5521
|
+
sourceFlaggingUris?: GroundingMetadataSourceFlaggingUri[];
|
|
5258
5522
|
}
|
|
5259
5523
|
|
|
5260
|
-
/**
|
|
5524
|
+
/** 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. */
|
|
5261
5525
|
export declare interface GroundingMetadataSourceFlaggingUri {
|
|
5262
|
-
/**
|
|
5526
|
+
/** The URI that can be used to flag the content. */
|
|
5263
5527
|
flagContentUri?: string;
|
|
5264
|
-
/**
|
|
5528
|
+
/** The ID of the place or review. */
|
|
5265
5529
|
sourceId?: string;
|
|
5266
5530
|
}
|
|
5267
5531
|
|
|
5268
5532
|
/** Grounding support. */
|
|
5269
5533
|
export declare interface GroundingSupport {
|
|
5270
|
-
/** Confidence score of the support references.
|
|
5534
|
+
/** Confidence score of the support references.
|
|
5535
|
+
|
|
5536
|
+
Ranges from 0 to 1. 1 is the most confident. This list must have the
|
|
5537
|
+
same size as the grounding_chunk_indices. */
|
|
5271
5538
|
confidenceScores?: number[];
|
|
5272
|
-
/** A list of indices (into 'grounding_chunk') specifying the
|
|
5539
|
+
/** A list of indices (into 'grounding_chunk') specifying the
|
|
5540
|
+
citations associated with the claim. For instance [1,3,4] means that
|
|
5541
|
+
grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the
|
|
5542
|
+
retrieved content attributed to the claim. */
|
|
5273
5543
|
groundingChunkIndices?: number[];
|
|
5274
5544
|
/** Segment of the content this support belongs to. */
|
|
5275
5545
|
segment?: Segment;
|
|
5276
5546
|
}
|
|
5277
5547
|
|
|
5278
|
-
/**
|
|
5548
|
+
/** 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. */
|
|
5279
5549
|
export declare enum HarmBlockMethod {
|
|
5280
5550
|
/**
|
|
5281
5551
|
* The harm block method is unspecified.
|
|
@@ -5291,54 +5561,54 @@ export declare enum HarmBlockMethod {
|
|
|
5291
5561
|
PROBABILITY = "PROBABILITY"
|
|
5292
5562
|
}
|
|
5293
5563
|
|
|
5294
|
-
/** The harm
|
|
5564
|
+
/** The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
|
|
5295
5565
|
export declare enum HarmBlockThreshold {
|
|
5296
5566
|
/**
|
|
5297
|
-
*
|
|
5567
|
+
* The harm block threshold is unspecified.
|
|
5298
5568
|
*/
|
|
5299
5569
|
HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
|
|
5300
5570
|
/**
|
|
5301
|
-
* Block
|
|
5571
|
+
* Block content with a low harm probability or higher.
|
|
5302
5572
|
*/
|
|
5303
5573
|
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
|
|
5304
5574
|
/**
|
|
5305
|
-
* Block medium
|
|
5575
|
+
* Block content with a medium harm probability or higher.
|
|
5306
5576
|
*/
|
|
5307
5577
|
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
|
|
5308
5578
|
/**
|
|
5309
|
-
* Block
|
|
5579
|
+
* Block content with a high harm probability.
|
|
5310
5580
|
*/
|
|
5311
5581
|
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
|
|
5312
5582
|
/**
|
|
5313
|
-
*
|
|
5583
|
+
* Do not block any content, regardless of its harm probability.
|
|
5314
5584
|
*/
|
|
5315
5585
|
BLOCK_NONE = "BLOCK_NONE",
|
|
5316
5586
|
/**
|
|
5317
|
-
* Turn off the safety filter.
|
|
5587
|
+
* Turn off the safety filter entirely.
|
|
5318
5588
|
*/
|
|
5319
5589
|
OFF = "OFF"
|
|
5320
5590
|
}
|
|
5321
5591
|
|
|
5322
|
-
/**
|
|
5592
|
+
/** The harm category to be blocked. */
|
|
5323
5593
|
export declare enum HarmCategory {
|
|
5324
5594
|
/**
|
|
5325
|
-
*
|
|
5595
|
+
* Default value. This value is unused.
|
|
5326
5596
|
*/
|
|
5327
5597
|
HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED",
|
|
5328
5598
|
/**
|
|
5329
|
-
*
|
|
5599
|
+
* Abusive, threatening, or content intended to bully, torment, or ridicule.
|
|
5330
5600
|
*/
|
|
5331
5601
|
HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT",
|
|
5332
5602
|
/**
|
|
5333
|
-
*
|
|
5603
|
+
* Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
|
|
5334
5604
|
*/
|
|
5335
5605
|
HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
|
|
5336
5606
|
/**
|
|
5337
|
-
*
|
|
5607
|
+
* Content that contains sexually explicit material.
|
|
5338
5608
|
*/
|
|
5339
5609
|
HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
|
5340
5610
|
/**
|
|
5341
|
-
*
|
|
5611
|
+
* Content that promotes, facilitates, or enables dangerous activities.
|
|
5342
5612
|
*/
|
|
5343
5613
|
HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
|
|
5344
5614
|
/**
|
|
@@ -5346,71 +5616,71 @@ export declare enum HarmCategory {
|
|
|
5346
5616
|
*/
|
|
5347
5617
|
HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY",
|
|
5348
5618
|
/**
|
|
5349
|
-
*
|
|
5619
|
+
* Images that contain hate speech. This enum value is not supported in Gemini API.
|
|
5350
5620
|
*/
|
|
5351
5621
|
HARM_CATEGORY_IMAGE_HATE = "HARM_CATEGORY_IMAGE_HATE",
|
|
5352
5622
|
/**
|
|
5353
|
-
*
|
|
5623
|
+
* Images that contain dangerous content. This enum value is not supported in Gemini API.
|
|
5354
5624
|
*/
|
|
5355
5625
|
HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT",
|
|
5356
5626
|
/**
|
|
5357
|
-
*
|
|
5627
|
+
* Images that contain harassment. This enum value is not supported in Gemini API.
|
|
5358
5628
|
*/
|
|
5359
5629
|
HARM_CATEGORY_IMAGE_HARASSMENT = "HARM_CATEGORY_IMAGE_HARASSMENT",
|
|
5360
5630
|
/**
|
|
5361
|
-
*
|
|
5631
|
+
* Images that contain sexually explicit content. This enum value is not supported in Gemini API.
|
|
5362
5632
|
*/
|
|
5363
5633
|
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT",
|
|
5364
5634
|
/**
|
|
5365
|
-
*
|
|
5635
|
+
* Prompts designed to bypass safety filters. This enum value is not supported in Gemini API.
|
|
5366
5636
|
*/
|
|
5367
5637
|
HARM_CATEGORY_JAILBREAK = "HARM_CATEGORY_JAILBREAK"
|
|
5368
5638
|
}
|
|
5369
5639
|
|
|
5370
|
-
/** Output only.
|
|
5640
|
+
/** Output only. The probability of harm for this category. */
|
|
5371
5641
|
export declare enum HarmProbability {
|
|
5372
5642
|
/**
|
|
5373
|
-
*
|
|
5643
|
+
* The harm probability is unspecified.
|
|
5374
5644
|
*/
|
|
5375
5645
|
HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED",
|
|
5376
5646
|
/**
|
|
5377
|
-
*
|
|
5647
|
+
* The harm probability is negligible.
|
|
5378
5648
|
*/
|
|
5379
5649
|
NEGLIGIBLE = "NEGLIGIBLE",
|
|
5380
5650
|
/**
|
|
5381
|
-
*
|
|
5651
|
+
* The harm probability is low.
|
|
5382
5652
|
*/
|
|
5383
5653
|
LOW = "LOW",
|
|
5384
5654
|
/**
|
|
5385
|
-
*
|
|
5655
|
+
* The harm probability is medium.
|
|
5386
5656
|
*/
|
|
5387
5657
|
MEDIUM = "MEDIUM",
|
|
5388
5658
|
/**
|
|
5389
|
-
*
|
|
5659
|
+
* The harm probability is high.
|
|
5390
5660
|
*/
|
|
5391
5661
|
HIGH = "HIGH"
|
|
5392
5662
|
}
|
|
5393
5663
|
|
|
5394
|
-
/** Output only.
|
|
5664
|
+
/** Output only. The severity of harm for this category. This enum is not supported in Gemini API. */
|
|
5395
5665
|
export declare enum HarmSeverity {
|
|
5396
5666
|
/**
|
|
5397
|
-
*
|
|
5667
|
+
* The harm severity is unspecified.
|
|
5398
5668
|
*/
|
|
5399
5669
|
HARM_SEVERITY_UNSPECIFIED = "HARM_SEVERITY_UNSPECIFIED",
|
|
5400
5670
|
/**
|
|
5401
|
-
*
|
|
5671
|
+
* The harm severity is negligible.
|
|
5402
5672
|
*/
|
|
5403
5673
|
HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE",
|
|
5404
5674
|
/**
|
|
5405
|
-
*
|
|
5675
|
+
* The harm severity is low.
|
|
5406
5676
|
*/
|
|
5407
5677
|
HARM_SEVERITY_LOW = "HARM_SEVERITY_LOW",
|
|
5408
5678
|
/**
|
|
5409
|
-
*
|
|
5679
|
+
* The harm severity is medium.
|
|
5410
5680
|
*/
|
|
5411
5681
|
HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM",
|
|
5412
5682
|
/**
|
|
5413
|
-
*
|
|
5683
|
+
* The harm severity is high.
|
|
5414
5684
|
*/
|
|
5415
5685
|
HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH"
|
|
5416
5686
|
}
|
|
@@ -5566,20 +5836,36 @@ export declare interface ImageConfig {
|
|
|
5566
5836
|
/** Controls the generation of people. Supported values are:
|
|
5567
5837
|
ALLOW_ALL, ALLOW_ADULT, ALLOW_NONE. */
|
|
5568
5838
|
personGeneration?: string;
|
|
5839
|
+
/** Controls whether prominent people (celebrities)
|
|
5840
|
+
generation is allowed. If used with personGeneration, personGeneration
|
|
5841
|
+
enum would take precedence. For instance, if ALLOW_NONE is set, all person
|
|
5842
|
+
generation would be blocked. If this field is unspecified, the default
|
|
5843
|
+
behavior is to allow prominent people. */
|
|
5844
|
+
prominentPeople?: ProminentPeople;
|
|
5569
5845
|
/** MIME type of the generated image. This field is not
|
|
5570
5846
|
supported in Gemini API. */
|
|
5571
5847
|
outputMimeType?: string;
|
|
5572
5848
|
/** Compression quality of the generated image (for
|
|
5573
5849
|
``image/jpeg`` only). This field is not supported in Gemini API. */
|
|
5574
5850
|
outputCompressionQuality?: number;
|
|
5851
|
+
/** Optional. The image output format for generated images. */
|
|
5852
|
+
imageOutputOptions?: ImageConfigImageOutputOptions;
|
|
5575
5853
|
}
|
|
5576
5854
|
|
|
5577
5855
|
/**
|
|
5578
5856
|
* The configuration for image interaction.
|
|
5579
5857
|
*/
|
|
5580
5858
|
declare interface ImageConfig_2 {
|
|
5581
|
-
aspect_ratio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9';
|
|
5582
|
-
image_size?: '1K' | '2K' | '4K';
|
|
5859
|
+
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';
|
|
5860
|
+
image_size?: '1K' | '2K' | '4K' | '512';
|
|
5861
|
+
}
|
|
5862
|
+
|
|
5863
|
+
/** The image output format for generated images. This data type is not supported in Gemini API. */
|
|
5864
|
+
export declare interface ImageConfigImageOutputOptions {
|
|
5865
|
+
/** Optional. The compression quality of the output image. */
|
|
5866
|
+
compressionQuality?: number;
|
|
5867
|
+
/** Optional. The image format that the output should be saved as. */
|
|
5868
|
+
mimeType?: string;
|
|
5583
5869
|
}
|
|
5584
5870
|
|
|
5585
5871
|
/**
|
|
@@ -5594,7 +5880,7 @@ declare interface ImageContent {
|
|
|
5594
5880
|
/**
|
|
5595
5881
|
* The mime type of the image.
|
|
5596
5882
|
*/
|
|
5597
|
-
mime_type?:
|
|
5883
|
+
mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif';
|
|
5598
5884
|
/**
|
|
5599
5885
|
* The resolution of the media.
|
|
5600
5886
|
*/
|
|
@@ -5605,11 +5891,6 @@ declare interface ImageContent {
|
|
|
5605
5891
|
uri?: string;
|
|
5606
5892
|
}
|
|
5607
5893
|
|
|
5608
|
-
/**
|
|
5609
|
-
* The mime type of the image.
|
|
5610
|
-
*/
|
|
5611
|
-
declare type ImageMimeType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif' | (string & {});
|
|
5612
|
-
|
|
5613
5894
|
/** Enum that specifies the language of the text in the prompt. */
|
|
5614
5895
|
export declare enum ImagePromptLanguage {
|
|
5615
5896
|
/**
|
|
@@ -5646,6 +5927,10 @@ export declare enum ImagePromptLanguage {
|
|
|
5646
5927
|
es = "es"
|
|
5647
5928
|
}
|
|
5648
5929
|
|
|
5930
|
+
/** Image search for grounding and related configurations. */
|
|
5931
|
+
export declare interface ImageSearch {
|
|
5932
|
+
}
|
|
5933
|
+
|
|
5649
5934
|
/** Optional parameters for importing a file. */
|
|
5650
5935
|
export declare interface ImportFileConfig {
|
|
5651
5936
|
/** Used to override HTTP request options. */
|
|
@@ -5749,19 +6034,32 @@ declare interface Interaction {
|
|
|
5749
6034
|
* Output only. A unique identifier for the interaction completion.
|
|
5750
6035
|
*/
|
|
5751
6036
|
id: string;
|
|
6037
|
+
/**
|
|
6038
|
+
* Output only. The time at which the response was created in ISO 8601 format
|
|
6039
|
+
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6040
|
+
*/
|
|
6041
|
+
created: string;
|
|
5752
6042
|
/**
|
|
5753
6043
|
* Output only. The status of the interaction.
|
|
5754
6044
|
*/
|
|
5755
6045
|
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
6046
|
+
/**
|
|
6047
|
+
* Output only. The time at which the response was last updated in ISO 8601 format
|
|
6048
|
+
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6049
|
+
*/
|
|
6050
|
+
updated: string;
|
|
5756
6051
|
/**
|
|
5757
6052
|
* The name of the `Agent` used for generating the interaction.
|
|
5758
6053
|
*/
|
|
5759
6054
|
agent?: (string & {}) | 'deep-research-pro-preview-12-2025';
|
|
5760
6055
|
/**
|
|
5761
|
-
*
|
|
5762
|
-
|
|
6056
|
+
* Configuration for the agent.
|
|
6057
|
+
*/
|
|
6058
|
+
agent_config?: DynamicAgentConfig | DeepResearchAgentConfig;
|
|
6059
|
+
/**
|
|
6060
|
+
* The inputs for the interaction.
|
|
5763
6061
|
*/
|
|
5764
|
-
|
|
6062
|
+
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;
|
|
5765
6063
|
/**
|
|
5766
6064
|
* The name of the `Model` used for generating the interaction.
|
|
5767
6065
|
*/
|
|
@@ -5774,15 +6072,31 @@ declare interface Interaction {
|
|
|
5774
6072
|
* The ID of the previous interaction, if any.
|
|
5775
6073
|
*/
|
|
5776
6074
|
previous_interaction_id?: string;
|
|
6075
|
+
/**
|
|
6076
|
+
* Enforces that the generated response is a JSON object that complies with
|
|
6077
|
+
* the JSON schema specified in this field.
|
|
6078
|
+
*/
|
|
6079
|
+
response_format?: unknown;
|
|
6080
|
+
/**
|
|
6081
|
+
* The mime type of the response. This is required if response_format is set.
|
|
6082
|
+
*/
|
|
6083
|
+
response_mime_type?: string;
|
|
6084
|
+
/**
|
|
6085
|
+
* The requested modalities of the response (TEXT, IMAGE, AUDIO).
|
|
6086
|
+
*/
|
|
6087
|
+
response_modalities?: Array<'text' | 'image' | 'audio'>;
|
|
5777
6088
|
/**
|
|
5778
6089
|
* Output only. The role of the interaction.
|
|
5779
6090
|
*/
|
|
5780
6091
|
role?: string;
|
|
5781
6092
|
/**
|
|
5782
|
-
*
|
|
5783
|
-
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6093
|
+
* System instruction for the interaction.
|
|
5784
6094
|
*/
|
|
5785
|
-
|
|
6095
|
+
system_instruction?: string;
|
|
6096
|
+
/**
|
|
6097
|
+
* A list of tool declarations the model may call during interaction.
|
|
6098
|
+
*/
|
|
6099
|
+
tools?: Array<Tool_2>;
|
|
5786
6100
|
/**
|
|
5787
6101
|
* Output only. Statistics on the interaction request's token usage.
|
|
5788
6102
|
*/
|
|
@@ -5799,13 +6113,14 @@ declare interface InteractionCancelParams {
|
|
|
5799
6113
|
declare interface InteractionCompleteEvent {
|
|
5800
6114
|
event_type: 'interaction.complete';
|
|
5801
6115
|
/**
|
|
5802
|
-
* The
|
|
6116
|
+
* The completed interaction with empty outputs to reduce the payload size.
|
|
6117
|
+
* Use the preceding ContentDelta events for the actual output.
|
|
5803
6118
|
*/
|
|
5804
|
-
|
|
6119
|
+
interaction: Interaction;
|
|
5805
6120
|
/**
|
|
5806
|
-
* The
|
|
6121
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
5807
6122
|
*/
|
|
5808
|
-
|
|
6123
|
+
event_id?: string;
|
|
5809
6124
|
}
|
|
5810
6125
|
|
|
5811
6126
|
declare type InteractionCreateParams = CreateModelInteractionParamsNonStreaming | CreateModelInteractionParamsStreaming | CreateAgentInteractionParamsNonStreaming | CreateAgentInteractionParamsStreaming;
|
|
@@ -5863,7 +6178,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
5863
6178
|
}
|
|
5864
6179
|
|
|
5865
6180
|
export declare namespace Interactions {
|
|
5866
|
-
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type
|
|
6181
|
+
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, };
|
|
5867
6182
|
}
|
|
5868
6183
|
|
|
5869
6184
|
declare namespace InteractionsAPI {
|
|
@@ -5873,7 +6188,6 @@ declare namespace InteractionsAPI {
|
|
|
5873
6188
|
AllowedTools,
|
|
5874
6189
|
Annotation,
|
|
5875
6190
|
AudioContent,
|
|
5876
|
-
AudioMimeType,
|
|
5877
6191
|
CodeExecutionCallArguments,
|
|
5878
6192
|
CodeExecutionCallContent,
|
|
5879
6193
|
CodeExecutionResultContent,
|
|
@@ -5883,7 +6197,6 @@ declare namespace InteractionsAPI {
|
|
|
5883
6197
|
ContentStop,
|
|
5884
6198
|
DeepResearchAgentConfig,
|
|
5885
6199
|
DocumentContent,
|
|
5886
|
-
DocumentMimeType,
|
|
5887
6200
|
DynamicAgentConfig,
|
|
5888
6201
|
ErrorEvent_2 as ErrorEvent,
|
|
5889
6202
|
FileSearchCallContent,
|
|
@@ -5898,7 +6211,6 @@ declare namespace InteractionsAPI {
|
|
|
5898
6211
|
GoogleSearchResultContent,
|
|
5899
6212
|
ImageConfig_2 as ImageConfig,
|
|
5900
6213
|
ImageContent,
|
|
5901
|
-
ImageMimeType,
|
|
5902
6214
|
Interaction,
|
|
5903
6215
|
InteractionCompleteEvent,
|
|
5904
6216
|
InteractionSSEEvent,
|
|
@@ -5912,7 +6224,6 @@ declare namespace InteractionsAPI {
|
|
|
5912
6224
|
ThinkingLevel_2 as ThinkingLevel,
|
|
5913
6225
|
ThoughtContent,
|
|
5914
6226
|
Tool_2 as Tool,
|
|
5915
|
-
ToolChoice,
|
|
5916
6227
|
ToolChoiceConfig,
|
|
5917
6228
|
ToolChoiceType,
|
|
5918
6229
|
Turn,
|
|
@@ -5922,7 +6233,6 @@ declare namespace InteractionsAPI {
|
|
|
5922
6233
|
URLContextResultContent,
|
|
5923
6234
|
Usage,
|
|
5924
6235
|
VideoContent,
|
|
5925
|
-
VideoMimeType,
|
|
5926
6236
|
InteractionDeleteResponse,
|
|
5927
6237
|
InteractionCreateParams,
|
|
5928
6238
|
BaseCreateModelInteractionParams,
|
|
@@ -5945,23 +6255,23 @@ declare type InteractionSSEEvent = InteractionStartEvent | InteractionCompleteEv
|
|
|
5945
6255
|
declare interface InteractionStartEvent {
|
|
5946
6256
|
event_type: 'interaction.start';
|
|
5947
6257
|
/**
|
|
5948
|
-
* The
|
|
6258
|
+
* The Interaction resource.
|
|
5949
6259
|
*/
|
|
5950
|
-
|
|
6260
|
+
interaction: Interaction;
|
|
5951
6261
|
/**
|
|
5952
|
-
* The
|
|
6262
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
5953
6263
|
*/
|
|
5954
|
-
|
|
6264
|
+
event_id?: string;
|
|
5955
6265
|
}
|
|
5956
6266
|
|
|
5957
6267
|
declare interface InteractionStatusUpdate {
|
|
5958
6268
|
event_type: 'interaction.status_update';
|
|
6269
|
+
interaction_id: string;
|
|
6270
|
+
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
5959
6271
|
/**
|
|
5960
6272
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
5961
6273
|
*/
|
|
5962
6274
|
event_id?: string;
|
|
5963
|
-
interaction_id?: string;
|
|
5964
|
-
status?: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
5965
6275
|
}
|
|
5966
6276
|
|
|
5967
6277
|
/** Parameters for the private _Register method. */
|
|
@@ -6275,9 +6585,9 @@ export declare interface ListTuningJobsParameters {
|
|
|
6275
6585
|
export declare class ListTuningJobsResponse {
|
|
6276
6586
|
/** Used to retain the full HTTP response. */
|
|
6277
6587
|
sdkHttpResponse?: HttpResponse;
|
|
6278
|
-
/** A token to retrieve the next page of results. Pass
|
|
6588
|
+
/** 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. */
|
|
6279
6589
|
nextPageToken?: string;
|
|
6280
|
-
/**
|
|
6590
|
+
/** The tuning jobs that match the request. */
|
|
6281
6591
|
tuningJobs?: TuningJob[];
|
|
6282
6592
|
}
|
|
6283
6593
|
|
|
@@ -7063,27 +7373,27 @@ declare type Logger = {
|
|
|
7063
7373
|
|
|
7064
7374
|
declare type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug';
|
|
7065
7375
|
|
|
7066
|
-
/**
|
|
7376
|
+
/** 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. */
|
|
7067
7377
|
export declare interface LogprobsResult {
|
|
7068
|
-
/**
|
|
7378
|
+
/** 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`. */
|
|
7069
7379
|
chosenCandidates?: LogprobsResultCandidate[];
|
|
7070
|
-
/**
|
|
7380
|
+
/** 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. */
|
|
7071
7381
|
topCandidates?: LogprobsResultTopCandidates[];
|
|
7072
7382
|
}
|
|
7073
7383
|
|
|
7074
|
-
/**
|
|
7384
|
+
/** A single token and its associated log probability. */
|
|
7075
7385
|
export declare interface LogprobsResultCandidate {
|
|
7076
|
-
/** The
|
|
7386
|
+
/** 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. */
|
|
7077
7387
|
logProbability?: number;
|
|
7078
|
-
/** The
|
|
7388
|
+
/** The token's string representation. */
|
|
7079
7389
|
token?: string;
|
|
7080
|
-
/** The
|
|
7390
|
+
/** 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. */
|
|
7081
7391
|
tokenId?: number;
|
|
7082
7392
|
}
|
|
7083
7393
|
|
|
7084
|
-
/**
|
|
7394
|
+
/** 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. */
|
|
7085
7395
|
export declare interface LogprobsResultTopCandidates {
|
|
7086
|
-
/**
|
|
7396
|
+
/** The list of candidate tokens, sorted by log probability in descending order. */
|
|
7087
7397
|
candidates?: LogprobsResultCandidate[];
|
|
7088
7398
|
}
|
|
7089
7399
|
|
|
@@ -7131,6 +7441,14 @@ export declare enum MaskReferenceMode {
|
|
|
7131
7441
|
MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
|
|
7132
7442
|
}
|
|
7133
7443
|
|
|
7444
|
+
/** 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. */
|
|
7445
|
+
export declare interface McpServer {
|
|
7446
|
+
/** The name of the MCPServer. */
|
|
7447
|
+
name?: string;
|
|
7448
|
+
/** A transport that can stream HTTP requests and responses. */
|
|
7449
|
+
streamableHttpTransport?: StreamableHttpTransport;
|
|
7450
|
+
}
|
|
7451
|
+
|
|
7134
7452
|
/**
|
|
7135
7453
|
* MCPServer tool call content.
|
|
7136
7454
|
*/
|
|
@@ -7154,6 +7472,10 @@ declare interface MCPServerToolCallContent {
|
|
|
7154
7472
|
*/
|
|
7155
7473
|
server_name: string;
|
|
7156
7474
|
type: 'mcp_server_tool_call';
|
|
7475
|
+
/**
|
|
7476
|
+
* A signature hash for backend validation.
|
|
7477
|
+
*/
|
|
7478
|
+
signature?: string;
|
|
7157
7479
|
}
|
|
7158
7480
|
|
|
7159
7481
|
/**
|
|
@@ -7177,6 +7499,10 @@ declare interface MCPServerToolResultContent {
|
|
|
7177
7499
|
* The name of the used MCP server.
|
|
7178
7500
|
*/
|
|
7179
7501
|
server_name?: string;
|
|
7502
|
+
/**
|
|
7503
|
+
* A signature hash for backend validation.
|
|
7504
|
+
*/
|
|
7505
|
+
signature?: string;
|
|
7180
7506
|
}
|
|
7181
7507
|
|
|
7182
7508
|
declare namespace MCPServerToolResultContent {
|
|
@@ -7277,7 +7603,7 @@ export declare enum Modality {
|
|
|
7277
7603
|
export declare interface ModalityTokenCount {
|
|
7278
7604
|
/** The modality associated with this token count. */
|
|
7279
7605
|
modality?: MediaModality;
|
|
7280
|
-
/**
|
|
7606
|
+
/** The number of tokens counted for this modality. */
|
|
7281
7607
|
tokenCount?: number;
|
|
7282
7608
|
}
|
|
7283
7609
|
|
|
@@ -7339,13 +7665,13 @@ export declare interface Model {
|
|
|
7339
7665
|
/**
|
|
7340
7666
|
* The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
|
|
7341
7667
|
*/
|
|
7342
|
-
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 & {});
|
|
7668
|
+
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 & {});
|
|
7343
7669
|
|
|
7344
|
-
/** Configuration for Model Armor
|
|
7670
|
+
/** 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. */
|
|
7345
7671
|
export declare interface ModelArmorConfig {
|
|
7346
|
-
/** Optional. The name of the Model Armor template to use for prompt
|
|
7672
|
+
/** 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}`. */
|
|
7347
7673
|
promptTemplateName?: string;
|
|
7348
|
-
/** Optional. The name of the Model Armor template to use for response
|
|
7674
|
+
/** 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}`. */
|
|
7349
7675
|
responseTemplateName?: string;
|
|
7350
7676
|
}
|
|
7351
7677
|
|
|
@@ -7892,6 +8218,12 @@ export declare enum Outcome {
|
|
|
7892
8218
|
OUTCOME_DEADLINE_EXCEEDED = "OUTCOME_DEADLINE_EXCEEDED"
|
|
7893
8219
|
}
|
|
7894
8220
|
|
|
8221
|
+
/** Describes the info for output of EvaluationService. This data type is not supported in Gemini API. */
|
|
8222
|
+
export declare interface OutputInfo {
|
|
8223
|
+
/** Output only. The full path of the Cloud Storage directory created, into which the evaluation results and aggregation results are written. */
|
|
8224
|
+
gcsOutputDirectory?: string;
|
|
8225
|
+
}
|
|
8226
|
+
|
|
7895
8227
|
/**
|
|
7896
8228
|
* Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
|
|
7897
8229
|
*/
|
|
@@ -8039,6 +8371,36 @@ export declare class Pager<T> implements AsyncIterable<T> {
|
|
|
8039
8371
|
hasNextPage(): boolean;
|
|
8040
8372
|
}
|
|
8041
8373
|
|
|
8374
|
+
/** Output only. Pairwise metric choice. This enum is not supported in Gemini API. */
|
|
8375
|
+
export declare enum PairwiseChoice {
|
|
8376
|
+
/**
|
|
8377
|
+
* Unspecified prediction choice.
|
|
8378
|
+
*/
|
|
8379
|
+
PAIRWISE_CHOICE_UNSPECIFIED = "PAIRWISE_CHOICE_UNSPECIFIED",
|
|
8380
|
+
/**
|
|
8381
|
+
* Baseline prediction wins
|
|
8382
|
+
*/
|
|
8383
|
+
BASELINE = "BASELINE",
|
|
8384
|
+
/**
|
|
8385
|
+
* Candidate prediction wins
|
|
8386
|
+
*/
|
|
8387
|
+
CANDIDATE = "CANDIDATE",
|
|
8388
|
+
/**
|
|
8389
|
+
* Winner cannot be determined
|
|
8390
|
+
*/
|
|
8391
|
+
TIE = "TIE"
|
|
8392
|
+
}
|
|
8393
|
+
|
|
8394
|
+
/** Spec for pairwise metric result. This data type is not supported in Gemini API. */
|
|
8395
|
+
export declare interface PairwiseMetricResult {
|
|
8396
|
+
/** Output only. Spec for custom output. */
|
|
8397
|
+
customOutput?: CustomOutput;
|
|
8398
|
+
/** Output only. Explanation for pairwise metric score. */
|
|
8399
|
+
explanation?: string;
|
|
8400
|
+
/** Output only. Pairwise metric choice. */
|
|
8401
|
+
pairwiseChoice?: PairwiseChoice;
|
|
8402
|
+
}
|
|
8403
|
+
|
|
8042
8404
|
/** A datatype containing media content.
|
|
8043
8405
|
|
|
8044
8406
|
Exactly one field within a Part should be set, representing the specific type
|
|
@@ -8048,21 +8410,21 @@ export declare interface Part {
|
|
|
8048
8410
|
/** Media resolution for the input media.
|
|
8049
8411
|
*/
|
|
8050
8412
|
mediaResolution?: PartMediaResolution;
|
|
8051
|
-
/** Optional.
|
|
8413
|
+
/** Optional. The result of executing the ExecutableCode. */
|
|
8052
8414
|
codeExecutionResult?: CodeExecutionResult;
|
|
8053
|
-
/** Optional. Code generated by the model that is
|
|
8415
|
+
/** Optional. Code generated by the model that is intended to be executed. */
|
|
8054
8416
|
executableCode?: ExecutableCode;
|
|
8055
|
-
/** Optional. URI
|
|
8417
|
+
/** Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage. */
|
|
8056
8418
|
fileData?: FileData;
|
|
8057
|
-
/** Optional. A predicted
|
|
8419
|
+
/** 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. */
|
|
8058
8420
|
functionCall?: FunctionCall;
|
|
8059
|
-
/** Optional. The result
|
|
8421
|
+
/** Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted. */
|
|
8060
8422
|
functionResponse?: FunctionResponse;
|
|
8061
|
-
/** Optional.
|
|
8423
|
+
/** Optional. The inline data content of the part. This can be used to include images, audio, or video in a request. */
|
|
8062
8424
|
inlineData?: Blob_2;
|
|
8063
|
-
/** Optional.
|
|
8425
|
+
/** 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. */
|
|
8064
8426
|
text?: string;
|
|
8065
|
-
/** Optional. Indicates
|
|
8427
|
+
/** Optional. Indicates whether the `part` represents the model's thought process or reasoning. */
|
|
8066
8428
|
thought?: boolean;
|
|
8067
8429
|
/** Optional. An opaque signature for the thought so it can be reused in subsequent requests.
|
|
8068
8430
|
* @remarks Encoded as base64 string. */
|
|
@@ -8073,16 +8435,16 @@ export declare interface Part {
|
|
|
8073
8435
|
|
|
8074
8436
|
/** Partial argument value of the function call. This data type is not supported in Gemini API. */
|
|
8075
8437
|
export declare interface PartialArg {
|
|
8438
|
+
/** Optional. Represents a boolean value. */
|
|
8439
|
+
boolValue?: boolean;
|
|
8440
|
+
/** Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". */
|
|
8441
|
+
jsonPath?: string;
|
|
8076
8442
|
/** Optional. Represents a null value. */
|
|
8077
8443
|
nullValue?: 'NULL_VALUE';
|
|
8078
8444
|
/** Optional. Represents a double value. */
|
|
8079
8445
|
numberValue?: number;
|
|
8080
8446
|
/** Optional. Represents a string value. */
|
|
8081
8447
|
stringValue?: string;
|
|
8082
|
-
/** Optional. Represents a boolean value. */
|
|
8083
|
-
boolValue?: boolean;
|
|
8084
|
-
/** Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". */
|
|
8085
|
-
jsonPath?: string;
|
|
8086
8448
|
/** 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. */
|
|
8087
8449
|
willContinue?: boolean;
|
|
8088
8450
|
}
|
|
@@ -8186,14 +8548,28 @@ export declare enum PhishBlockThreshold {
|
|
|
8186
8548
|
BLOCK_ONLY_EXTREMELY_HIGH = "BLOCK_ONLY_EXTREMELY_HIGH"
|
|
8187
8549
|
}
|
|
8188
8550
|
|
|
8189
|
-
/**
|
|
8551
|
+
/** Spec for pointwise metric result. This data type is not supported in Gemini API. */
|
|
8552
|
+
export declare interface PointwiseMetricResult {
|
|
8553
|
+
/** Output only. Spec for custom output. */
|
|
8554
|
+
customOutput?: CustomOutput;
|
|
8555
|
+
/** Output only. Explanation for pointwise metric score. */
|
|
8556
|
+
explanation?: string;
|
|
8557
|
+
/** Output only. Pointwise metric score. */
|
|
8558
|
+
score?: number;
|
|
8559
|
+
}
|
|
8560
|
+
|
|
8561
|
+
/** Configuration for a prebuilt voice. */
|
|
8190
8562
|
export declare interface PrebuiltVoiceConfig {
|
|
8191
|
-
/** The name of the
|
|
8563
|
+
/** The name of the prebuilt voice to use. */
|
|
8192
8564
|
voiceName?: string;
|
|
8193
8565
|
}
|
|
8194
8566
|
|
|
8195
8567
|
/** Statistics computed for datasets used for preference optimization. This data type is not supported in Gemini API. */
|
|
8196
8568
|
export declare interface PreferenceOptimizationDataStats {
|
|
8569
|
+
/** Output only. A partial sample of the indices (starting from 1) of the dropped examples. */
|
|
8570
|
+
droppedExampleIndices?: string[];
|
|
8571
|
+
/** Output only. For each index in `dropped_example_indices`, the user-facing reason why the example was dropped. */
|
|
8572
|
+
droppedExampleReasons?: string[];
|
|
8197
8573
|
/** Output only. Dataset distributions for scores variance per example. */
|
|
8198
8574
|
scoreVariancePerExampleDistribution?: DatasetDistribution;
|
|
8199
8575
|
/** Output only. Dataset distributions for scores. */
|
|
@@ -8260,6 +8636,22 @@ export declare interface ProductImage {
|
|
|
8260
8636
|
productImage?: Image_2;
|
|
8261
8637
|
}
|
|
8262
8638
|
|
|
8639
|
+
/** Enum for controlling whether the model can generate images of prominent people (celebrities). */
|
|
8640
|
+
export declare enum ProminentPeople {
|
|
8641
|
+
/**
|
|
8642
|
+
* Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
|
|
8643
|
+
*/
|
|
8644
|
+
PROMINENT_PEOPLE_UNSPECIFIED = "PROMINENT_PEOPLE_UNSPECIFIED",
|
|
8645
|
+
/**
|
|
8646
|
+
* Allows the model to generate images of prominent people.
|
|
8647
|
+
*/
|
|
8648
|
+
ALLOW_PROMINENT_PEOPLE = "ALLOW_PROMINENT_PEOPLE",
|
|
8649
|
+
/**
|
|
8650
|
+
* Prevents the model from generating images of prominent people.
|
|
8651
|
+
*/
|
|
8652
|
+
BLOCK_PROMINENT_PEOPLE = "BLOCK_PROMINENT_PEOPLE"
|
|
8653
|
+
}
|
|
8654
|
+
|
|
8263
8655
|
/**
|
|
8264
8656
|
* @license
|
|
8265
8657
|
* Copyright 2025 Google LLC
|
|
@@ -8334,6 +8726,12 @@ export declare interface RagRetrievalConfigRankingRankService {
|
|
|
8334
8726
|
declare class RateLimitError extends APIError<429, Headers> {
|
|
8335
8727
|
}
|
|
8336
8728
|
|
|
8729
|
+
/** Raw output. This data type is not supported in Gemini API. */
|
|
8730
|
+
export declare interface RawOutput {
|
|
8731
|
+
/** Output only. Raw output string. */
|
|
8732
|
+
rawOutput?: string[];
|
|
8733
|
+
}
|
|
8734
|
+
|
|
8337
8735
|
/** A raw reference image.
|
|
8338
8736
|
|
|
8339
8737
|
A raw reference image represents the base image to edit, provided by the user.
|
|
@@ -8635,12 +9033,23 @@ export declare interface RetrievalConfig {
|
|
|
8635
9033
|
languageCode?: string;
|
|
8636
9034
|
}
|
|
8637
9035
|
|
|
8638
|
-
/** Metadata
|
|
9036
|
+
/** Metadata returned to client when grounding is enabled. */
|
|
8639
9037
|
export declare interface RetrievalMetadata {
|
|
8640
|
-
/** Optional. Score indicating how likely information from
|
|
9038
|
+
/** Optional. Score indicating how likely information from google
|
|
9039
|
+
search could help answer the prompt. The score is in the range [0, 1],
|
|
9040
|
+
where 0 is the least likely and 1 is the most likely. This score is only
|
|
9041
|
+
populated when google search grounding and dynamic retrieval is enabled.
|
|
9042
|
+
It will be compared to the threshold to determine whether to trigger
|
|
9043
|
+
Google search. */
|
|
8641
9044
|
googleSearchDynamicRetrievalScore?: number;
|
|
8642
9045
|
}
|
|
8643
9046
|
|
|
9047
|
+
/** Rouge metric value for an instance. This data type is not supported in Gemini API. */
|
|
9048
|
+
export declare interface RougeMetricValue {
|
|
9049
|
+
/** Output only. Rouge score. */
|
|
9050
|
+
score?: number;
|
|
9051
|
+
}
|
|
9052
|
+
|
|
8644
9053
|
/** Safety attributes of a GeneratedImage or the user-provided prompt. */
|
|
8645
9054
|
export declare interface SafetyAttributes {
|
|
8646
9055
|
/** List of RAI categories. */
|
|
@@ -8659,31 +9068,31 @@ export declare enum SafetyFilterLevel {
|
|
|
8659
9068
|
BLOCK_NONE = "BLOCK_NONE"
|
|
8660
9069
|
}
|
|
8661
9070
|
|
|
8662
|
-
/**
|
|
9071
|
+
/** A safety rating for a piece of content. The safety rating contains the harm category and the harm probability level. */
|
|
8663
9072
|
export declare interface SafetyRating {
|
|
8664
|
-
/** Output only. Indicates whether the content was
|
|
9073
|
+
/** Output only. Indicates whether the content was blocked because of this rating. */
|
|
8665
9074
|
blocked?: boolean;
|
|
8666
|
-
/** Output only.
|
|
9075
|
+
/** Output only. The harm category of this rating. */
|
|
8667
9076
|
category?: HarmCategory;
|
|
8668
9077
|
/** 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. */
|
|
8669
9078
|
overwrittenThreshold?: HarmBlockThreshold;
|
|
8670
|
-
/** Output only.
|
|
9079
|
+
/** Output only. The probability of harm for this category. */
|
|
8671
9080
|
probability?: HarmProbability;
|
|
8672
|
-
/** Output only.
|
|
9081
|
+
/** Output only. The probability score of harm for this category. This field is not supported in Gemini API. */
|
|
8673
9082
|
probabilityScore?: number;
|
|
8674
|
-
/** Output only.
|
|
9083
|
+
/** Output only. The severity of harm for this category. This field is not supported in Gemini API. */
|
|
8675
9084
|
severity?: HarmSeverity;
|
|
8676
|
-
/** Output only.
|
|
9085
|
+
/** Output only. The severity score of harm for this category. This field is not supported in Gemini API. */
|
|
8677
9086
|
severityScore?: number;
|
|
8678
9087
|
}
|
|
8679
9088
|
|
|
8680
|
-
/**
|
|
9089
|
+
/** A safety setting that affects the safety-blocking behavior. A SafetySetting consists of a harm category and a threshold for that category. */
|
|
8681
9090
|
export declare interface SafetySetting {
|
|
8682
|
-
/** Required.
|
|
9091
|
+
/** Required. The harm category to be blocked. */
|
|
8683
9092
|
category?: HarmCategory;
|
|
8684
|
-
/** Optional.
|
|
9093
|
+
/** 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. */
|
|
8685
9094
|
method?: HarmBlockMethod;
|
|
8686
|
-
/** Required. The harm
|
|
9095
|
+
/** Required. The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
|
|
8687
9096
|
threshold?: HarmBlockThreshold;
|
|
8688
9097
|
}
|
|
8689
9098
|
|
|
@@ -8749,49 +9158,49 @@ export declare enum Scale {
|
|
|
8749
9158
|
object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
|
|
8750
9159
|
be added in the future as needed. */
|
|
8751
9160
|
export declare interface Schema {
|
|
8752
|
-
/** Optional. The
|
|
9161
|
+
/** Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`. */
|
|
8753
9162
|
anyOf?: Schema[];
|
|
8754
|
-
/** Optional. Default value
|
|
9163
|
+
/** Optional. Default value to use if the field is not specified. */
|
|
8755
9164
|
default?: unknown;
|
|
8756
|
-
/** Optional.
|
|
9165
|
+
/** Optional. Description of the schema. */
|
|
8757
9166
|
description?: string;
|
|
8758
|
-
/** Optional. Possible values of the
|
|
9167
|
+
/** 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"]}` */
|
|
8759
9168
|
enum?: string[];
|
|
8760
|
-
/** Optional. Example of
|
|
9169
|
+
/** Optional. Example of an instance of this schema. */
|
|
8761
9170
|
example?: unknown;
|
|
8762
|
-
/** Optional. The format of the data.
|
|
9171
|
+
/** 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. */
|
|
8763
9172
|
format?: string;
|
|
8764
|
-
/** Optional.
|
|
9173
|
+
/** Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array. */
|
|
8765
9174
|
items?: Schema;
|
|
8766
|
-
/** Optional.
|
|
9175
|
+
/** Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array. */
|
|
8767
9176
|
maxItems?: string;
|
|
8768
|
-
/** Optional.
|
|
9177
|
+
/** Optional. If type is `STRING`, `max_length` specifies the maximum length of the string. */
|
|
8769
9178
|
maxLength?: string;
|
|
8770
|
-
/** Optional.
|
|
9179
|
+
/** Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided. */
|
|
8771
9180
|
maxProperties?: string;
|
|
8772
|
-
/** Optional.
|
|
9181
|
+
/** Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value. */
|
|
8773
9182
|
maximum?: number;
|
|
8774
|
-
/** Optional.
|
|
9183
|
+
/** Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array. */
|
|
8775
9184
|
minItems?: string;
|
|
8776
|
-
/** Optional.
|
|
9185
|
+
/** Optional. If type is `STRING`, `min_length` specifies the minimum length of the string. */
|
|
8777
9186
|
minLength?: string;
|
|
8778
|
-
/** Optional.
|
|
9187
|
+
/** Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided. */
|
|
8779
9188
|
minProperties?: string;
|
|
8780
|
-
/** Optional.
|
|
9189
|
+
/** Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value. */
|
|
8781
9190
|
minimum?: number;
|
|
8782
|
-
/** Optional. Indicates if the value
|
|
9191
|
+
/** Optional. Indicates if the value of this field can be null. */
|
|
8783
9192
|
nullable?: boolean;
|
|
8784
|
-
/** Optional.
|
|
9193
|
+
/** Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match. */
|
|
8785
9194
|
pattern?: string;
|
|
8786
|
-
/** Optional.
|
|
9195
|
+
/** Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object. */
|
|
8787
9196
|
properties?: Record<string, Schema>;
|
|
8788
|
-
/** Optional.
|
|
9197
|
+
/** 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. */
|
|
8789
9198
|
propertyOrdering?: string[];
|
|
8790
|
-
/** Optional.
|
|
9199
|
+
/** Optional. If type is `OBJECT`, `required` lists the names of properties that must be present. */
|
|
8791
9200
|
required?: string[];
|
|
8792
|
-
/** Optional.
|
|
9201
|
+
/** Optional. Title for the schema. */
|
|
8793
9202
|
title?: string;
|
|
8794
|
-
/** Optional.
|
|
9203
|
+
/** Optional. Data type of the schema field. */
|
|
8795
9204
|
type?: Type;
|
|
8796
9205
|
}
|
|
8797
9206
|
|
|
@@ -8803,24 +9212,40 @@ export declare interface ScribbleImage {
|
|
|
8803
9212
|
image?: Image_2;
|
|
8804
9213
|
}
|
|
8805
9214
|
|
|
8806
|
-
/**
|
|
9215
|
+
/** The entry point used to search for grounding sources. */
|
|
8807
9216
|
export declare interface SearchEntryPoint {
|
|
8808
|
-
/** Optional. Web content snippet that can be embedded in a web page
|
|
9217
|
+
/** Optional. Web content snippet that can be embedded in a web page
|
|
9218
|
+
or an app webview. */
|
|
8809
9219
|
renderedContent?: string;
|
|
8810
|
-
/** Optional.
|
|
9220
|
+
/** Optional. JSON representing array of tuples.
|
|
8811
9221
|
* @remarks Encoded as base64 string. */
|
|
8812
9222
|
sdkBlob?: string;
|
|
8813
9223
|
}
|
|
8814
9224
|
|
|
8815
|
-
/**
|
|
9225
|
+
/** Tool to support computer use. */
|
|
9226
|
+
export declare interface SearchTypes {
|
|
9227
|
+
/** Setting this field enables web search. Only text results are
|
|
9228
|
+
returned. */
|
|
9229
|
+
webSearch?: WebSearch;
|
|
9230
|
+
/** Setting this field enables image search. Image bytes are returned. */
|
|
9231
|
+
imageSearch?: ImageSearch;
|
|
9232
|
+
}
|
|
9233
|
+
|
|
9234
|
+
/** Segment of the content this support belongs to. */
|
|
8816
9235
|
export declare interface Segment {
|
|
8817
|
-
/** Output only.
|
|
9236
|
+
/** Output only. Start index in the given Part, measured in bytes.
|
|
9237
|
+
|
|
9238
|
+
Offset from the start of the Part, inclusive, starting at zero. */
|
|
9239
|
+
startIndex?: number;
|
|
9240
|
+
/** Output only. End index in the given Part, measured in bytes.
|
|
9241
|
+
|
|
9242
|
+
Offset from the start of the Part, exclusive, starting at zero. */
|
|
8818
9243
|
endIndex?: number;
|
|
8819
|
-
/** Output only. The index of a Part object within its parent
|
|
9244
|
+
/** Output only. The index of a Part object within its parent
|
|
9245
|
+
Content object. */
|
|
8820
9246
|
partIndex?: number;
|
|
8821
|
-
/** Output only.
|
|
8822
|
-
|
|
8823
|
-
/** Output only. The text corresponding to the segment from the response. */
|
|
9247
|
+
/** Output only. The text corresponding to the segment from the
|
|
9248
|
+
response. */
|
|
8824
9249
|
text?: string;
|
|
8825
9250
|
}
|
|
8826
9251
|
|
|
@@ -9096,7 +9521,7 @@ export declare interface SlidingWindow {
|
|
|
9096
9521
|
targetTokens?: string;
|
|
9097
9522
|
}
|
|
9098
9523
|
|
|
9099
|
-
/** Configuration for a single speaker in a multi
|
|
9524
|
+
/** Configuration for a single speaker in a multi-speaker setup. */
|
|
9100
9525
|
export declare interface SpeakerVoiceConfig {
|
|
9101
9526
|
/** Required. The name of the speaker. This should be the same as the speaker name used in the prompt. */
|
|
9102
9527
|
speaker?: string;
|
|
@@ -9107,7 +9532,7 @@ export declare interface SpeakerVoiceConfig {
|
|
|
9107
9532
|
export declare interface SpeechConfig {
|
|
9108
9533
|
/** Configuration for the voice of the response. */
|
|
9109
9534
|
voiceConfig?: VoiceConfig;
|
|
9110
|
-
/** Optional.
|
|
9535
|
+
/** Optional. The language code (ISO 639-1) for the speech synthesis. */
|
|
9111
9536
|
languageCode?: string;
|
|
9112
9537
|
/** The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`. */
|
|
9113
9538
|
multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
|
|
@@ -9174,6 +9599,20 @@ declare class Stream<Item> implements AsyncIterable<Item> {
|
|
|
9174
9599
|
toReadableStream(): _ReadableStream_2;
|
|
9175
9600
|
}
|
|
9176
9601
|
|
|
9602
|
+
/** A transport that can stream HTTP requests and responses. Next ID: 6. This data type is not supported in Vertex AI. */
|
|
9603
|
+
export declare interface StreamableHttpTransport {
|
|
9604
|
+
/** Optional: Fields for authentication headers, timeouts, etc., if needed. */
|
|
9605
|
+
headers?: Record<string, string>;
|
|
9606
|
+
/** Timeout for SSE read operations. */
|
|
9607
|
+
sseReadTimeout?: string;
|
|
9608
|
+
/** Whether to close the client session when the transport closes. */
|
|
9609
|
+
terminateOnClose?: boolean;
|
|
9610
|
+
/** HTTP timeout for regular operations. */
|
|
9611
|
+
timeout?: string;
|
|
9612
|
+
/** The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp". */
|
|
9613
|
+
url?: string;
|
|
9614
|
+
}
|
|
9615
|
+
|
|
9177
9616
|
/** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
|
|
9178
9617
|
export declare interface StringList {
|
|
9179
9618
|
/** The string values of the metadata to store. */
|
|
@@ -9359,15 +9798,15 @@ export declare interface TestTableItem {
|
|
|
9359
9798
|
* A text content block.
|
|
9360
9799
|
*/
|
|
9361
9800
|
declare interface TextContent {
|
|
9801
|
+
/**
|
|
9802
|
+
* The text content.
|
|
9803
|
+
*/
|
|
9804
|
+
text: string;
|
|
9362
9805
|
type: 'text';
|
|
9363
9806
|
/**
|
|
9364
9807
|
* Citation information for model-generated content.
|
|
9365
9808
|
*/
|
|
9366
9809
|
annotations?: Array<Annotation>;
|
|
9367
|
-
/**
|
|
9368
|
-
* The text content.
|
|
9369
|
-
*/
|
|
9370
|
-
text?: string;
|
|
9371
9810
|
}
|
|
9372
9811
|
|
|
9373
9812
|
/** The thinking features configuration. */
|
|
@@ -9533,20 +9972,25 @@ export declare interface Tool {
|
|
|
9533
9972
|
computerUse?: ComputerUse;
|
|
9534
9973
|
/** Optional. Tool to retrieve knowledge from the File Search Stores. */
|
|
9535
9974
|
fileSearch?: FileSearch;
|
|
9975
|
+
/** Enables the model to execute Google Search as part of generation. */
|
|
9976
|
+
googleSearch?: GoogleSearch;
|
|
9977
|
+
/** Optional. Tool that allows grounding the model's response with
|
|
9978
|
+
geospatial context related to the user's query. */
|
|
9979
|
+
googleMaps?: GoogleMaps;
|
|
9536
9980
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
9537
9981
|
codeExecution?: ToolCodeExecution;
|
|
9538
9982
|
/** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
|
|
9539
9983
|
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
9540
9984
|
/** 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. */
|
|
9541
9985
|
functionDeclarations?: FunctionDeclaration[];
|
|
9542
|
-
/** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
|
|
9543
|
-
googleMaps?: GoogleMaps;
|
|
9544
|
-
/** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
|
|
9545
|
-
googleSearch?: GoogleSearch;
|
|
9546
9986
|
/** Optional. Specialized retrieval tool that is powered by Google Search. */
|
|
9547
9987
|
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
9988
|
+
/** 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. */
|
|
9989
|
+
parallelAiSearch?: ToolParallelAiSearch;
|
|
9548
9990
|
/** Optional. Tool to support URL context retrieval. */
|
|
9549
9991
|
urlContext?: UrlContext;
|
|
9992
|
+
/** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
|
|
9993
|
+
mcpServers?: McpServer[];
|
|
9550
9994
|
}
|
|
9551
9995
|
|
|
9552
9996
|
/**
|
|
@@ -9560,6 +10004,10 @@ declare namespace Tool_2 {
|
|
|
9560
10004
|
*/
|
|
9561
10005
|
interface GoogleSearch {
|
|
9562
10006
|
type: 'google_search';
|
|
10007
|
+
/**
|
|
10008
|
+
* The types of search grounding to enable.
|
|
10009
|
+
*/
|
|
10010
|
+
search_types?: Array<'web_search' | 'image_search'>;
|
|
9563
10011
|
}
|
|
9564
10012
|
/**
|
|
9565
10013
|
* A tool that can be used by the model to execute code.
|
|
@@ -9633,13 +10081,11 @@ declare namespace Tool_2 {
|
|
|
9633
10081
|
}
|
|
9634
10082
|
|
|
9635
10083
|
/**
|
|
9636
|
-
* The configuration
|
|
10084
|
+
* The tool choice configuration containing allowed tools.
|
|
9637
10085
|
*/
|
|
9638
|
-
declare type ToolChoice = ToolChoiceType | ToolChoiceConfig;
|
|
9639
|
-
|
|
9640
10086
|
declare interface ToolChoiceConfig {
|
|
9641
10087
|
/**
|
|
9642
|
-
* The
|
|
10088
|
+
* The allowed tools.
|
|
9643
10089
|
*/
|
|
9644
10090
|
allowed_tools?: AllowedTools;
|
|
9645
10091
|
}
|
|
@@ -9662,6 +10108,14 @@ export declare interface ToolConfig {
|
|
|
9662
10108
|
|
|
9663
10109
|
export declare type ToolListUnion = ToolUnion[];
|
|
9664
10110
|
|
|
10111
|
+
/** ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. This data type is not supported in Gemini API. */
|
|
10112
|
+
export declare interface ToolParallelAiSearch {
|
|
10113
|
+
/** 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. */
|
|
10114
|
+
apiKey?: string;
|
|
10115
|
+
/** 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 } } */
|
|
10116
|
+
customConfigs?: Record<string, unknown>;
|
|
10117
|
+
}
|
|
10118
|
+
|
|
9665
10119
|
export declare type ToolUnion = Tool | CallableTool;
|
|
9666
10120
|
|
|
9667
10121
|
/** Output only. The traffic type for this request. This enum is not supported in Gemini API. */
|
|
@@ -9674,6 +10128,14 @@ export declare enum TrafficType {
|
|
|
9674
10128
|
* The request was processed using Pay-As-You-Go quota.
|
|
9675
10129
|
*/
|
|
9676
10130
|
ON_DEMAND = "ON_DEMAND",
|
|
10131
|
+
/**
|
|
10132
|
+
* Type for Priority Pay-As-You-Go traffic.
|
|
10133
|
+
*/
|
|
10134
|
+
ON_DEMAND_PRIORITY = "ON_DEMAND_PRIORITY",
|
|
10135
|
+
/**
|
|
10136
|
+
* Type for Flex traffic.
|
|
10137
|
+
*/
|
|
10138
|
+
ON_DEMAND_FLEX = "ON_DEMAND_FLEX",
|
|
9677
10139
|
/**
|
|
9678
10140
|
* Type for Provisioned Throughput traffic.
|
|
9679
10141
|
*/
|
|
@@ -9748,7 +10210,7 @@ export declare interface TuningDataset {
|
|
|
9748
10210
|
|
|
9749
10211
|
/** The tuning data statistic values for TuningJob. This data type is not supported in Gemini API. */
|
|
9750
10212
|
export declare interface TuningDataStats {
|
|
9751
|
-
/** Output only. Statistics for distillation. */
|
|
10213
|
+
/** Output only. Statistics for distillation prompt dataset. These statistics do not include the responses sampled from the teacher model. */
|
|
9752
10214
|
distillationDataStats?: DistillationDataStats;
|
|
9753
10215
|
/** Output only. Statistics for preference optimization. */
|
|
9754
10216
|
preferenceOptimizationDataStats?: PreferenceOptimizationDataStats;
|
|
@@ -9804,8 +10266,12 @@ export declare interface TuningJob {
|
|
|
9804
10266
|
partnerModelTuningSpec?: PartnerModelTuningSpec;
|
|
9805
10267
|
/** 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. */
|
|
9806
10268
|
customBaseModel?: string;
|
|
10269
|
+
/** Output only. Evaluation runs for the Tuning Job. */
|
|
10270
|
+
evaluateDatasetRuns?: EvaluateDatasetRun[];
|
|
9807
10271
|
/** Output only. The Experiment associated with this TuningJob. */
|
|
9808
10272
|
experiment?: string;
|
|
10273
|
+
/** Tuning Spec for Full Fine Tuning. */
|
|
10274
|
+
fullFineTuningSpec?: FullFineTuningSpec;
|
|
9809
10275
|
/** 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. */
|
|
9810
10276
|
labels?: Record<string, string>;
|
|
9811
10277
|
/** 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. */
|
|
@@ -9816,10 +10282,40 @@ export declare interface TuningJob {
|
|
|
9816
10282
|
serviceAccount?: string;
|
|
9817
10283
|
/** 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. */
|
|
9818
10284
|
tunedModelDisplayName?: string;
|
|
10285
|
+
/** Output only. The detail state of the tuning job (while the overall `JobState` is running). */
|
|
10286
|
+
tuningJobState?: TuningJobState;
|
|
9819
10287
|
/** Tuning Spec for Veo Tuning. */
|
|
9820
10288
|
veoTuningSpec?: VeoTuningSpec;
|
|
9821
10289
|
}
|
|
9822
10290
|
|
|
10291
|
+
/** Output only. The detail state of the tuning job (while the overall `JobState` is running). This enum is not supported in Gemini API. */
|
|
10292
|
+
export declare enum TuningJobState {
|
|
10293
|
+
/**
|
|
10294
|
+
* Default tuning job state.
|
|
10295
|
+
*/
|
|
10296
|
+
TUNING_JOB_STATE_UNSPECIFIED = "TUNING_JOB_STATE_UNSPECIFIED",
|
|
10297
|
+
/**
|
|
10298
|
+
* Tuning job is waiting for job quota.
|
|
10299
|
+
*/
|
|
10300
|
+
TUNING_JOB_STATE_WAITING_FOR_QUOTA = "TUNING_JOB_STATE_WAITING_FOR_QUOTA",
|
|
10301
|
+
/**
|
|
10302
|
+
* Tuning job is validating the dataset.
|
|
10303
|
+
*/
|
|
10304
|
+
TUNING_JOB_STATE_PROCESSING_DATASET = "TUNING_JOB_STATE_PROCESSING_DATASET",
|
|
10305
|
+
/**
|
|
10306
|
+
* Tuning job is waiting for hardware capacity.
|
|
10307
|
+
*/
|
|
10308
|
+
TUNING_JOB_STATE_WAITING_FOR_CAPACITY = "TUNING_JOB_STATE_WAITING_FOR_CAPACITY",
|
|
10309
|
+
/**
|
|
10310
|
+
* Tuning job is running.
|
|
10311
|
+
*/
|
|
10312
|
+
TUNING_JOB_STATE_TUNING = "TUNING_JOB_STATE_TUNING",
|
|
10313
|
+
/**
|
|
10314
|
+
* Tuning job is doing some post processing steps.
|
|
10315
|
+
*/
|
|
10316
|
+
TUNING_JOB_STATE_POST_PROCESSING = "TUNING_JOB_STATE_POST_PROCESSING"
|
|
10317
|
+
}
|
|
10318
|
+
|
|
9823
10319
|
/** Enum representing the tuning method. */
|
|
9824
10320
|
export declare enum TuningMethod {
|
|
9825
10321
|
/**
|
|
@@ -9997,7 +10493,7 @@ export declare enum TurnCoverage {
|
|
|
9997
10493
|
TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT"
|
|
9998
10494
|
}
|
|
9999
10495
|
|
|
10000
|
-
/**
|
|
10496
|
+
/** Data type of the schema field. */
|
|
10001
10497
|
export declare enum Type {
|
|
10002
10498
|
/**
|
|
10003
10499
|
* Not specified, should not be used.
|
|
@@ -10050,14 +10546,15 @@ declare namespace types {
|
|
|
10050
10546
|
Language,
|
|
10051
10547
|
FunctionResponseScheduling,
|
|
10052
10548
|
Type,
|
|
10053
|
-
|
|
10549
|
+
PhishBlockThreshold,
|
|
10054
10550
|
AuthType,
|
|
10055
10551
|
HttpElementLocation,
|
|
10056
|
-
|
|
10552
|
+
ApiSpec,
|
|
10057
10553
|
Behavior,
|
|
10058
10554
|
DynamicRetrievalConfigMode,
|
|
10059
10555
|
FunctionCallingConfigMode,
|
|
10060
10556
|
ThinkingLevel,
|
|
10557
|
+
PersonGeneration,
|
|
10061
10558
|
HarmCategory,
|
|
10062
10559
|
HarmBlockMethod,
|
|
10063
10560
|
HarmBlockThreshold,
|
|
@@ -10072,14 +10569,17 @@ declare namespace types {
|
|
|
10072
10569
|
TuningMode,
|
|
10073
10570
|
AdapterSize,
|
|
10074
10571
|
JobState,
|
|
10572
|
+
TuningJobState,
|
|
10573
|
+
AggregationMetric,
|
|
10574
|
+
PairwiseChoice,
|
|
10075
10575
|
TuningTask,
|
|
10076
10576
|
PartMediaResolutionLevel,
|
|
10077
10577
|
ResourceScope,
|
|
10078
10578
|
FeatureSelectionPreference,
|
|
10079
10579
|
Environment,
|
|
10580
|
+
ProminentPeople,
|
|
10080
10581
|
EmbeddingApiType,
|
|
10081
10582
|
SafetyFilterLevel,
|
|
10082
|
-
PersonGeneration,
|
|
10083
10583
|
ImagePromptLanguage,
|
|
10084
10584
|
MaskReferenceMode,
|
|
10085
10585
|
ControlReferenceType,
|
|
@@ -10124,14 +10624,20 @@ declare namespace types {
|
|
|
10124
10624
|
ModelSelectionConfig,
|
|
10125
10625
|
ComputerUse,
|
|
10126
10626
|
FileSearch,
|
|
10127
|
-
|
|
10128
|
-
|
|
10627
|
+
WebSearch,
|
|
10628
|
+
ImageSearch,
|
|
10629
|
+
SearchTypes,
|
|
10630
|
+
Interval,
|
|
10631
|
+
GoogleSearch,
|
|
10129
10632
|
ApiKeyConfig,
|
|
10130
10633
|
AuthConfigGoogleServiceAccountConfig,
|
|
10131
10634
|
AuthConfigHttpBasicAuthConfig,
|
|
10132
10635
|
AuthConfigOauthConfig,
|
|
10133
10636
|
AuthConfigOidcConfig,
|
|
10134
10637
|
AuthConfig,
|
|
10638
|
+
GoogleMaps,
|
|
10639
|
+
ApiAuthApiKeyConfig,
|
|
10640
|
+
ApiAuth,
|
|
10135
10641
|
ExternalApiElasticSearchParams,
|
|
10136
10642
|
ExternalApiSimpleSearchParams,
|
|
10137
10643
|
ExternalApi,
|
|
@@ -10149,12 +10655,12 @@ declare namespace types {
|
|
|
10149
10655
|
ToolCodeExecution,
|
|
10150
10656
|
EnterpriseWebSearch,
|
|
10151
10657
|
FunctionDeclaration,
|
|
10152
|
-
GoogleMaps,
|
|
10153
|
-
Interval,
|
|
10154
|
-
GoogleSearch,
|
|
10155
10658
|
DynamicRetrievalConfig,
|
|
10156
10659
|
GoogleSearchRetrieval,
|
|
10660
|
+
ToolParallelAiSearch,
|
|
10157
10661
|
UrlContext,
|
|
10662
|
+
StreamableHttpTransport,
|
|
10663
|
+
McpServer,
|
|
10158
10664
|
Tool,
|
|
10159
10665
|
LatLng,
|
|
10160
10666
|
RetrievalConfig,
|
|
@@ -10168,6 +10674,7 @@ declare namespace types {
|
|
|
10168
10674
|
SpeechConfig,
|
|
10169
10675
|
AutomaticFunctionCallingConfig,
|
|
10170
10676
|
ThinkingConfig,
|
|
10677
|
+
ImageConfigImageOutputOptions,
|
|
10171
10678
|
ImageConfig,
|
|
10172
10679
|
GenerationConfigRoutingConfigAutoRoutingMode,
|
|
10173
10680
|
GenerationConfigRoutingConfigManualRoutingMode,
|
|
@@ -10181,6 +10688,7 @@ declare namespace types {
|
|
|
10181
10688
|
GoogleTypeDate,
|
|
10182
10689
|
Citation,
|
|
10183
10690
|
CitationMetadata,
|
|
10691
|
+
GroundingChunkImage,
|
|
10184
10692
|
GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
|
|
10185
10693
|
GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
|
|
10186
10694
|
GroundingChunkMapsPlaceAnswerSources,
|
|
@@ -10297,6 +10805,23 @@ declare namespace types {
|
|
|
10297
10805
|
TuningDataStats,
|
|
10298
10806
|
EncryptionSpec,
|
|
10299
10807
|
PartnerModelTuningSpec,
|
|
10808
|
+
BleuMetricValue,
|
|
10809
|
+
CustomCodeExecutionResult,
|
|
10810
|
+
ExactMatchMetricValue,
|
|
10811
|
+
RawOutput,
|
|
10812
|
+
CustomOutput,
|
|
10813
|
+
PairwiseMetricResult,
|
|
10814
|
+
PointwiseMetricResult,
|
|
10815
|
+
RougeMetricValue,
|
|
10816
|
+
AggregationResult,
|
|
10817
|
+
BigQuerySource,
|
|
10818
|
+
GcsSource,
|
|
10819
|
+
EvaluationDataset,
|
|
10820
|
+
AggregationOutput,
|
|
10821
|
+
OutputInfo,
|
|
10822
|
+
EvaluateDatasetResponse,
|
|
10823
|
+
EvaluateDatasetRun,
|
|
10824
|
+
FullFineTuningSpec,
|
|
10300
10825
|
VeoHyperParameters,
|
|
10301
10826
|
VeoTuningSpec,
|
|
10302
10827
|
TuningJob,
|
|
@@ -10791,20 +11316,24 @@ declare interface URLContextCallArguments {
|
|
|
10791
11316
|
* URL context content.
|
|
10792
11317
|
*/
|
|
10793
11318
|
declare interface URLContextCallContent {
|
|
10794
|
-
type: 'url_context_call';
|
|
10795
11319
|
/**
|
|
10796
11320
|
* A unique ID for this specific tool call.
|
|
10797
11321
|
*/
|
|
10798
|
-
id
|
|
11322
|
+
id: string;
|
|
10799
11323
|
/**
|
|
10800
11324
|
* The arguments to pass to the URL context.
|
|
10801
11325
|
*/
|
|
10802
|
-
arguments
|
|
11326
|
+
arguments: URLContextCallArguments;
|
|
11327
|
+
type: 'url_context_call';
|
|
11328
|
+
/**
|
|
11329
|
+
* A signature hash for backend validation.
|
|
11330
|
+
*/
|
|
11331
|
+
signature?: string;
|
|
10803
11332
|
}
|
|
10804
11333
|
|
|
10805
|
-
/** Metadata
|
|
11334
|
+
/** Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL. */
|
|
10806
11335
|
export declare interface UrlContextMetadata {
|
|
10807
|
-
/** Output only.
|
|
11336
|
+
/** Output only. A list of URL metadata, with one entry for each URL retrieved by the tool. */
|
|
10808
11337
|
urlMetadata?: UrlMetadata[];
|
|
10809
11338
|
}
|
|
10810
11339
|
|
|
@@ -10826,45 +11355,45 @@ declare interface URLContextResult {
|
|
|
10826
11355
|
* URL context result content.
|
|
10827
11356
|
*/
|
|
10828
11357
|
declare interface URLContextResultContent {
|
|
10829
|
-
type: 'url_context_result';
|
|
10830
11358
|
/**
|
|
10831
11359
|
* ID to match the ID from the url context call block.
|
|
10832
11360
|
*/
|
|
10833
|
-
call_id
|
|
11361
|
+
call_id: string;
|
|
10834
11362
|
/**
|
|
10835
|
-
*
|
|
11363
|
+
* The results of the URL context.
|
|
10836
11364
|
*/
|
|
10837
|
-
|
|
11365
|
+
result: Array<URLContextResult>;
|
|
11366
|
+
type: 'url_context_result';
|
|
10838
11367
|
/**
|
|
10839
|
-
*
|
|
11368
|
+
* Whether the URL context resulted in an error.
|
|
10840
11369
|
*/
|
|
10841
|
-
|
|
11370
|
+
is_error?: boolean;
|
|
10842
11371
|
/**
|
|
10843
|
-
*
|
|
11372
|
+
* A signature hash for backend validation.
|
|
10844
11373
|
*/
|
|
10845
11374
|
signature?: string;
|
|
10846
11375
|
}
|
|
10847
11376
|
|
|
10848
|
-
/**
|
|
11377
|
+
/** The metadata for a single URL retrieval. */
|
|
10849
11378
|
export declare interface UrlMetadata {
|
|
10850
|
-
/**
|
|
11379
|
+
/** The URL retrieved by the tool. */
|
|
10851
11380
|
retrievedUrl?: string;
|
|
10852
|
-
/**
|
|
11381
|
+
/** The status of the URL retrieval. */
|
|
10853
11382
|
urlRetrievalStatus?: UrlRetrievalStatus;
|
|
10854
11383
|
}
|
|
10855
11384
|
|
|
10856
|
-
/**
|
|
11385
|
+
/** The status of the URL retrieval. */
|
|
10857
11386
|
export declare enum UrlRetrievalStatus {
|
|
10858
11387
|
/**
|
|
10859
11388
|
* Default value. This value is unused.
|
|
10860
11389
|
*/
|
|
10861
11390
|
URL_RETRIEVAL_STATUS_UNSPECIFIED = "URL_RETRIEVAL_STATUS_UNSPECIFIED",
|
|
10862
11391
|
/**
|
|
10863
|
-
*
|
|
11392
|
+
* The URL was retrieved successfully.
|
|
10864
11393
|
*/
|
|
10865
11394
|
URL_RETRIEVAL_STATUS_SUCCESS = "URL_RETRIEVAL_STATUS_SUCCESS",
|
|
10866
11395
|
/**
|
|
10867
|
-
*
|
|
11396
|
+
* The URL retrieval failed.
|
|
10868
11397
|
*/
|
|
10869
11398
|
URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR",
|
|
10870
11399
|
/**
|
|
@@ -11030,6 +11559,8 @@ export declare interface VeoHyperParameters {
|
|
|
11030
11559
|
learningRateMultiplier?: number;
|
|
11031
11560
|
/** Optional. The tuning task. Either I2V or T2V. */
|
|
11032
11561
|
tuningTask?: TuningTask;
|
|
11562
|
+
/** 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. */
|
|
11563
|
+
veoDataMixtureRatio?: number;
|
|
11033
11564
|
}
|
|
11034
11565
|
|
|
11035
11566
|
/** Tuning Spec for Veo Model Tuning. This data type is not supported in Gemini API. */
|
|
@@ -11125,7 +11656,7 @@ declare interface VideoContent {
|
|
|
11125
11656
|
/**
|
|
11126
11657
|
* The mime type of the video.
|
|
11127
11658
|
*/
|
|
11128
|
-
mime_type?:
|
|
11659
|
+
mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
|
|
11129
11660
|
/**
|
|
11130
11661
|
* The resolution of the media.
|
|
11131
11662
|
*/
|
|
@@ -11197,21 +11728,16 @@ export declare enum VideoGenerationReferenceType {
|
|
|
11197
11728
|
STYLE = "STYLE"
|
|
11198
11729
|
}
|
|
11199
11730
|
|
|
11200
|
-
/**
|
|
11731
|
+
/** Provides metadata for a video, including the start and end offsets for clipping and the frame rate. */
|
|
11201
11732
|
export declare interface VideoMetadata {
|
|
11202
11733
|
/** Optional. The end offset of the video. */
|
|
11203
11734
|
endOffset?: string;
|
|
11204
|
-
/** Optional. The frame rate of the video sent to the model. If not specified, the default value
|
|
11735
|
+
/** 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]. */
|
|
11205
11736
|
fps?: number;
|
|
11206
11737
|
/** Optional. The start offset of the video. */
|
|
11207
11738
|
startOffset?: string;
|
|
11208
11739
|
}
|
|
11209
11740
|
|
|
11210
|
-
/**
|
|
11211
|
-
* The mime type of the video.
|
|
11212
|
-
*/
|
|
11213
|
-
declare type VideoMimeType = 'video/mp4' | 'video/mpeg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/mpg' | 'video/webm' | 'video/wmv' | 'video/3gpp' | (string & {});
|
|
11214
|
-
|
|
11215
11741
|
/** Voice activity signal. */
|
|
11216
11742
|
export declare interface VoiceActivity {
|
|
11217
11743
|
/** The type of the voice activity signal. */
|
|
@@ -11242,10 +11768,16 @@ export declare enum VoiceActivityType {
|
|
|
11242
11768
|
export declare interface VoiceConfig {
|
|
11243
11769
|
/** If true, the model will use a replicated voice for the response. */
|
|
11244
11770
|
replicatedVoiceConfig?: ReplicatedVoiceConfig;
|
|
11245
|
-
/** The configuration for
|
|
11771
|
+
/** The configuration for a prebuilt voice. */
|
|
11246
11772
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
11247
11773
|
}
|
|
11248
11774
|
|
|
11775
|
+
/** Standard web search for grounding and related configurations.
|
|
11776
|
+
|
|
11777
|
+
Only text results are returned. */
|
|
11778
|
+
export declare interface WebSearch {
|
|
11779
|
+
}
|
|
11780
|
+
|
|
11249
11781
|
declare interface WebSocket_2 {
|
|
11250
11782
|
/**
|
|
11251
11783
|
* Connects the socket to the server.
|