@google/genai 1.43.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 +643 -221
- package/dist/index.cjs +482 -343
- package/dist/index.mjs +482 -344
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +483 -344
- package/dist/node/index.mjs +483 -345
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +643 -221
- package/dist/tokenizer/node.cjs +171 -67
- package/dist/tokenizer/node.d.ts +96 -83
- package/dist/tokenizer/node.mjs +171 -67
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/web/index.mjs +482 -344
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +643 -221
- 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;
|
|
@@ -440,8 +517,10 @@ declare interface Auth {
|
|
|
440
517
|
addAuthHeaders(headers: Headers, url?: string): Promise<void>;
|
|
441
518
|
}
|
|
442
519
|
|
|
443
|
-
/**
|
|
520
|
+
/** The authentication config to access the API. */
|
|
444
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;
|
|
445
524
|
/** Config for API key auth. */
|
|
446
525
|
apiKeyConfig?: ApiKeyConfig;
|
|
447
526
|
/** Type of auth scheme. */
|
|
@@ -1057,12 +1136,24 @@ export declare enum Behavior {
|
|
|
1057
1136
|
NON_BLOCKING = "NON_BLOCKING"
|
|
1058
1137
|
}
|
|
1059
1138
|
|
|
1060
|
-
/**
|
|
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. */
|
|
1061
1152
|
declare interface Blob_2 {
|
|
1062
|
-
/** Required.
|
|
1153
|
+
/** Required. The raw bytes of the data.
|
|
1063
1154
|
* @remarks Encoded as base64 string. */
|
|
1064
1155
|
data?: string;
|
|
1065
|
-
/** 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. */
|
|
1066
1157
|
displayName?: string;
|
|
1067
1158
|
/** Required. The IANA standard MIME type of the source data. */
|
|
1068
1159
|
mimeType?: string;
|
|
@@ -1335,15 +1426,15 @@ export declare interface Candidate {
|
|
|
1335
1426
|
contains the sources used to ground the generated content.
|
|
1336
1427
|
*/
|
|
1337
1428
|
groundingMetadata?: GroundingMetadata;
|
|
1338
|
-
/** 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. */
|
|
1339
1430
|
avgLogprobs?: number;
|
|
1340
|
-
/** Output only.
|
|
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. */
|
|
1341
1432
|
index?: number;
|
|
1342
|
-
/** 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". */
|
|
1343
1434
|
logprobsResult?: LogprobsResult;
|
|
1344
|
-
/** Output only.
|
|
1435
|
+
/** Output only. A list of ratings for the safety of a response candidate. There is at most one rating per category. */
|
|
1345
1436
|
safetyRatings?: SafetyRating[];
|
|
1346
|
-
/** Output only. Metadata
|
|
1437
|
+
/** Output only. Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL. */
|
|
1347
1438
|
urlContextMetadata?: UrlContextMetadata;
|
|
1348
1439
|
}
|
|
1349
1440
|
|
|
@@ -1485,19 +1576,19 @@ export declare interface ChunkingConfig {
|
|
|
1485
1576
|
whiteSpaceConfig?: WhiteSpaceConfig;
|
|
1486
1577
|
}
|
|
1487
1578
|
|
|
1488
|
-
/**
|
|
1579
|
+
/** A citation for a piece of generatedcontent. This data type is not supported in Gemini API. */
|
|
1489
1580
|
export declare interface Citation {
|
|
1490
|
-
/** Output only.
|
|
1581
|
+
/** Output only. The end index of the citation in the content. */
|
|
1491
1582
|
endIndex?: number;
|
|
1492
|
-
/** Output only.
|
|
1583
|
+
/** Output only. The license of the source of the citation. */
|
|
1493
1584
|
license?: string;
|
|
1494
|
-
/** Output only.
|
|
1585
|
+
/** Output only. The publication date of the source of the citation. */
|
|
1495
1586
|
publicationDate?: GoogleTypeDate;
|
|
1496
|
-
/** Output only.
|
|
1587
|
+
/** Output only. The start index of the citation in the content. */
|
|
1497
1588
|
startIndex?: number;
|
|
1498
|
-
/** Output only.
|
|
1589
|
+
/** Output only. The title of the source of the citation. */
|
|
1499
1590
|
title?: string;
|
|
1500
|
-
/** Output only.
|
|
1591
|
+
/** Output only. The URI of the source of the citation. */
|
|
1501
1592
|
uri?: string;
|
|
1502
1593
|
}
|
|
1503
1594
|
|
|
@@ -1609,6 +1700,10 @@ declare interface CodeExecutionCallContent {
|
|
|
1609
1700
|
*/
|
|
1610
1701
|
arguments: CodeExecutionCallArguments;
|
|
1611
1702
|
type: 'code_execution_call';
|
|
1703
|
+
/**
|
|
1704
|
+
* A signature hash for backend validation.
|
|
1705
|
+
*/
|
|
1706
|
+
signature?: string;
|
|
1612
1707
|
}
|
|
1613
1708
|
|
|
1614
1709
|
/** Result of executing the [ExecutableCode]. Only generated when using the [CodeExecution] tool, and always follows a `part` containing the [ExecutableCode]. */
|
|
@@ -1717,7 +1812,7 @@ export declare interface Content {
|
|
|
1717
1812
|
/** List of parts that constitute a single message. Each part may have
|
|
1718
1813
|
a different IANA MIME type. */
|
|
1719
1814
|
parts?: Part[];
|
|
1720
|
-
/** 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'. */
|
|
1721
1816
|
role?: string;
|
|
1722
1817
|
}
|
|
1723
1818
|
|
|
@@ -1801,6 +1896,10 @@ declare namespace ContentDelta {
|
|
|
1801
1896
|
};
|
|
1802
1897
|
name: string;
|
|
1803
1898
|
type: 'function_call';
|
|
1899
|
+
/**
|
|
1900
|
+
* A signature hash for backend validation.
|
|
1901
|
+
*/
|
|
1902
|
+
signature?: string;
|
|
1804
1903
|
}
|
|
1805
1904
|
interface FunctionResultDelta {
|
|
1806
1905
|
/**
|
|
@@ -1814,6 +1913,10 @@ declare namespace ContentDelta {
|
|
|
1814
1913
|
type: 'function_result';
|
|
1815
1914
|
is_error?: boolean;
|
|
1816
1915
|
name?: string;
|
|
1916
|
+
/**
|
|
1917
|
+
* A signature hash for backend validation.
|
|
1918
|
+
*/
|
|
1919
|
+
signature?: string;
|
|
1817
1920
|
}
|
|
1818
1921
|
namespace FunctionResultDelta {
|
|
1819
1922
|
interface Items {
|
|
@@ -1830,6 +1933,10 @@ declare namespace ContentDelta {
|
|
|
1830
1933
|
*/
|
|
1831
1934
|
arguments: InteractionsAPI.CodeExecutionCallArguments;
|
|
1832
1935
|
type: 'code_execution_call';
|
|
1936
|
+
/**
|
|
1937
|
+
* A signature hash for backend validation.
|
|
1938
|
+
*/
|
|
1939
|
+
signature?: string;
|
|
1833
1940
|
}
|
|
1834
1941
|
interface CodeExecutionResultDelta {
|
|
1835
1942
|
/**
|
|
@@ -1839,6 +1946,9 @@ declare namespace ContentDelta {
|
|
|
1839
1946
|
result: string;
|
|
1840
1947
|
type: 'code_execution_result';
|
|
1841
1948
|
is_error?: boolean;
|
|
1949
|
+
/**
|
|
1950
|
+
* A signature hash for backend validation.
|
|
1951
|
+
*/
|
|
1842
1952
|
signature?: string;
|
|
1843
1953
|
}
|
|
1844
1954
|
interface URLContextCallDelta {
|
|
@@ -1851,6 +1961,10 @@ declare namespace ContentDelta {
|
|
|
1851
1961
|
*/
|
|
1852
1962
|
arguments: InteractionsAPI.URLContextCallArguments;
|
|
1853
1963
|
type: 'url_context_call';
|
|
1964
|
+
/**
|
|
1965
|
+
* A signature hash for backend validation.
|
|
1966
|
+
*/
|
|
1967
|
+
signature?: string;
|
|
1854
1968
|
}
|
|
1855
1969
|
interface URLContextResultDelta {
|
|
1856
1970
|
/**
|
|
@@ -1860,6 +1974,9 @@ declare namespace ContentDelta {
|
|
|
1860
1974
|
result: Array<InteractionsAPI.URLContextResult>;
|
|
1861
1975
|
type: 'url_context_result';
|
|
1862
1976
|
is_error?: boolean;
|
|
1977
|
+
/**
|
|
1978
|
+
* A signature hash for backend validation.
|
|
1979
|
+
*/
|
|
1863
1980
|
signature?: string;
|
|
1864
1981
|
}
|
|
1865
1982
|
interface GoogleSearchCallDelta {
|
|
@@ -1872,6 +1989,10 @@ declare namespace ContentDelta {
|
|
|
1872
1989
|
*/
|
|
1873
1990
|
arguments: InteractionsAPI.GoogleSearchCallArguments;
|
|
1874
1991
|
type: 'google_search_call';
|
|
1992
|
+
/**
|
|
1993
|
+
* A signature hash for backend validation.
|
|
1994
|
+
*/
|
|
1995
|
+
signature?: string;
|
|
1875
1996
|
}
|
|
1876
1997
|
interface GoogleSearchResultDelta {
|
|
1877
1998
|
/**
|
|
@@ -1881,6 +2002,9 @@ declare namespace ContentDelta {
|
|
|
1881
2002
|
result: Array<InteractionsAPI.GoogleSearchResult>;
|
|
1882
2003
|
type: 'google_search_result';
|
|
1883
2004
|
is_error?: boolean;
|
|
2005
|
+
/**
|
|
2006
|
+
* A signature hash for backend validation.
|
|
2007
|
+
*/
|
|
1884
2008
|
signature?: string;
|
|
1885
2009
|
}
|
|
1886
2010
|
interface MCPServerToolCallDelta {
|
|
@@ -1894,6 +2018,10 @@ declare namespace ContentDelta {
|
|
|
1894
2018
|
name: string;
|
|
1895
2019
|
server_name: string;
|
|
1896
2020
|
type: 'mcp_server_tool_call';
|
|
2021
|
+
/**
|
|
2022
|
+
* A signature hash for backend validation.
|
|
2023
|
+
*/
|
|
2024
|
+
signature?: string;
|
|
1897
2025
|
}
|
|
1898
2026
|
interface MCPServerToolResultDelta {
|
|
1899
2027
|
/**
|
|
@@ -1907,6 +2035,10 @@ declare namespace ContentDelta {
|
|
|
1907
2035
|
type: 'mcp_server_tool_result';
|
|
1908
2036
|
name?: string;
|
|
1909
2037
|
server_name?: string;
|
|
2038
|
+
/**
|
|
2039
|
+
* A signature hash for backend validation.
|
|
2040
|
+
*/
|
|
2041
|
+
signature?: string;
|
|
1910
2042
|
}
|
|
1911
2043
|
namespace MCPServerToolResultDelta {
|
|
1912
2044
|
interface Items {
|
|
@@ -1919,6 +2051,10 @@ declare namespace ContentDelta {
|
|
|
1919
2051
|
*/
|
|
1920
2052
|
id: string;
|
|
1921
2053
|
type: 'file_search_call';
|
|
2054
|
+
/**
|
|
2055
|
+
* A signature hash for backend validation.
|
|
2056
|
+
*/
|
|
2057
|
+
signature?: string;
|
|
1922
2058
|
}
|
|
1923
2059
|
interface FileSearchResultDelta {
|
|
1924
2060
|
type: 'file_search_result';
|
|
@@ -2501,6 +2637,12 @@ export declare interface CreateTuningJobParametersPrivate {
|
|
|
2501
2637
|
*/
|
|
2502
2638
|
export declare function createUserContent(partOrString: PartListUnion | string): Content;
|
|
2503
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
|
+
|
|
2504
2646
|
/** User provided metadata stored as key-value pairs. This data type is not supported in Vertex AI. */
|
|
2505
2647
|
export declare interface CustomMetadata {
|
|
2506
2648
|
/** Required. The key of the metadata to store. */
|
|
@@ -2513,6 +2655,12 @@ export declare interface CustomMetadata {
|
|
|
2513
2655
|
stringValue?: string;
|
|
2514
2656
|
}
|
|
2515
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
|
+
|
|
2516
2664
|
/** Distribution computed over a tuning dataset. This data type is not supported in Gemini API. */
|
|
2517
2665
|
export declare interface DatasetDistribution {
|
|
2518
2666
|
/** Output only. Defines the histogram bucket. */
|
|
@@ -2545,6 +2693,10 @@ export declare interface DatasetDistributionDistributionBucket {
|
|
|
2545
2693
|
|
|
2546
2694
|
/** Statistics computed over a tuning dataset. This data type is not supported in Gemini API. */
|
|
2547
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[];
|
|
2548
2700
|
/** Output only. Number of billable characters in the tuning dataset. */
|
|
2549
2701
|
totalBillableCharacterCount?: string;
|
|
2550
2702
|
/** Output only. Number of tuning characters in the tuning dataset. */
|
|
@@ -2740,7 +2892,7 @@ export declare interface DeleteResourceJob {
|
|
|
2740
2892
|
error?: JobError;
|
|
2741
2893
|
}
|
|
2742
2894
|
|
|
2743
|
-
/** 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. */
|
|
2744
2896
|
export declare interface DistillationDataStats {
|
|
2745
2897
|
/** Output only. Statistics computed for the training dataset. */
|
|
2746
2898
|
trainingDatasetStats?: DatasetStats;
|
|
@@ -3132,9 +3284,9 @@ export declare interface EmbeddingsBatchJobSource {
|
|
|
3132
3284
|
inlinedRequests?: EmbedContentBatch;
|
|
3133
3285
|
}
|
|
3134
3286
|
|
|
3135
|
-
/** 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. */
|
|
3136
3288
|
export declare interface EncryptionSpec {
|
|
3137
|
-
/** 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}`. */
|
|
3138
3290
|
kmsKeyName?: string;
|
|
3139
3291
|
}
|
|
3140
3292
|
|
|
@@ -3164,10 +3316,10 @@ export declare enum EndSensitivity {
|
|
|
3164
3316
|
|
|
3165
3317
|
/** Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. This data type is not supported in Gemini API. */
|
|
3166
3318
|
export declare interface EnterpriseWebSearch {
|
|
3167
|
-
/** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. */
|
|
3168
|
-
excludeDomains?: string[];
|
|
3169
3319
|
/** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. */
|
|
3170
3320
|
blockingConfidence?: PhishBlockThreshold;
|
|
3321
|
+
/** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. */
|
|
3322
|
+
excludeDomains?: string[];
|
|
3171
3323
|
}
|
|
3172
3324
|
|
|
3173
3325
|
/** An entity representing the segmented area. */
|
|
@@ -3236,6 +3388,42 @@ declare namespace Errors {
|
|
|
3236
3388
|
}
|
|
3237
3389
|
}
|
|
3238
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
|
+
|
|
3239
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. */
|
|
3240
3428
|
export declare interface ExecutableCode {
|
|
3241
3429
|
/** Required. The code to be executed. */
|
|
@@ -3346,11 +3534,11 @@ declare interface File_2 {
|
|
|
3346
3534
|
}
|
|
3347
3535
|
export { File_2 as File }
|
|
3348
3536
|
|
|
3349
|
-
/** 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. */
|
|
3350
3538
|
export declare interface FileData {
|
|
3351
|
-
/** 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. */
|
|
3352
3540
|
displayName?: string;
|
|
3353
|
-
/** Required. URI. */
|
|
3541
|
+
/** Required. The URI of the file in Google Cloud Storage. */
|
|
3354
3542
|
fileUri?: string;
|
|
3355
3543
|
/** Required. The IANA standard MIME type of the source data. */
|
|
3356
3544
|
mimeType?: string;
|
|
@@ -3496,6 +3684,10 @@ declare interface FileSearchCallContent {
|
|
|
3496
3684
|
*/
|
|
3497
3685
|
id: string;
|
|
3498
3686
|
type: 'file_search_call';
|
|
3687
|
+
/**
|
|
3688
|
+
* A signature hash for backend validation.
|
|
3689
|
+
*/
|
|
3690
|
+
signature?: string;
|
|
3499
3691
|
}
|
|
3500
3692
|
|
|
3501
3693
|
/**
|
|
@@ -3511,6 +3703,10 @@ declare interface FileSearchResultContent {
|
|
|
3511
3703
|
* The results of the File Search.
|
|
3512
3704
|
*/
|
|
3513
3705
|
result?: Array<FileSearchResultContent.Result>;
|
|
3706
|
+
/**
|
|
3707
|
+
* A signature hash for backend validation.
|
|
3708
|
+
*/
|
|
3709
|
+
signature?: string;
|
|
3514
3710
|
}
|
|
3515
3711
|
|
|
3516
3712
|
declare namespace FileSearchResultContent {
|
|
@@ -3769,6 +3965,16 @@ export declare enum FinishReason {
|
|
|
3769
3965
|
IMAGE_OTHER = "IMAGE_OTHER"
|
|
3770
3966
|
}
|
|
3771
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
|
+
|
|
3772
3978
|
/**
|
|
3773
3979
|
* A tool that can be used by the model.
|
|
3774
3980
|
*/
|
|
@@ -3822,6 +4028,10 @@ declare interface FunctionCallContent {
|
|
|
3822
4028
|
*/
|
|
3823
4029
|
name: string;
|
|
3824
4030
|
type: 'function_call';
|
|
4031
|
+
/**
|
|
4032
|
+
* A signature hash for backend validation.
|
|
4033
|
+
*/
|
|
4034
|
+
signature?: string;
|
|
3825
4035
|
}
|
|
3826
4036
|
|
|
3827
4037
|
/** Function calling config. */
|
|
@@ -3862,7 +4072,7 @@ export declare enum FunctionCallingConfigMode {
|
|
|
3862
4072
|
export declare interface FunctionDeclaration {
|
|
3863
4073
|
/** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */
|
|
3864
4074
|
description?: string;
|
|
3865
|
-
/** 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. */
|
|
3866
4076
|
name?: string;
|
|
3867
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 */
|
|
3868
4078
|
parameters?: Schema;
|
|
@@ -3976,6 +4186,10 @@ declare interface FunctionResultContent {
|
|
|
3976
4186
|
* The name of the tool that was called.
|
|
3977
4187
|
*/
|
|
3978
4188
|
name?: string;
|
|
4189
|
+
/**
|
|
4190
|
+
* A signature hash for backend validation.
|
|
4191
|
+
*/
|
|
4192
|
+
signature?: string;
|
|
3979
4193
|
}
|
|
3980
4194
|
|
|
3981
4195
|
declare namespace FunctionResultContent {
|
|
@@ -3984,6 +4198,12 @@ declare namespace FunctionResultContent {
|
|
|
3984
4198
|
}
|
|
3985
4199
|
}
|
|
3986
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
|
+
|
|
3987
4207
|
/**
|
|
3988
4208
|
* @license
|
|
3989
4209
|
* Copyright 2025 Google LLC
|
|
@@ -4619,45 +4839,45 @@ export declare interface GenerationConfig {
|
|
|
4619
4839
|
`response_schema` that accepts [JSON Schema](https://json-schema.org/).
|
|
4620
4840
|
*/
|
|
4621
4841
|
responseJsonSchema?: unknown;
|
|
4622
|
-
/** 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. */
|
|
4623
4843
|
audioTimestamp?: boolean;
|
|
4624
|
-
/** 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. */
|
|
4625
4845
|
candidateCount?: number;
|
|
4626
|
-
/** 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. */
|
|
4627
4847
|
enableAffectiveDialog?: boolean;
|
|
4628
|
-
/** 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]. */
|
|
4629
4849
|
frequencyPenalty?: number;
|
|
4630
|
-
/** 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. */
|
|
4631
4851
|
logprobs?: number;
|
|
4632
|
-
/** 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. */
|
|
4633
4853
|
maxOutputTokens?: number;
|
|
4634
|
-
/** 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. */
|
|
4635
4855
|
mediaResolution?: MediaResolution;
|
|
4636
|
-
/** 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]. */
|
|
4637
4857
|
presencePenalty?: number;
|
|
4638
|
-
/** 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. */
|
|
4639
4859
|
responseLogprobs?: boolean;
|
|
4640
|
-
/** 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. */
|
|
4641
4861
|
responseMimeType?: string;
|
|
4642
|
-
/** 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. */
|
|
4643
4863
|
responseModalities?: Modality[];
|
|
4644
|
-
/** 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`. */
|
|
4645
4865
|
responseSchema?: Schema;
|
|
4646
4866
|
/** Optional. Routing configuration. This field is not supported in Gemini API. */
|
|
4647
4867
|
routingConfig?: GenerationConfigRoutingConfig;
|
|
4648
|
-
/** 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. */
|
|
4649
4869
|
seed?: number;
|
|
4650
4870
|
/** Optional. The speech generation config. */
|
|
4651
4871
|
speechConfig?: SpeechConfig;
|
|
4652
|
-
/** 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. */
|
|
4653
4873
|
stopSequences?: string[];
|
|
4654
|
-
/** 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]. */
|
|
4655
4875
|
temperature?: number;
|
|
4656
|
-
/** Optional.
|
|
4876
|
+
/** Optional. Configuration for thinking features. An error will be returned if this field is set for models that don't support thinking. */
|
|
4657
4877
|
thinkingConfig?: ThinkingConfig;
|
|
4658
|
-
/** 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. */
|
|
4659
4879
|
topK?: number;
|
|
4660
|
-
/** 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. */
|
|
4661
4881
|
topP?: number;
|
|
4662
4882
|
/** Optional. Enables enhanced civic answers. It may not be available for all models. This field is not supported in Vertex AI. */
|
|
4663
4883
|
enableEnhancedCivicAnswers?: boolean;
|
|
@@ -4709,23 +4929,23 @@ declare interface GenerationConfig_2 {
|
|
|
4709
4929
|
top_p?: number;
|
|
4710
4930
|
}
|
|
4711
4931
|
|
|
4712
|
-
/** 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. */
|
|
4713
4933
|
export declare interface GenerationConfigRoutingConfig {
|
|
4714
|
-
/**
|
|
4934
|
+
/** In this mode, the model is selected automatically based on the content of the request. */
|
|
4715
4935
|
autoMode?: GenerationConfigRoutingConfigAutoRoutingMode;
|
|
4716
|
-
/**
|
|
4936
|
+
/** In this mode, the model is specified manually. */
|
|
4717
4937
|
manualMode?: GenerationConfigRoutingConfigManualRoutingMode;
|
|
4718
4938
|
}
|
|
4719
4939
|
|
|
4720
|
-
/** 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. */
|
|
4721
4941
|
export declare interface GenerationConfigRoutingConfigAutoRoutingMode {
|
|
4722
4942
|
/** The model routing preference. */
|
|
4723
4943
|
modelRoutingPreference?: 'UNKNOWN' | 'PRIORITIZE_QUALITY' | 'BALANCED' | 'PRIORITIZE_COST';
|
|
4724
4944
|
}
|
|
4725
4945
|
|
|
4726
|
-
/** 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. */
|
|
4727
4947
|
export declare interface GenerationConfigRoutingConfigManualRoutingMode {
|
|
4728
|
-
/** The model
|
|
4948
|
+
/** The name of the model to use. Only public LLM models are accepted. */
|
|
4729
4949
|
modelName?: string;
|
|
4730
4950
|
}
|
|
4731
4951
|
|
|
@@ -5027,11 +5247,11 @@ export declare interface GoogleGenAIOptions {
|
|
|
5027
5247
|
httpOptions?: HttpOptions;
|
|
5028
5248
|
}
|
|
5029
5249
|
|
|
5030
|
-
/** Tool to retrieve
|
|
5250
|
+
/** Tool to retrieve knowledge from Google Maps. */
|
|
5031
5251
|
export declare interface GoogleMaps {
|
|
5032
5252
|
/** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
|
|
5033
5253
|
authConfig?: AuthConfig;
|
|
5034
|
-
/** 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. */
|
|
5035
5255
|
enableWidget?: boolean;
|
|
5036
5256
|
}
|
|
5037
5257
|
|
|
@@ -5049,10 +5269,10 @@ export declare interface GoogleRpcStatus {
|
|
|
5049
5269
|
export declare interface GoogleSearch {
|
|
5050
5270
|
/** Different types of search that can be enabled on the GoogleSearch tool. */
|
|
5051
5271
|
searchTypes?: SearchTypes;
|
|
5052
|
-
/** 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. */
|
|
5053
|
-
excludeDomains?: string[];
|
|
5054
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. */
|
|
5055
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[];
|
|
5056
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. */
|
|
5057
5277
|
timeRangeFilter?: Interval;
|
|
5058
5278
|
}
|
|
@@ -5084,6 +5304,10 @@ declare interface GoogleSearchCallContent {
|
|
|
5084
5304
|
* The type of search grounding enabled.
|
|
5085
5305
|
*/
|
|
5086
5306
|
search_type?: 'web_search' | 'image_search';
|
|
5307
|
+
/**
|
|
5308
|
+
* A signature hash for backend validation.
|
|
5309
|
+
*/
|
|
5310
|
+
signature?: string;
|
|
5087
5311
|
}
|
|
5088
5312
|
|
|
5089
5313
|
/**
|
|
@@ -5122,7 +5346,7 @@ declare interface GoogleSearchResultContent {
|
|
|
5122
5346
|
*/
|
|
5123
5347
|
is_error?: boolean;
|
|
5124
5348
|
/**
|
|
5125
|
-
*
|
|
5349
|
+
* A signature hash for backend validation.
|
|
5126
5350
|
*/
|
|
5127
5351
|
signature?: string;
|
|
5128
5352
|
}
|
|
@@ -5153,11 +5377,15 @@ export declare interface GroundingChunk {
|
|
|
5153
5377
|
message for details.
|
|
5154
5378
|
*/
|
|
5155
5379
|
image?: GroundingChunkImage;
|
|
5156
|
-
/**
|
|
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. */
|
|
5157
5385
|
maps?: GroundingChunkMaps;
|
|
5158
|
-
/**
|
|
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. */
|
|
5159
5387
|
retrievedContext?: GroundingChunkRetrievedContext;
|
|
5160
|
-
/**
|
|
5388
|
+
/** A grounding chunk from a web page, typically from Google Search. See the `Web` message for details. */
|
|
5161
5389
|
web?: GroundingChunkWeb;
|
|
5162
5390
|
}
|
|
5163
5391
|
|
|
@@ -5177,29 +5405,42 @@ export declare interface GroundingChunkImage {
|
|
|
5177
5405
|
domain?: string;
|
|
5178
5406
|
}
|
|
5179
5407
|
|
|
5180
|
-
/**
|
|
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. */
|
|
5181
5412
|
export declare interface GroundingChunkMaps {
|
|
5182
|
-
/**
|
|
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. */
|
|
5183
5417
|
placeAnswerSources?: GroundingChunkMapsPlaceAnswerSources;
|
|
5184
|
-
/** 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. */
|
|
5185
5421
|
placeId?: string;
|
|
5186
|
-
/**
|
|
5422
|
+
/** The text of the place answer. */
|
|
5187
5423
|
text?: string;
|
|
5188
|
-
/**
|
|
5424
|
+
/** The title of the place. */
|
|
5189
5425
|
title?: string;
|
|
5190
|
-
/** URI
|
|
5426
|
+
/** The URI of the place. */
|
|
5191
5427
|
uri?: string;
|
|
5192
5428
|
}
|
|
5193
5429
|
|
|
5194
|
-
/**
|
|
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. */
|
|
5195
5434
|
export declare interface GroundingChunkMapsPlaceAnswerSources {
|
|
5435
|
+
/** Snippets of reviews that were used to generate the answer. */
|
|
5436
|
+
reviewSnippet?: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet[];
|
|
5196
5437
|
/** A link where users can flag a problem with the generated answer. */
|
|
5197
5438
|
flagContentUri?: string;
|
|
5198
|
-
/** Snippets of reviews that
|
|
5439
|
+
/** Snippets of reviews that were used to generate the answer. */
|
|
5199
5440
|
reviewSnippets?: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet[];
|
|
5200
5441
|
}
|
|
5201
5442
|
|
|
5202
|
-
/** Author attribution for a photo or review.
|
|
5443
|
+
/** Author attribution for a photo or review. */
|
|
5203
5444
|
export declare interface GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution {
|
|
5204
5445
|
/** Name of the author of the Photo or Review. */
|
|
5205
5446
|
displayName?: string;
|
|
@@ -5209,7 +5450,7 @@ export declare interface GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution {
|
|
|
5209
5450
|
uri?: string;
|
|
5210
5451
|
}
|
|
5211
5452
|
|
|
5212
|
-
/** Encapsulates a review snippet.
|
|
5453
|
+
/** Encapsulates a review snippet. */
|
|
5213
5454
|
export declare interface GroundingChunkMapsPlaceAnswerSourcesReviewSnippet {
|
|
5214
5455
|
/** This review's author. */
|
|
5215
5456
|
authorAttribution?: GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution;
|
|
@@ -5227,30 +5468,31 @@ export declare interface GroundingChunkMapsPlaceAnswerSourcesReviewSnippet {
|
|
|
5227
5468
|
title?: string;
|
|
5228
5469
|
}
|
|
5229
5470
|
|
|
5230
|
-
/**
|
|
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. */
|
|
5231
5472
|
export declare interface GroundingChunkRetrievedContext {
|
|
5232
|
-
/** 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}`. */
|
|
5233
5474
|
documentName?: string;
|
|
5234
|
-
/** 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. */
|
|
5235
5476
|
ragChunk?: RagChunk;
|
|
5236
|
-
/**
|
|
5477
|
+
/** The content of the retrieved data source. */
|
|
5237
5478
|
text?: string;
|
|
5238
|
-
/**
|
|
5479
|
+
/** The title of the retrieved data source. */
|
|
5239
5480
|
title?: string;
|
|
5240
|
-
/** URI
|
|
5481
|
+
/** The URI of the retrieved data source. */
|
|
5241
5482
|
uri?: string;
|
|
5242
5483
|
}
|
|
5243
5484
|
|
|
5244
|
-
/**
|
|
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. */
|
|
5245
5486
|
export declare interface GroundingChunkWeb {
|
|
5246
|
-
/**
|
|
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. */
|
|
5247
5488
|
domain?: string;
|
|
5248
|
-
/**
|
|
5489
|
+
/** The title of the web page that contains the evidence. */
|
|
5249
5490
|
title?: string;
|
|
5250
|
-
/** URI
|
|
5491
|
+
/** The URI of the web page that contains the evidence. */
|
|
5251
5492
|
uri?: string;
|
|
5252
5493
|
}
|
|
5253
5494
|
|
|
5495
|
+
/** Information for various kinds of grounding. */
|
|
5254
5496
|
export declare interface GroundingMetadata {
|
|
5255
5497
|
/** Optional. The image search queries that were used to generate the
|
|
5256
5498
|
content. This field is populated only when the grounding source is Google
|
|
@@ -5262,41 +5504,48 @@ export declare interface GroundingMetadata {
|
|
|
5262
5504
|
Search, Vertex AI Search, or Google Maps.
|
|
5263
5505
|
*/
|
|
5264
5506
|
groundingChunks?: GroundingChunk[];
|
|
5265
|
-
/**
|
|
5266
|
-
googleMapsWidgetContextToken?: string;
|
|
5267
|
-
/** Optional. List of grounding support. */
|
|
5507
|
+
/** List of grounding support. */
|
|
5268
5508
|
groundingSupports?: GroundingSupport[];
|
|
5269
|
-
/**
|
|
5509
|
+
/** Metadata related to retrieval in the grounding flow. */
|
|
5270
5510
|
retrievalMetadata?: RetrievalMetadata;
|
|
5271
|
-
/** Optional.
|
|
5272
|
-
|
|
5273
|
-
/** Optional. Google search entry for the following-up web searches. */
|
|
5511
|
+
/** Optional. Google search entry for the following-up web
|
|
5512
|
+
searches. */
|
|
5274
5513
|
searchEntryPoint?: SearchEntryPoint;
|
|
5275
|
-
/**
|
|
5276
|
-
sourceFlaggingUris?: GroundingMetadataSourceFlaggingUri[];
|
|
5277
|
-
/** Optional. Web search queries for the following-up web search. */
|
|
5514
|
+
/** Web search queries for the following-up web search. */
|
|
5278
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[];
|
|
5279
5522
|
}
|
|
5280
5523
|
|
|
5281
|
-
/**
|
|
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. */
|
|
5282
5525
|
export declare interface GroundingMetadataSourceFlaggingUri {
|
|
5283
|
-
/**
|
|
5526
|
+
/** The URI that can be used to flag the content. */
|
|
5284
5527
|
flagContentUri?: string;
|
|
5285
|
-
/**
|
|
5528
|
+
/** The ID of the place or review. */
|
|
5286
5529
|
sourceId?: string;
|
|
5287
5530
|
}
|
|
5288
5531
|
|
|
5289
5532
|
/** Grounding support. */
|
|
5290
5533
|
export declare interface GroundingSupport {
|
|
5291
|
-
/** 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. */
|
|
5292
5538
|
confidenceScores?: number[];
|
|
5293
|
-
/** 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. */
|
|
5294
5543
|
groundingChunkIndices?: number[];
|
|
5295
5544
|
/** Segment of the content this support belongs to. */
|
|
5296
5545
|
segment?: Segment;
|
|
5297
5546
|
}
|
|
5298
5547
|
|
|
5299
|
-
/**
|
|
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. */
|
|
5300
5549
|
export declare enum HarmBlockMethod {
|
|
5301
5550
|
/**
|
|
5302
5551
|
* The harm block method is unspecified.
|
|
@@ -5312,54 +5561,54 @@ export declare enum HarmBlockMethod {
|
|
|
5312
5561
|
PROBABILITY = "PROBABILITY"
|
|
5313
5562
|
}
|
|
5314
5563
|
|
|
5315
|
-
/** The harm
|
|
5564
|
+
/** The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
|
|
5316
5565
|
export declare enum HarmBlockThreshold {
|
|
5317
5566
|
/**
|
|
5318
|
-
*
|
|
5567
|
+
* The harm block threshold is unspecified.
|
|
5319
5568
|
*/
|
|
5320
5569
|
HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
|
|
5321
5570
|
/**
|
|
5322
|
-
* Block
|
|
5571
|
+
* Block content with a low harm probability or higher.
|
|
5323
5572
|
*/
|
|
5324
5573
|
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
|
|
5325
5574
|
/**
|
|
5326
|
-
* Block medium
|
|
5575
|
+
* Block content with a medium harm probability or higher.
|
|
5327
5576
|
*/
|
|
5328
5577
|
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
|
|
5329
5578
|
/**
|
|
5330
|
-
* Block
|
|
5579
|
+
* Block content with a high harm probability.
|
|
5331
5580
|
*/
|
|
5332
5581
|
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
|
|
5333
5582
|
/**
|
|
5334
|
-
*
|
|
5583
|
+
* Do not block any content, regardless of its harm probability.
|
|
5335
5584
|
*/
|
|
5336
5585
|
BLOCK_NONE = "BLOCK_NONE",
|
|
5337
5586
|
/**
|
|
5338
|
-
* Turn off the safety filter.
|
|
5587
|
+
* Turn off the safety filter entirely.
|
|
5339
5588
|
*/
|
|
5340
5589
|
OFF = "OFF"
|
|
5341
5590
|
}
|
|
5342
5591
|
|
|
5343
|
-
/**
|
|
5592
|
+
/** The harm category to be blocked. */
|
|
5344
5593
|
export declare enum HarmCategory {
|
|
5345
5594
|
/**
|
|
5346
|
-
*
|
|
5595
|
+
* Default value. This value is unused.
|
|
5347
5596
|
*/
|
|
5348
5597
|
HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED",
|
|
5349
5598
|
/**
|
|
5350
|
-
*
|
|
5599
|
+
* Abusive, threatening, or content intended to bully, torment, or ridicule.
|
|
5351
5600
|
*/
|
|
5352
5601
|
HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT",
|
|
5353
5602
|
/**
|
|
5354
|
-
*
|
|
5603
|
+
* Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
|
|
5355
5604
|
*/
|
|
5356
5605
|
HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
|
|
5357
5606
|
/**
|
|
5358
|
-
*
|
|
5607
|
+
* Content that contains sexually explicit material.
|
|
5359
5608
|
*/
|
|
5360
5609
|
HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
|
5361
5610
|
/**
|
|
5362
|
-
*
|
|
5611
|
+
* Content that promotes, facilitates, or enables dangerous activities.
|
|
5363
5612
|
*/
|
|
5364
5613
|
HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
|
|
5365
5614
|
/**
|
|
@@ -5367,71 +5616,71 @@ export declare enum HarmCategory {
|
|
|
5367
5616
|
*/
|
|
5368
5617
|
HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY",
|
|
5369
5618
|
/**
|
|
5370
|
-
*
|
|
5619
|
+
* Images that contain hate speech. This enum value is not supported in Gemini API.
|
|
5371
5620
|
*/
|
|
5372
5621
|
HARM_CATEGORY_IMAGE_HATE = "HARM_CATEGORY_IMAGE_HATE",
|
|
5373
5622
|
/**
|
|
5374
|
-
*
|
|
5623
|
+
* Images that contain dangerous content. This enum value is not supported in Gemini API.
|
|
5375
5624
|
*/
|
|
5376
5625
|
HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT",
|
|
5377
5626
|
/**
|
|
5378
|
-
*
|
|
5627
|
+
* Images that contain harassment. This enum value is not supported in Gemini API.
|
|
5379
5628
|
*/
|
|
5380
5629
|
HARM_CATEGORY_IMAGE_HARASSMENT = "HARM_CATEGORY_IMAGE_HARASSMENT",
|
|
5381
5630
|
/**
|
|
5382
|
-
*
|
|
5631
|
+
* Images that contain sexually explicit content. This enum value is not supported in Gemini API.
|
|
5383
5632
|
*/
|
|
5384
5633
|
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT",
|
|
5385
5634
|
/**
|
|
5386
|
-
*
|
|
5635
|
+
* Prompts designed to bypass safety filters. This enum value is not supported in Gemini API.
|
|
5387
5636
|
*/
|
|
5388
5637
|
HARM_CATEGORY_JAILBREAK = "HARM_CATEGORY_JAILBREAK"
|
|
5389
5638
|
}
|
|
5390
5639
|
|
|
5391
|
-
/** Output only.
|
|
5640
|
+
/** Output only. The probability of harm for this category. */
|
|
5392
5641
|
export declare enum HarmProbability {
|
|
5393
5642
|
/**
|
|
5394
|
-
*
|
|
5643
|
+
* The harm probability is unspecified.
|
|
5395
5644
|
*/
|
|
5396
5645
|
HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED",
|
|
5397
5646
|
/**
|
|
5398
|
-
*
|
|
5647
|
+
* The harm probability is negligible.
|
|
5399
5648
|
*/
|
|
5400
5649
|
NEGLIGIBLE = "NEGLIGIBLE",
|
|
5401
5650
|
/**
|
|
5402
|
-
*
|
|
5651
|
+
* The harm probability is low.
|
|
5403
5652
|
*/
|
|
5404
5653
|
LOW = "LOW",
|
|
5405
5654
|
/**
|
|
5406
|
-
*
|
|
5655
|
+
* The harm probability is medium.
|
|
5407
5656
|
*/
|
|
5408
5657
|
MEDIUM = "MEDIUM",
|
|
5409
5658
|
/**
|
|
5410
|
-
*
|
|
5659
|
+
* The harm probability is high.
|
|
5411
5660
|
*/
|
|
5412
5661
|
HIGH = "HIGH"
|
|
5413
5662
|
}
|
|
5414
5663
|
|
|
5415
|
-
/** Output only.
|
|
5664
|
+
/** Output only. The severity of harm for this category. This enum is not supported in Gemini API. */
|
|
5416
5665
|
export declare enum HarmSeverity {
|
|
5417
5666
|
/**
|
|
5418
|
-
*
|
|
5667
|
+
* The harm severity is unspecified.
|
|
5419
5668
|
*/
|
|
5420
5669
|
HARM_SEVERITY_UNSPECIFIED = "HARM_SEVERITY_UNSPECIFIED",
|
|
5421
5670
|
/**
|
|
5422
|
-
*
|
|
5671
|
+
* The harm severity is negligible.
|
|
5423
5672
|
*/
|
|
5424
5673
|
HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE",
|
|
5425
5674
|
/**
|
|
5426
|
-
*
|
|
5675
|
+
* The harm severity is low.
|
|
5427
5676
|
*/
|
|
5428
5677
|
HARM_SEVERITY_LOW = "HARM_SEVERITY_LOW",
|
|
5429
5678
|
/**
|
|
5430
|
-
*
|
|
5679
|
+
* The harm severity is medium.
|
|
5431
5680
|
*/
|
|
5432
5681
|
HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM",
|
|
5433
5682
|
/**
|
|
5434
|
-
*
|
|
5683
|
+
* The harm severity is high.
|
|
5435
5684
|
*/
|
|
5436
5685
|
HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH"
|
|
5437
5686
|
}
|
|
@@ -5599,6 +5848,8 @@ export declare interface ImageConfig {
|
|
|
5599
5848
|
/** Compression quality of the generated image (for
|
|
5600
5849
|
``image/jpeg`` only). This field is not supported in Gemini API. */
|
|
5601
5850
|
outputCompressionQuality?: number;
|
|
5851
|
+
/** Optional. The image output format for generated images. */
|
|
5852
|
+
imageOutputOptions?: ImageConfigImageOutputOptions;
|
|
5602
5853
|
}
|
|
5603
5854
|
|
|
5604
5855
|
/**
|
|
@@ -5609,6 +5860,14 @@ declare interface ImageConfig_2 {
|
|
|
5609
5860
|
image_size?: '1K' | '2K' | '4K' | '512';
|
|
5610
5861
|
}
|
|
5611
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;
|
|
5869
|
+
}
|
|
5870
|
+
|
|
5612
5871
|
/**
|
|
5613
5872
|
* An image content block.
|
|
5614
5873
|
*/
|
|
@@ -6326,9 +6585,9 @@ export declare interface ListTuningJobsParameters {
|
|
|
6326
6585
|
export declare class ListTuningJobsResponse {
|
|
6327
6586
|
/** Used to retain the full HTTP response. */
|
|
6328
6587
|
sdkHttpResponse?: HttpResponse;
|
|
6329
|
-
/** 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. */
|
|
6330
6589
|
nextPageToken?: string;
|
|
6331
|
-
/**
|
|
6590
|
+
/** The tuning jobs that match the request. */
|
|
6332
6591
|
tuningJobs?: TuningJob[];
|
|
6333
6592
|
}
|
|
6334
6593
|
|
|
@@ -7114,27 +7373,27 @@ declare type Logger = {
|
|
|
7114
7373
|
|
|
7115
7374
|
declare type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug';
|
|
7116
7375
|
|
|
7117
|
-
/**
|
|
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. */
|
|
7118
7377
|
export declare interface LogprobsResult {
|
|
7119
|
-
/**
|
|
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`. */
|
|
7120
7379
|
chosenCandidates?: LogprobsResultCandidate[];
|
|
7121
|
-
/**
|
|
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. */
|
|
7122
7381
|
topCandidates?: LogprobsResultTopCandidates[];
|
|
7123
7382
|
}
|
|
7124
7383
|
|
|
7125
|
-
/**
|
|
7384
|
+
/** A single token and its associated log probability. */
|
|
7126
7385
|
export declare interface LogprobsResultCandidate {
|
|
7127
|
-
/** 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. */
|
|
7128
7387
|
logProbability?: number;
|
|
7129
|
-
/** The
|
|
7388
|
+
/** The token's string representation. */
|
|
7130
7389
|
token?: string;
|
|
7131
|
-
/** 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. */
|
|
7132
7391
|
tokenId?: number;
|
|
7133
7392
|
}
|
|
7134
7393
|
|
|
7135
|
-
/**
|
|
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. */
|
|
7136
7395
|
export declare interface LogprobsResultTopCandidates {
|
|
7137
|
-
/**
|
|
7396
|
+
/** The list of candidate tokens, sorted by log probability in descending order. */
|
|
7138
7397
|
candidates?: LogprobsResultCandidate[];
|
|
7139
7398
|
}
|
|
7140
7399
|
|
|
@@ -7213,6 +7472,10 @@ declare interface MCPServerToolCallContent {
|
|
|
7213
7472
|
*/
|
|
7214
7473
|
server_name: string;
|
|
7215
7474
|
type: 'mcp_server_tool_call';
|
|
7475
|
+
/**
|
|
7476
|
+
* A signature hash for backend validation.
|
|
7477
|
+
*/
|
|
7478
|
+
signature?: string;
|
|
7216
7479
|
}
|
|
7217
7480
|
|
|
7218
7481
|
/**
|
|
@@ -7236,6 +7499,10 @@ declare interface MCPServerToolResultContent {
|
|
|
7236
7499
|
* The name of the used MCP server.
|
|
7237
7500
|
*/
|
|
7238
7501
|
server_name?: string;
|
|
7502
|
+
/**
|
|
7503
|
+
* A signature hash for backend validation.
|
|
7504
|
+
*/
|
|
7505
|
+
signature?: string;
|
|
7239
7506
|
}
|
|
7240
7507
|
|
|
7241
7508
|
declare namespace MCPServerToolResultContent {
|
|
@@ -7336,7 +7603,7 @@ export declare enum Modality {
|
|
|
7336
7603
|
export declare interface ModalityTokenCount {
|
|
7337
7604
|
/** The modality associated with this token count. */
|
|
7338
7605
|
modality?: MediaModality;
|
|
7339
|
-
/**
|
|
7606
|
+
/** The number of tokens counted for this modality. */
|
|
7340
7607
|
tokenCount?: number;
|
|
7341
7608
|
}
|
|
7342
7609
|
|
|
@@ -7398,13 +7665,13 @@ export declare interface Model {
|
|
|
7398
7665
|
/**
|
|
7399
7666
|
* The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
|
|
7400
7667
|
*/
|
|
7401
|
-
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' | (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 & {});
|
|
7402
7669
|
|
|
7403
|
-
/** 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. */
|
|
7404
7671
|
export declare interface ModelArmorConfig {
|
|
7405
|
-
/** 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}`. */
|
|
7406
7673
|
promptTemplateName?: string;
|
|
7407
|
-
/** 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}`. */
|
|
7408
7675
|
responseTemplateName?: string;
|
|
7409
7676
|
}
|
|
7410
7677
|
|
|
@@ -7951,6 +8218,12 @@ export declare enum Outcome {
|
|
|
7951
8218
|
OUTCOME_DEADLINE_EXCEEDED = "OUTCOME_DEADLINE_EXCEEDED"
|
|
7952
8219
|
}
|
|
7953
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
|
+
|
|
7954
8227
|
/**
|
|
7955
8228
|
* Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
|
|
7956
8229
|
*/
|
|
@@ -8098,6 +8371,36 @@ export declare class Pager<T> implements AsyncIterable<T> {
|
|
|
8098
8371
|
hasNextPage(): boolean;
|
|
8099
8372
|
}
|
|
8100
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
|
+
|
|
8101
8404
|
/** A datatype containing media content.
|
|
8102
8405
|
|
|
8103
8406
|
Exactly one field within a Part should be set, representing the specific type
|
|
@@ -8107,21 +8410,21 @@ export declare interface Part {
|
|
|
8107
8410
|
/** Media resolution for the input media.
|
|
8108
8411
|
*/
|
|
8109
8412
|
mediaResolution?: PartMediaResolution;
|
|
8110
|
-
/** Optional.
|
|
8413
|
+
/** Optional. The result of executing the ExecutableCode. */
|
|
8111
8414
|
codeExecutionResult?: CodeExecutionResult;
|
|
8112
|
-
/** Optional. Code generated by the model that is
|
|
8415
|
+
/** Optional. Code generated by the model that is intended to be executed. */
|
|
8113
8416
|
executableCode?: ExecutableCode;
|
|
8114
|
-
/** Optional. URI
|
|
8417
|
+
/** Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage. */
|
|
8115
8418
|
fileData?: FileData;
|
|
8116
|
-
/** 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. */
|
|
8117
8420
|
functionCall?: FunctionCall;
|
|
8118
|
-
/** 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. */
|
|
8119
8422
|
functionResponse?: FunctionResponse;
|
|
8120
|
-
/** Optional.
|
|
8423
|
+
/** Optional. The inline data content of the part. This can be used to include images, audio, or video in a request. */
|
|
8121
8424
|
inlineData?: Blob_2;
|
|
8122
|
-
/** 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. */
|
|
8123
8426
|
text?: string;
|
|
8124
|
-
/** Optional. Indicates
|
|
8427
|
+
/** Optional. Indicates whether the `part` represents the model's thought process or reasoning. */
|
|
8125
8428
|
thought?: boolean;
|
|
8126
8429
|
/** Optional. An opaque signature for the thought so it can be reused in subsequent requests.
|
|
8127
8430
|
* @remarks Encoded as base64 string. */
|
|
@@ -8132,16 +8435,16 @@ export declare interface Part {
|
|
|
8132
8435
|
|
|
8133
8436
|
/** Partial argument value of the function call. This data type is not supported in Gemini API. */
|
|
8134
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;
|
|
8135
8442
|
/** Optional. Represents a null value. */
|
|
8136
8443
|
nullValue?: 'NULL_VALUE';
|
|
8137
8444
|
/** Optional. Represents a double value. */
|
|
8138
8445
|
numberValue?: number;
|
|
8139
8446
|
/** Optional. Represents a string value. */
|
|
8140
8447
|
stringValue?: string;
|
|
8141
|
-
/** Optional. Represents a boolean value. */
|
|
8142
|
-
boolValue?: boolean;
|
|
8143
|
-
/** Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". */
|
|
8144
|
-
jsonPath?: string;
|
|
8145
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. */
|
|
8146
8449
|
willContinue?: boolean;
|
|
8147
8450
|
}
|
|
@@ -8245,14 +8548,28 @@ export declare enum PhishBlockThreshold {
|
|
|
8245
8548
|
BLOCK_ONLY_EXTREMELY_HIGH = "BLOCK_ONLY_EXTREMELY_HIGH"
|
|
8246
8549
|
}
|
|
8247
8550
|
|
|
8248
|
-
/**
|
|
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. */
|
|
8249
8562
|
export declare interface PrebuiltVoiceConfig {
|
|
8250
|
-
/** The name of the
|
|
8563
|
+
/** The name of the prebuilt voice to use. */
|
|
8251
8564
|
voiceName?: string;
|
|
8252
8565
|
}
|
|
8253
8566
|
|
|
8254
8567
|
/** Statistics computed for datasets used for preference optimization. This data type is not supported in Gemini API. */
|
|
8255
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[];
|
|
8256
8573
|
/** Output only. Dataset distributions for scores variance per example. */
|
|
8257
8574
|
scoreVariancePerExampleDistribution?: DatasetDistribution;
|
|
8258
8575
|
/** Output only. Dataset distributions for scores. */
|
|
@@ -8409,6 +8726,12 @@ export declare interface RagRetrievalConfigRankingRankService {
|
|
|
8409
8726
|
declare class RateLimitError extends APIError<429, Headers> {
|
|
8410
8727
|
}
|
|
8411
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
|
+
|
|
8412
8735
|
/** A raw reference image.
|
|
8413
8736
|
|
|
8414
8737
|
A raw reference image represents the base image to edit, provided by the user.
|
|
@@ -8710,12 +9033,23 @@ export declare interface RetrievalConfig {
|
|
|
8710
9033
|
languageCode?: string;
|
|
8711
9034
|
}
|
|
8712
9035
|
|
|
8713
|
-
/** Metadata
|
|
9036
|
+
/** Metadata returned to client when grounding is enabled. */
|
|
8714
9037
|
export declare interface RetrievalMetadata {
|
|
8715
|
-
/** 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. */
|
|
8716
9044
|
googleSearchDynamicRetrievalScore?: number;
|
|
8717
9045
|
}
|
|
8718
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
|
+
|
|
8719
9053
|
/** Safety attributes of a GeneratedImage or the user-provided prompt. */
|
|
8720
9054
|
export declare interface SafetyAttributes {
|
|
8721
9055
|
/** List of RAI categories. */
|
|
@@ -8734,31 +9068,31 @@ export declare enum SafetyFilterLevel {
|
|
|
8734
9068
|
BLOCK_NONE = "BLOCK_NONE"
|
|
8735
9069
|
}
|
|
8736
9070
|
|
|
8737
|
-
/**
|
|
9071
|
+
/** A safety rating for a piece of content. The safety rating contains the harm category and the harm probability level. */
|
|
8738
9072
|
export declare interface SafetyRating {
|
|
8739
|
-
/** Output only. Indicates whether the content was
|
|
9073
|
+
/** Output only. Indicates whether the content was blocked because of this rating. */
|
|
8740
9074
|
blocked?: boolean;
|
|
8741
|
-
/** Output only.
|
|
9075
|
+
/** Output only. The harm category of this rating. */
|
|
8742
9076
|
category?: HarmCategory;
|
|
8743
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. */
|
|
8744
9078
|
overwrittenThreshold?: HarmBlockThreshold;
|
|
8745
|
-
/** Output only.
|
|
9079
|
+
/** Output only. The probability of harm for this category. */
|
|
8746
9080
|
probability?: HarmProbability;
|
|
8747
|
-
/** Output only.
|
|
9081
|
+
/** Output only. The probability score of harm for this category. This field is not supported in Gemini API. */
|
|
8748
9082
|
probabilityScore?: number;
|
|
8749
|
-
/** Output only.
|
|
9083
|
+
/** Output only. The severity of harm for this category. This field is not supported in Gemini API. */
|
|
8750
9084
|
severity?: HarmSeverity;
|
|
8751
|
-
/** Output only.
|
|
9085
|
+
/** Output only. The severity score of harm for this category. This field is not supported in Gemini API. */
|
|
8752
9086
|
severityScore?: number;
|
|
8753
9087
|
}
|
|
8754
9088
|
|
|
8755
|
-
/**
|
|
9089
|
+
/** A safety setting that affects the safety-blocking behavior. A SafetySetting consists of a harm category and a threshold for that category. */
|
|
8756
9090
|
export declare interface SafetySetting {
|
|
8757
|
-
/** Required.
|
|
9091
|
+
/** Required. The harm category to be blocked. */
|
|
8758
9092
|
category?: HarmCategory;
|
|
8759
|
-
/** 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. */
|
|
8760
9094
|
method?: HarmBlockMethod;
|
|
8761
|
-
/** Required. The harm
|
|
9095
|
+
/** Required. The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
|
|
8762
9096
|
threshold?: HarmBlockThreshold;
|
|
8763
9097
|
}
|
|
8764
9098
|
|
|
@@ -8824,49 +9158,49 @@ export declare enum Scale {
|
|
|
8824
9158
|
object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
|
|
8825
9159
|
be added in the future as needed. */
|
|
8826
9160
|
export declare interface Schema {
|
|
8827
|
-
/** Optional. The
|
|
9161
|
+
/** Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`. */
|
|
8828
9162
|
anyOf?: Schema[];
|
|
8829
|
-
/** Optional. Default value
|
|
9163
|
+
/** Optional. Default value to use if the field is not specified. */
|
|
8830
9164
|
default?: unknown;
|
|
8831
|
-
/** Optional.
|
|
9165
|
+
/** Optional. Description of the schema. */
|
|
8832
9166
|
description?: string;
|
|
8833
|
-
/** 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"]}` */
|
|
8834
9168
|
enum?: string[];
|
|
8835
|
-
/** Optional. Example of
|
|
9169
|
+
/** Optional. Example of an instance of this schema. */
|
|
8836
9170
|
example?: unknown;
|
|
8837
|
-
/** 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. */
|
|
8838
9172
|
format?: string;
|
|
8839
|
-
/** Optional.
|
|
9173
|
+
/** Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array. */
|
|
8840
9174
|
items?: Schema;
|
|
8841
|
-
/** Optional.
|
|
9175
|
+
/** Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array. */
|
|
8842
9176
|
maxItems?: string;
|
|
8843
|
-
/** Optional.
|
|
9177
|
+
/** Optional. If type is `STRING`, `max_length` specifies the maximum length of the string. */
|
|
8844
9178
|
maxLength?: string;
|
|
8845
|
-
/** Optional.
|
|
9179
|
+
/** Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided. */
|
|
8846
9180
|
maxProperties?: string;
|
|
8847
|
-
/** Optional.
|
|
9181
|
+
/** Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value. */
|
|
8848
9182
|
maximum?: number;
|
|
8849
|
-
/** Optional.
|
|
9183
|
+
/** Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array. */
|
|
8850
9184
|
minItems?: string;
|
|
8851
|
-
/** Optional.
|
|
9185
|
+
/** Optional. If type is `STRING`, `min_length` specifies the minimum length of the string. */
|
|
8852
9186
|
minLength?: string;
|
|
8853
|
-
/** Optional.
|
|
9187
|
+
/** Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided. */
|
|
8854
9188
|
minProperties?: string;
|
|
8855
|
-
/** Optional.
|
|
9189
|
+
/** Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value. */
|
|
8856
9190
|
minimum?: number;
|
|
8857
|
-
/** Optional. Indicates if the value
|
|
9191
|
+
/** Optional. Indicates if the value of this field can be null. */
|
|
8858
9192
|
nullable?: boolean;
|
|
8859
|
-
/** Optional.
|
|
9193
|
+
/** Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match. */
|
|
8860
9194
|
pattern?: string;
|
|
8861
|
-
/** Optional.
|
|
9195
|
+
/** Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object. */
|
|
8862
9196
|
properties?: Record<string, Schema>;
|
|
8863
|
-
/** 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. */
|
|
8864
9198
|
propertyOrdering?: string[];
|
|
8865
|
-
/** Optional.
|
|
9199
|
+
/** Optional. If type is `OBJECT`, `required` lists the names of properties that must be present. */
|
|
8866
9200
|
required?: string[];
|
|
8867
|
-
/** Optional.
|
|
9201
|
+
/** Optional. Title for the schema. */
|
|
8868
9202
|
title?: string;
|
|
8869
|
-
/** Optional.
|
|
9203
|
+
/** Optional. Data type of the schema field. */
|
|
8870
9204
|
type?: Type;
|
|
8871
9205
|
}
|
|
8872
9206
|
|
|
@@ -8878,11 +9212,12 @@ export declare interface ScribbleImage {
|
|
|
8878
9212
|
image?: Image_2;
|
|
8879
9213
|
}
|
|
8880
9214
|
|
|
8881
|
-
/**
|
|
9215
|
+
/** The entry point used to search for grounding sources. */
|
|
8882
9216
|
export declare interface SearchEntryPoint {
|
|
8883
|
-
/** 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. */
|
|
8884
9219
|
renderedContent?: string;
|
|
8885
|
-
/** Optional.
|
|
9220
|
+
/** Optional. JSON representing array of tuples.
|
|
8886
9221
|
* @remarks Encoded as base64 string. */
|
|
8887
9222
|
sdkBlob?: string;
|
|
8888
9223
|
}
|
|
@@ -8896,15 +9231,21 @@ export declare interface SearchTypes {
|
|
|
8896
9231
|
imageSearch?: ImageSearch;
|
|
8897
9232
|
}
|
|
8898
9233
|
|
|
8899
|
-
/** Segment of the content. */
|
|
9234
|
+
/** Segment of the content this support belongs to. */
|
|
8900
9235
|
export declare interface Segment {
|
|
8901
|
-
/** 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. */
|
|
8902
9243
|
endIndex?: number;
|
|
8903
|
-
/** 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. */
|
|
8904
9246
|
partIndex?: number;
|
|
8905
|
-
/** Output only.
|
|
8906
|
-
|
|
8907
|
-
/** Output only. The text corresponding to the segment from the response. */
|
|
9247
|
+
/** Output only. The text corresponding to the segment from the
|
|
9248
|
+
response. */
|
|
8908
9249
|
text?: string;
|
|
8909
9250
|
}
|
|
8910
9251
|
|
|
@@ -9180,7 +9521,7 @@ export declare interface SlidingWindow {
|
|
|
9180
9521
|
targetTokens?: string;
|
|
9181
9522
|
}
|
|
9182
9523
|
|
|
9183
|
-
/** Configuration for a single speaker in a multi
|
|
9524
|
+
/** Configuration for a single speaker in a multi-speaker setup. */
|
|
9184
9525
|
export declare interface SpeakerVoiceConfig {
|
|
9185
9526
|
/** Required. The name of the speaker. This should be the same as the speaker name used in the prompt. */
|
|
9186
9527
|
speaker?: string;
|
|
@@ -9191,7 +9532,7 @@ export declare interface SpeakerVoiceConfig {
|
|
|
9191
9532
|
export declare interface SpeechConfig {
|
|
9192
9533
|
/** Configuration for the voice of the response. */
|
|
9193
9534
|
voiceConfig?: VoiceConfig;
|
|
9194
|
-
/** Optional.
|
|
9535
|
+
/** Optional. The language code (ISO 639-1) for the speech synthesis. */
|
|
9195
9536
|
languageCode?: string;
|
|
9196
9537
|
/** The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`. */
|
|
9197
9538
|
multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
|
|
@@ -9633,16 +9974,19 @@ export declare interface Tool {
|
|
|
9633
9974
|
fileSearch?: FileSearch;
|
|
9634
9975
|
/** Enables the model to execute Google Search as part of generation. */
|
|
9635
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;
|
|
9636
9980
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
9637
9981
|
codeExecution?: ToolCodeExecution;
|
|
9638
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. */
|
|
9639
9983
|
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
9640
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. */
|
|
9641
9985
|
functionDeclarations?: FunctionDeclaration[];
|
|
9642
|
-
/** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
|
|
9643
|
-
googleMaps?: GoogleMaps;
|
|
9644
9986
|
/** Optional. Specialized retrieval tool that is powered by Google Search. */
|
|
9645
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;
|
|
9646
9990
|
/** Optional. Tool to support URL context retrieval. */
|
|
9647
9991
|
urlContext?: UrlContext;
|
|
9648
9992
|
/** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
|
|
@@ -9764,6 +10108,14 @@ export declare interface ToolConfig {
|
|
|
9764
10108
|
|
|
9765
10109
|
export declare type ToolListUnion = ToolUnion[];
|
|
9766
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
|
+
|
|
9767
10119
|
export declare type ToolUnion = Tool | CallableTool;
|
|
9768
10120
|
|
|
9769
10121
|
/** Output only. The traffic type for this request. This enum is not supported in Gemini API. */
|
|
@@ -9776,6 +10128,14 @@ export declare enum TrafficType {
|
|
|
9776
10128
|
* The request was processed using Pay-As-You-Go quota.
|
|
9777
10129
|
*/
|
|
9778
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",
|
|
9779
10139
|
/**
|
|
9780
10140
|
* Type for Provisioned Throughput traffic.
|
|
9781
10141
|
*/
|
|
@@ -9850,7 +10210,7 @@ export declare interface TuningDataset {
|
|
|
9850
10210
|
|
|
9851
10211
|
/** The tuning data statistic values for TuningJob. This data type is not supported in Gemini API. */
|
|
9852
10212
|
export declare interface TuningDataStats {
|
|
9853
|
-
/** 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. */
|
|
9854
10214
|
distillationDataStats?: DistillationDataStats;
|
|
9855
10215
|
/** Output only. Statistics for preference optimization. */
|
|
9856
10216
|
preferenceOptimizationDataStats?: PreferenceOptimizationDataStats;
|
|
@@ -9906,8 +10266,12 @@ export declare interface TuningJob {
|
|
|
9906
10266
|
partnerModelTuningSpec?: PartnerModelTuningSpec;
|
|
9907
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. */
|
|
9908
10268
|
customBaseModel?: string;
|
|
10269
|
+
/** Output only. Evaluation runs for the Tuning Job. */
|
|
10270
|
+
evaluateDatasetRuns?: EvaluateDatasetRun[];
|
|
9909
10271
|
/** Output only. The Experiment associated with this TuningJob. */
|
|
9910
10272
|
experiment?: string;
|
|
10273
|
+
/** Tuning Spec for Full Fine Tuning. */
|
|
10274
|
+
fullFineTuningSpec?: FullFineTuningSpec;
|
|
9911
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. */
|
|
9912
10276
|
labels?: Record<string, string>;
|
|
9913
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. */
|
|
@@ -9918,10 +10282,40 @@ export declare interface TuningJob {
|
|
|
9918
10282
|
serviceAccount?: string;
|
|
9919
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. */
|
|
9920
10284
|
tunedModelDisplayName?: string;
|
|
10285
|
+
/** Output only. The detail state of the tuning job (while the overall `JobState` is running). */
|
|
10286
|
+
tuningJobState?: TuningJobState;
|
|
9921
10287
|
/** Tuning Spec for Veo Tuning. */
|
|
9922
10288
|
veoTuningSpec?: VeoTuningSpec;
|
|
9923
10289
|
}
|
|
9924
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
|
+
|
|
9925
10319
|
/** Enum representing the tuning method. */
|
|
9926
10320
|
export declare enum TuningMethod {
|
|
9927
10321
|
/**
|
|
@@ -10099,7 +10493,7 @@ export declare enum TurnCoverage {
|
|
|
10099
10493
|
TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT"
|
|
10100
10494
|
}
|
|
10101
10495
|
|
|
10102
|
-
/**
|
|
10496
|
+
/** Data type of the schema field. */
|
|
10103
10497
|
export declare enum Type {
|
|
10104
10498
|
/**
|
|
10105
10499
|
* Not specified, should not be used.
|
|
@@ -10153,13 +10547,14 @@ declare namespace types {
|
|
|
10153
10547
|
FunctionResponseScheduling,
|
|
10154
10548
|
Type,
|
|
10155
10549
|
PhishBlockThreshold,
|
|
10156
|
-
ApiSpec,
|
|
10157
10550
|
AuthType,
|
|
10158
10551
|
HttpElementLocation,
|
|
10552
|
+
ApiSpec,
|
|
10159
10553
|
Behavior,
|
|
10160
10554
|
DynamicRetrievalConfigMode,
|
|
10161
10555
|
FunctionCallingConfigMode,
|
|
10162
10556
|
ThinkingLevel,
|
|
10557
|
+
PersonGeneration,
|
|
10163
10558
|
HarmCategory,
|
|
10164
10559
|
HarmBlockMethod,
|
|
10165
10560
|
HarmBlockThreshold,
|
|
@@ -10174,6 +10569,9 @@ declare namespace types {
|
|
|
10174
10569
|
TuningMode,
|
|
10175
10570
|
AdapterSize,
|
|
10176
10571
|
JobState,
|
|
10572
|
+
TuningJobState,
|
|
10573
|
+
AggregationMetric,
|
|
10574
|
+
PairwiseChoice,
|
|
10177
10575
|
TuningTask,
|
|
10178
10576
|
PartMediaResolutionLevel,
|
|
10179
10577
|
ResourceScope,
|
|
@@ -10182,7 +10580,6 @@ declare namespace types {
|
|
|
10182
10580
|
ProminentPeople,
|
|
10183
10581
|
EmbeddingApiType,
|
|
10184
10582
|
SafetyFilterLevel,
|
|
10185
|
-
PersonGeneration,
|
|
10186
10583
|
ImagePromptLanguage,
|
|
10187
10584
|
MaskReferenceMode,
|
|
10188
10585
|
ControlReferenceType,
|
|
@@ -10232,14 +10629,15 @@ declare namespace types {
|
|
|
10232
10629
|
SearchTypes,
|
|
10233
10630
|
Interval,
|
|
10234
10631
|
GoogleSearch,
|
|
10235
|
-
ApiAuthApiKeyConfig,
|
|
10236
|
-
ApiAuth,
|
|
10237
10632
|
ApiKeyConfig,
|
|
10238
10633
|
AuthConfigGoogleServiceAccountConfig,
|
|
10239
10634
|
AuthConfigHttpBasicAuthConfig,
|
|
10240
10635
|
AuthConfigOauthConfig,
|
|
10241
10636
|
AuthConfigOidcConfig,
|
|
10242
10637
|
AuthConfig,
|
|
10638
|
+
GoogleMaps,
|
|
10639
|
+
ApiAuthApiKeyConfig,
|
|
10640
|
+
ApiAuth,
|
|
10243
10641
|
ExternalApiElasticSearchParams,
|
|
10244
10642
|
ExternalApiSimpleSearchParams,
|
|
10245
10643
|
ExternalApi,
|
|
@@ -10257,9 +10655,9 @@ declare namespace types {
|
|
|
10257
10655
|
ToolCodeExecution,
|
|
10258
10656
|
EnterpriseWebSearch,
|
|
10259
10657
|
FunctionDeclaration,
|
|
10260
|
-
GoogleMaps,
|
|
10261
10658
|
DynamicRetrievalConfig,
|
|
10262
10659
|
GoogleSearchRetrieval,
|
|
10660
|
+
ToolParallelAiSearch,
|
|
10263
10661
|
UrlContext,
|
|
10264
10662
|
StreamableHttpTransport,
|
|
10265
10663
|
McpServer,
|
|
@@ -10276,6 +10674,7 @@ declare namespace types {
|
|
|
10276
10674
|
SpeechConfig,
|
|
10277
10675
|
AutomaticFunctionCallingConfig,
|
|
10278
10676
|
ThinkingConfig,
|
|
10677
|
+
ImageConfigImageOutputOptions,
|
|
10279
10678
|
ImageConfig,
|
|
10280
10679
|
GenerationConfigRoutingConfigAutoRoutingMode,
|
|
10281
10680
|
GenerationConfigRoutingConfigManualRoutingMode,
|
|
@@ -10406,6 +10805,23 @@ declare namespace types {
|
|
|
10406
10805
|
TuningDataStats,
|
|
10407
10806
|
EncryptionSpec,
|
|
10408
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,
|
|
10409
10825
|
VeoHyperParameters,
|
|
10410
10826
|
VeoTuningSpec,
|
|
10411
10827
|
TuningJob,
|
|
@@ -10909,11 +11325,15 @@ declare interface URLContextCallContent {
|
|
|
10909
11325
|
*/
|
|
10910
11326
|
arguments: URLContextCallArguments;
|
|
10911
11327
|
type: 'url_context_call';
|
|
11328
|
+
/**
|
|
11329
|
+
* A signature hash for backend validation.
|
|
11330
|
+
*/
|
|
11331
|
+
signature?: string;
|
|
10912
11332
|
}
|
|
10913
11333
|
|
|
10914
|
-
/** Metadata
|
|
11334
|
+
/** Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL. */
|
|
10915
11335
|
export declare interface UrlContextMetadata {
|
|
10916
|
-
/** Output only.
|
|
11336
|
+
/** Output only. A list of URL metadata, with one entry for each URL retrieved by the tool. */
|
|
10917
11337
|
urlMetadata?: UrlMetadata[];
|
|
10918
11338
|
}
|
|
10919
11339
|
|
|
@@ -10949,31 +11369,31 @@ declare interface URLContextResultContent {
|
|
|
10949
11369
|
*/
|
|
10950
11370
|
is_error?: boolean;
|
|
10951
11371
|
/**
|
|
10952
|
-
*
|
|
11372
|
+
* A signature hash for backend validation.
|
|
10953
11373
|
*/
|
|
10954
11374
|
signature?: string;
|
|
10955
11375
|
}
|
|
10956
11376
|
|
|
10957
|
-
/**
|
|
11377
|
+
/** The metadata for a single URL retrieval. */
|
|
10958
11378
|
export declare interface UrlMetadata {
|
|
10959
|
-
/**
|
|
11379
|
+
/** The URL retrieved by the tool. */
|
|
10960
11380
|
retrievedUrl?: string;
|
|
10961
|
-
/**
|
|
11381
|
+
/** The status of the URL retrieval. */
|
|
10962
11382
|
urlRetrievalStatus?: UrlRetrievalStatus;
|
|
10963
11383
|
}
|
|
10964
11384
|
|
|
10965
|
-
/**
|
|
11385
|
+
/** The status of the URL retrieval. */
|
|
10966
11386
|
export declare enum UrlRetrievalStatus {
|
|
10967
11387
|
/**
|
|
10968
11388
|
* Default value. This value is unused.
|
|
10969
11389
|
*/
|
|
10970
11390
|
URL_RETRIEVAL_STATUS_UNSPECIFIED = "URL_RETRIEVAL_STATUS_UNSPECIFIED",
|
|
10971
11391
|
/**
|
|
10972
|
-
*
|
|
11392
|
+
* The URL was retrieved successfully.
|
|
10973
11393
|
*/
|
|
10974
11394
|
URL_RETRIEVAL_STATUS_SUCCESS = "URL_RETRIEVAL_STATUS_SUCCESS",
|
|
10975
11395
|
/**
|
|
10976
|
-
*
|
|
11396
|
+
* The URL retrieval failed.
|
|
10977
11397
|
*/
|
|
10978
11398
|
URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR",
|
|
10979
11399
|
/**
|
|
@@ -11139,6 +11559,8 @@ export declare interface VeoHyperParameters {
|
|
|
11139
11559
|
learningRateMultiplier?: number;
|
|
11140
11560
|
/** Optional. The tuning task. Either I2V or T2V. */
|
|
11141
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;
|
|
11142
11564
|
}
|
|
11143
11565
|
|
|
11144
11566
|
/** Tuning Spec for Veo Model Tuning. This data type is not supported in Gemini API. */
|
|
@@ -11306,11 +11728,11 @@ export declare enum VideoGenerationReferenceType {
|
|
|
11306
11728
|
STYLE = "STYLE"
|
|
11307
11729
|
}
|
|
11308
11730
|
|
|
11309
|
-
/**
|
|
11731
|
+
/** Provides metadata for a video, including the start and end offsets for clipping and the frame rate. */
|
|
11310
11732
|
export declare interface VideoMetadata {
|
|
11311
11733
|
/** Optional. The end offset of the video. */
|
|
11312
11734
|
endOffset?: string;
|
|
11313
|
-
/** 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]. */
|
|
11314
11736
|
fps?: number;
|
|
11315
11737
|
/** Optional. The start offset of the video. */
|
|
11316
11738
|
startOffset?: string;
|
|
@@ -11346,7 +11768,7 @@ export declare enum VoiceActivityType {
|
|
|
11346
11768
|
export declare interface VoiceConfig {
|
|
11347
11769
|
/** If true, the model will use a replicated voice for the response. */
|
|
11348
11770
|
replicatedVoiceConfig?: ReplicatedVoiceConfig;
|
|
11349
|
-
/** The configuration for
|
|
11771
|
+
/** The configuration for a prebuilt voice. */
|
|
11350
11772
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
11351
11773
|
}
|
|
11352
11774
|
|