@google/genai 1.44.0 → 1.46.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 +401 -125
- package/dist/index.cjs +480 -68
- package/dist/index.mjs +480 -69
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +502 -88
- package/dist/node/index.mjs +502 -89
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +401 -125
- package/dist/tokenizer/node.cjs +40 -12
- package/dist/tokenizer/node.d.ts +74 -2
- package/dist/tokenizer/node.mjs +40 -12
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +3013 -0
- package/dist/vertex_internal/index.cjs.map +1 -0
- package/dist/vertex_internal/index.d.ts +8038 -0
- package/dist/vertex_internal/index.js +2984 -0
- package/dist/vertex_internal/index.js.map +1 -0
- package/dist/web/index.mjs +480 -69
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +401 -125
- package/package.json +10 -2
package/dist/genai.d.ts
CHANGED
|
@@ -157,23 +157,7 @@ declare interface AllowedTools {
|
|
|
157
157
|
/**
|
|
158
158
|
* Citation information for model-generated content.
|
|
159
159
|
*/
|
|
160
|
-
declare
|
|
161
|
-
/**
|
|
162
|
-
* End of the attributed segment, exclusive.
|
|
163
|
-
*/
|
|
164
|
-
end_index?: number;
|
|
165
|
-
/**
|
|
166
|
-
* Source attributed for a portion of the text. Could be a URL, title, or
|
|
167
|
-
* other identifier.
|
|
168
|
-
*/
|
|
169
|
-
source?: string;
|
|
170
|
-
/**
|
|
171
|
-
* Start of segment of the response that is attributed to this source.
|
|
172
|
-
*
|
|
173
|
-
* Index indicates the start of the segment, measured in bytes.
|
|
174
|
-
*/
|
|
175
|
-
start_index?: number;
|
|
176
|
-
}
|
|
160
|
+
declare type Annotation = URLCitation | FileCitation | PlaceCitation;
|
|
177
161
|
|
|
178
162
|
/** The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. This data type is not supported in Gemini API. */
|
|
179
163
|
export declare interface ApiAuth {
|
|
@@ -497,6 +481,9 @@ declare interface AudioContent {
|
|
|
497
481
|
|
|
498
482
|
/** The audio transcription configuration in Setup. */
|
|
499
483
|
export declare interface AudioTranscriptionConfig {
|
|
484
|
+
/** The language codes of the audio. BCP-47 language code. If not set, the transcription will be in the language detected by the model. If set, the server will use the language code specified in the model config as a hint for the language of the audio
|
|
485
|
+
*/
|
|
486
|
+
languageCodes?: string[];
|
|
500
487
|
}
|
|
501
488
|
|
|
502
489
|
/**
|
|
@@ -650,11 +637,11 @@ declare interface BaseCreateAgentInteractionParams {
|
|
|
650
637
|
*/
|
|
651
638
|
agent: (string & {}) | 'deep-research-pro-preview-12-2025';
|
|
652
639
|
/**
|
|
653
|
-
* Body param: The
|
|
640
|
+
* Body param: The input for the interaction.
|
|
654
641
|
*/
|
|
655
|
-
input:
|
|
642
|
+
input: Array<Content_2> | string | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent | GoogleMapsCallContent | GoogleMapsResultContent;
|
|
656
643
|
/**
|
|
657
|
-
* Body param: Configuration for the agent.
|
|
644
|
+
* Body param: Configuration parameters for the agent interaction.
|
|
658
645
|
*/
|
|
659
646
|
agent_config?: DynamicAgentConfig | DeepResearchAgentConfig;
|
|
660
647
|
/**
|
|
@@ -702,9 +689,9 @@ declare interface BaseCreateModelInteractionParams {
|
|
|
702
689
|
*/
|
|
703
690
|
api_version?: string;
|
|
704
691
|
/**
|
|
705
|
-
* Body param: The
|
|
692
|
+
* Body param: The input for the interaction.
|
|
706
693
|
*/
|
|
707
|
-
input:
|
|
694
|
+
input: Array<Content_2> | string | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent | GoogleMapsCallContent | GoogleMapsResultContent;
|
|
708
695
|
/**
|
|
709
696
|
* Body param: The name of the `Model` used for generating the interaction.
|
|
710
697
|
*/
|
|
@@ -797,7 +784,7 @@ declare class BaseGeminiNextGenAPIClient {
|
|
|
797
784
|
/**
|
|
798
785
|
* Basic re-implementation of `qs.stringify` for primitive types.
|
|
799
786
|
*/
|
|
800
|
-
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
787
|
+
protected stringifyQuery(query: object | Record<string, unknown>): string;
|
|
801
788
|
private getUserAgent;
|
|
802
789
|
protected defaultIdempotencyKey(): string;
|
|
803
790
|
protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError;
|
|
@@ -851,7 +838,7 @@ declare class BaseInteractions extends APIResource {
|
|
|
851
838
|
* ```ts
|
|
852
839
|
* const interaction = await client.interactions.create({
|
|
853
840
|
* api_version: 'api_version',
|
|
854
|
-
* input: '
|
|
841
|
+
* input: [{ text: 'text', type: 'text' }],
|
|
855
842
|
* model: 'gemini-2.5-flash',
|
|
856
843
|
* });
|
|
857
844
|
* ```
|
|
@@ -1706,12 +1693,16 @@ declare interface CodeExecutionCallContent {
|
|
|
1706
1693
|
signature?: string;
|
|
1707
1694
|
}
|
|
1708
1695
|
|
|
1709
|
-
/** Result of executing the
|
|
1696
|
+
/** Result of executing the `ExecutableCode`.
|
|
1697
|
+
|
|
1698
|
+
Generated only when the `CodeExecution` tool is used. */
|
|
1710
1699
|
export declare interface CodeExecutionResult {
|
|
1711
1700
|
/** Required. Outcome of the code execution. */
|
|
1712
1701
|
outcome?: Outcome;
|
|
1713
1702
|
/** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */
|
|
1714
1703
|
output?: string;
|
|
1704
|
+
/** The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. */
|
|
1705
|
+
id?: string;
|
|
1715
1706
|
}
|
|
1716
1707
|
|
|
1717
1708
|
/**
|
|
@@ -1819,10 +1810,10 @@ export declare interface Content {
|
|
|
1819
1810
|
/**
|
|
1820
1811
|
* The content of the response.
|
|
1821
1812
|
*/
|
|
1822
|
-
declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
|
|
1813
|
+
declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent | GoogleMapsCallContent | GoogleMapsResultContent;
|
|
1823
1814
|
|
|
1824
1815
|
declare interface ContentDelta {
|
|
1825
|
-
delta: ContentDelta.
|
|
1816
|
+
delta: ContentDelta.Text | ContentDelta.Image | ContentDelta.Audio | ContentDelta.Document | ContentDelta.Video | ContentDelta.ThoughtSummary | ContentDelta.ThoughtSignature | ContentDelta.FunctionCall | ContentDelta.FunctionResult | ContentDelta.CodeExecutionCall | ContentDelta.CodeExecutionResult | ContentDelta.URLContextCall | ContentDelta.URLContextResult | ContentDelta.GoogleSearchCall | ContentDelta.GoogleSearchResult | ContentDelta.MCPServerToolCall | ContentDelta.MCPServerToolResult | ContentDelta.FileSearchCall | ContentDelta.FileSearchResult | ContentDelta.GoogleMapsCall | ContentDelta.GoogleMapsResult;
|
|
1826
1817
|
event_type: 'content.delta';
|
|
1827
1818
|
index: number;
|
|
1828
1819
|
/**
|
|
@@ -1832,7 +1823,7 @@ declare interface ContentDelta {
|
|
|
1832
1823
|
}
|
|
1833
1824
|
|
|
1834
1825
|
declare namespace ContentDelta {
|
|
1835
|
-
interface
|
|
1826
|
+
interface Text {
|
|
1836
1827
|
text: string;
|
|
1837
1828
|
type: 'text';
|
|
1838
1829
|
/**
|
|
@@ -1840,7 +1831,7 @@ declare namespace ContentDelta {
|
|
|
1840
1831
|
*/
|
|
1841
1832
|
annotations?: Array<InteractionsAPI.Annotation>;
|
|
1842
1833
|
}
|
|
1843
|
-
interface
|
|
1834
|
+
interface Image {
|
|
1844
1835
|
type: 'image';
|
|
1845
1836
|
data?: string;
|
|
1846
1837
|
mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif';
|
|
@@ -1850,19 +1841,19 @@ declare namespace ContentDelta {
|
|
|
1850
1841
|
resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
|
|
1851
1842
|
uri?: string;
|
|
1852
1843
|
}
|
|
1853
|
-
interface
|
|
1844
|
+
interface Audio {
|
|
1854
1845
|
type: 'audio';
|
|
1855
1846
|
data?: string;
|
|
1856
1847
|
mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac';
|
|
1857
1848
|
uri?: string;
|
|
1858
1849
|
}
|
|
1859
|
-
interface
|
|
1850
|
+
interface Document {
|
|
1860
1851
|
type: 'document';
|
|
1861
1852
|
data?: string;
|
|
1862
1853
|
mime_type?: 'application/pdf';
|
|
1863
1854
|
uri?: string;
|
|
1864
1855
|
}
|
|
1865
|
-
interface
|
|
1856
|
+
interface Video {
|
|
1866
1857
|
type: 'video';
|
|
1867
1858
|
data?: string;
|
|
1868
1859
|
mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
|
|
@@ -1872,21 +1863,21 @@ declare namespace ContentDelta {
|
|
|
1872
1863
|
resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
|
|
1873
1864
|
uri?: string;
|
|
1874
1865
|
}
|
|
1875
|
-
interface
|
|
1866
|
+
interface ThoughtSummary {
|
|
1876
1867
|
type: 'thought_summary';
|
|
1877
1868
|
/**
|
|
1878
|
-
* A
|
|
1869
|
+
* A new summary item to be added to the thought.
|
|
1879
1870
|
*/
|
|
1880
1871
|
content?: InteractionsAPI.TextContent | InteractionsAPI.ImageContent;
|
|
1881
1872
|
}
|
|
1882
|
-
interface
|
|
1873
|
+
interface ThoughtSignature {
|
|
1883
1874
|
type: 'thought_signature';
|
|
1884
1875
|
/**
|
|
1885
1876
|
* Signature to match the backend source to be part of the generation.
|
|
1886
1877
|
*/
|
|
1887
1878
|
signature?: string;
|
|
1888
1879
|
}
|
|
1889
|
-
interface
|
|
1880
|
+
interface FunctionCall {
|
|
1890
1881
|
/**
|
|
1891
1882
|
* A unique ID for this specific tool call.
|
|
1892
1883
|
*/
|
|
@@ -1901,7 +1892,7 @@ declare namespace ContentDelta {
|
|
|
1901
1892
|
*/
|
|
1902
1893
|
signature?: string;
|
|
1903
1894
|
}
|
|
1904
|
-
interface
|
|
1895
|
+
interface FunctionResult {
|
|
1905
1896
|
/**
|
|
1906
1897
|
* ID to match the ID from the function call block.
|
|
1907
1898
|
*/
|
|
@@ -1909,7 +1900,7 @@ declare namespace ContentDelta {
|
|
|
1909
1900
|
/**
|
|
1910
1901
|
* Tool call result delta.
|
|
1911
1902
|
*/
|
|
1912
|
-
result:
|
|
1903
|
+
result: FunctionResult.Items | unknown | string;
|
|
1913
1904
|
type: 'function_result';
|
|
1914
1905
|
is_error?: boolean;
|
|
1915
1906
|
name?: string;
|
|
@@ -1918,12 +1909,12 @@ declare namespace ContentDelta {
|
|
|
1918
1909
|
*/
|
|
1919
1910
|
signature?: string;
|
|
1920
1911
|
}
|
|
1921
|
-
namespace
|
|
1912
|
+
namespace FunctionResult {
|
|
1922
1913
|
interface Items {
|
|
1923
1914
|
items?: Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent>;
|
|
1924
1915
|
}
|
|
1925
1916
|
}
|
|
1926
|
-
interface
|
|
1917
|
+
interface CodeExecutionCall {
|
|
1927
1918
|
/**
|
|
1928
1919
|
* A unique ID for this specific tool call.
|
|
1929
1920
|
*/
|
|
@@ -1938,7 +1929,7 @@ declare namespace ContentDelta {
|
|
|
1938
1929
|
*/
|
|
1939
1930
|
signature?: string;
|
|
1940
1931
|
}
|
|
1941
|
-
interface
|
|
1932
|
+
interface CodeExecutionResult {
|
|
1942
1933
|
/**
|
|
1943
1934
|
* ID to match the ID from the function call block.
|
|
1944
1935
|
*/
|
|
@@ -1951,7 +1942,7 @@ declare namespace ContentDelta {
|
|
|
1951
1942
|
*/
|
|
1952
1943
|
signature?: string;
|
|
1953
1944
|
}
|
|
1954
|
-
interface
|
|
1945
|
+
interface URLContextCall {
|
|
1955
1946
|
/**
|
|
1956
1947
|
* A unique ID for this specific tool call.
|
|
1957
1948
|
*/
|
|
@@ -1966,7 +1957,7 @@ declare namespace ContentDelta {
|
|
|
1966
1957
|
*/
|
|
1967
1958
|
signature?: string;
|
|
1968
1959
|
}
|
|
1969
|
-
interface
|
|
1960
|
+
interface URLContextResult {
|
|
1970
1961
|
/**
|
|
1971
1962
|
* ID to match the ID from the function call block.
|
|
1972
1963
|
*/
|
|
@@ -1979,7 +1970,7 @@ declare namespace ContentDelta {
|
|
|
1979
1970
|
*/
|
|
1980
1971
|
signature?: string;
|
|
1981
1972
|
}
|
|
1982
|
-
interface
|
|
1973
|
+
interface GoogleSearchCall {
|
|
1983
1974
|
/**
|
|
1984
1975
|
* A unique ID for this specific tool call.
|
|
1985
1976
|
*/
|
|
@@ -1994,7 +1985,7 @@ declare namespace ContentDelta {
|
|
|
1994
1985
|
*/
|
|
1995
1986
|
signature?: string;
|
|
1996
1987
|
}
|
|
1997
|
-
interface
|
|
1988
|
+
interface GoogleSearchResult {
|
|
1998
1989
|
/**
|
|
1999
1990
|
* ID to match the ID from the function call block.
|
|
2000
1991
|
*/
|
|
@@ -2007,7 +1998,7 @@ declare namespace ContentDelta {
|
|
|
2007
1998
|
*/
|
|
2008
1999
|
signature?: string;
|
|
2009
2000
|
}
|
|
2010
|
-
interface
|
|
2001
|
+
interface MCPServerToolCall {
|
|
2011
2002
|
/**
|
|
2012
2003
|
* A unique ID for this specific tool call.
|
|
2013
2004
|
*/
|
|
@@ -2023,7 +2014,7 @@ declare namespace ContentDelta {
|
|
|
2023
2014
|
*/
|
|
2024
2015
|
signature?: string;
|
|
2025
2016
|
}
|
|
2026
|
-
interface
|
|
2017
|
+
interface MCPServerToolResult {
|
|
2027
2018
|
/**
|
|
2028
2019
|
* ID to match the ID from the function call block.
|
|
2029
2020
|
*/
|
|
@@ -2031,7 +2022,7 @@ declare namespace ContentDelta {
|
|
|
2031
2022
|
/**
|
|
2032
2023
|
* Tool call result delta.
|
|
2033
2024
|
*/
|
|
2034
|
-
result:
|
|
2025
|
+
result: MCPServerToolResult.Items | unknown | string;
|
|
2035
2026
|
type: 'mcp_server_tool_result';
|
|
2036
2027
|
name?: string;
|
|
2037
2028
|
server_name?: string;
|
|
@@ -2040,12 +2031,12 @@ declare namespace ContentDelta {
|
|
|
2040
2031
|
*/
|
|
2041
2032
|
signature?: string;
|
|
2042
2033
|
}
|
|
2043
|
-
namespace
|
|
2034
|
+
namespace MCPServerToolResult {
|
|
2044
2035
|
interface Items {
|
|
2045
2036
|
items?: Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent>;
|
|
2046
2037
|
}
|
|
2047
2038
|
}
|
|
2048
|
-
interface
|
|
2039
|
+
interface FileSearchCall {
|
|
2049
2040
|
/**
|
|
2050
2041
|
* A unique ID for this specific tool call.
|
|
2051
2042
|
*/
|
|
@@ -2056,28 +2047,47 @@ declare namespace ContentDelta {
|
|
|
2056
2047
|
*/
|
|
2057
2048
|
signature?: string;
|
|
2058
2049
|
}
|
|
2059
|
-
interface
|
|
2050
|
+
interface FileSearchResult {
|
|
2051
|
+
/**
|
|
2052
|
+
* ID to match the ID from the function call block.
|
|
2053
|
+
*/
|
|
2054
|
+
call_id: string;
|
|
2060
2055
|
type: 'file_search_result';
|
|
2061
|
-
result?: Array<
|
|
2056
|
+
result?: Array<unknown>;
|
|
2057
|
+
/**
|
|
2058
|
+
* A signature hash for backend validation.
|
|
2059
|
+
*/
|
|
2060
|
+
signature?: string;
|
|
2062
2061
|
}
|
|
2063
|
-
|
|
2062
|
+
interface GoogleMapsCall {
|
|
2064
2063
|
/**
|
|
2065
|
-
*
|
|
2064
|
+
* A unique ID for this specific tool call.
|
|
2066
2065
|
*/
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2066
|
+
id: string;
|
|
2067
|
+
type: 'google_maps_call';
|
|
2068
|
+
/**
|
|
2069
|
+
* The arguments to pass to the Google Maps tool.
|
|
2070
|
+
*/
|
|
2071
|
+
arguments?: InteractionsAPI.GoogleMapsCallArguments;
|
|
2072
|
+
/**
|
|
2073
|
+
* A signature hash for backend validation.
|
|
2074
|
+
*/
|
|
2075
|
+
signature?: string;
|
|
2076
|
+
}
|
|
2077
|
+
interface GoogleMapsResult {
|
|
2078
|
+
/**
|
|
2079
|
+
* ID to match the ID from the function call block.
|
|
2080
|
+
*/
|
|
2081
|
+
call_id: string;
|
|
2082
|
+
/**
|
|
2083
|
+
* The results of the Google Maps.
|
|
2084
|
+
*/
|
|
2085
|
+
result: Array<InteractionsAPI.GoogleMapsResult>;
|
|
2086
|
+
type: 'google_maps_result';
|
|
2087
|
+
/**
|
|
2088
|
+
* A signature hash for backend validation.
|
|
2089
|
+
*/
|
|
2090
|
+
signature?: string;
|
|
2081
2091
|
}
|
|
2082
2092
|
}
|
|
2083
2093
|
|
|
@@ -3424,12 +3434,18 @@ export declare interface ExactMatchMetricValue {
|
|
|
3424
3434
|
score?: number;
|
|
3425
3435
|
}
|
|
3426
3436
|
|
|
3427
|
-
/**
|
|
3437
|
+
/** Model-generated code executed server-side, results returned to the model.
|
|
3438
|
+
|
|
3439
|
+
Only generated when using the `CodeExecution` tool, in which the code will
|
|
3440
|
+
be automatically executed, and a corresponding `CodeExecutionResult` will
|
|
3441
|
+
also be generated. */
|
|
3428
3442
|
export declare interface ExecutableCode {
|
|
3429
3443
|
/** Required. The code to be executed. */
|
|
3430
3444
|
code?: string;
|
|
3431
3445
|
/** Required. Programming language of the `code`. */
|
|
3432
3446
|
language?: Language;
|
|
3447
|
+
/** Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. */
|
|
3448
|
+
id?: string;
|
|
3433
3449
|
}
|
|
3434
3450
|
|
|
3435
3451
|
/** Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. This data type is not supported in Gemini API. */
|
|
@@ -3534,6 +3550,33 @@ declare interface File_2 {
|
|
|
3534
3550
|
}
|
|
3535
3551
|
export { File_2 as File }
|
|
3536
3552
|
|
|
3553
|
+
/**
|
|
3554
|
+
* A file citation annotation.
|
|
3555
|
+
*/
|
|
3556
|
+
declare interface FileCitation {
|
|
3557
|
+
type: 'file_citation';
|
|
3558
|
+
/**
|
|
3559
|
+
* The URI of the file.
|
|
3560
|
+
*/
|
|
3561
|
+
document_uri?: string;
|
|
3562
|
+
/**
|
|
3563
|
+
* End of the attributed segment, exclusive.
|
|
3564
|
+
*/
|
|
3565
|
+
end_index?: number;
|
|
3566
|
+
/**
|
|
3567
|
+
* The name of the file.
|
|
3568
|
+
*/
|
|
3569
|
+
file_name?: string;
|
|
3570
|
+
/**
|
|
3571
|
+
* Source attributed for a portion of the text.
|
|
3572
|
+
*/
|
|
3573
|
+
source?: string;
|
|
3574
|
+
/**
|
|
3575
|
+
* Start of segment of the response that is attributed to this source.
|
|
3576
|
+
*/
|
|
3577
|
+
start_index?: number;
|
|
3578
|
+
}
|
|
3579
|
+
|
|
3537
3580
|
/** 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. */
|
|
3538
3581
|
export declare interface FileData {
|
|
3539
3582
|
/** 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. */
|
|
@@ -3702,33 +3745,13 @@ declare interface FileSearchResultContent {
|
|
|
3702
3745
|
/**
|
|
3703
3746
|
* The results of the File Search.
|
|
3704
3747
|
*/
|
|
3705
|
-
result?: Array<
|
|
3748
|
+
result?: Array<unknown>;
|
|
3706
3749
|
/**
|
|
3707
3750
|
* A signature hash for backend validation.
|
|
3708
3751
|
*/
|
|
3709
3752
|
signature?: string;
|
|
3710
3753
|
}
|
|
3711
3754
|
|
|
3712
|
-
declare namespace FileSearchResultContent {
|
|
3713
|
-
/**
|
|
3714
|
-
* The result of the File Search.
|
|
3715
|
-
*/
|
|
3716
|
-
interface Result {
|
|
3717
|
-
/**
|
|
3718
|
-
* The name of the file search store.
|
|
3719
|
-
*/
|
|
3720
|
-
file_search_store?: string;
|
|
3721
|
-
/**
|
|
3722
|
-
* The text of the search result.
|
|
3723
|
-
*/
|
|
3724
|
-
text?: string;
|
|
3725
|
-
/**
|
|
3726
|
-
* The title of the search result.
|
|
3727
|
-
*/
|
|
3728
|
-
title?: string;
|
|
3729
|
-
}
|
|
3730
|
-
}
|
|
3731
|
-
|
|
3732
3755
|
/** A collection of Documents. */
|
|
3733
3756
|
export declare interface FileSearchStore {
|
|
3734
3757
|
/** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
|
|
@@ -4176,7 +4199,7 @@ declare interface FunctionResultContent {
|
|
|
4176
4199
|
/**
|
|
4177
4200
|
* The result of the tool call.
|
|
4178
4201
|
*/
|
|
4179
|
-
result:
|
|
4202
|
+
result: unknown | Array<TextContent | ImageContent> | string;
|
|
4180
4203
|
type: 'function_result';
|
|
4181
4204
|
/**
|
|
4182
4205
|
* Whether the tool call resulted in an error.
|
|
@@ -4192,12 +4215,6 @@ declare interface FunctionResultContent {
|
|
|
4192
4215
|
signature?: string;
|
|
4193
4216
|
}
|
|
4194
4217
|
|
|
4195
|
-
declare namespace FunctionResultContent {
|
|
4196
|
-
interface Items {
|
|
4197
|
-
items?: Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent>;
|
|
4198
|
-
}
|
|
4199
|
-
}
|
|
4200
|
-
|
|
4201
4218
|
/** The Google Cloud Storage location for the input content. This data type is not supported in Gemini API. */
|
|
4202
4219
|
export declare interface GcsSource {
|
|
4203
4220
|
/** 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. */
|
|
@@ -4316,7 +4333,6 @@ export declare interface GenerateContentConfig {
|
|
|
4316
4333
|
- `application/json`: JSON response in the candidates.
|
|
4317
4334
|
The model needs to be prompted to output the appropriate response type,
|
|
4318
4335
|
otherwise the behavior is undefined.
|
|
4319
|
-
This is a preview feature.
|
|
4320
4336
|
*/
|
|
4321
4337
|
responseMimeType?: string;
|
|
4322
4338
|
/** The `Schema` object allows the definition of input and output data types.
|
|
@@ -5250,6 +5266,110 @@ export declare interface GoogleMaps {
|
|
|
5250
5266
|
enableWidget?: boolean;
|
|
5251
5267
|
}
|
|
5252
5268
|
|
|
5269
|
+
/**
|
|
5270
|
+
* The arguments to pass to the Google Maps tool.
|
|
5271
|
+
*/
|
|
5272
|
+
declare interface GoogleMapsCallArguments {
|
|
5273
|
+
/**
|
|
5274
|
+
* The queries to be executed.
|
|
5275
|
+
*/
|
|
5276
|
+
queries?: Array<string>;
|
|
5277
|
+
}
|
|
5278
|
+
|
|
5279
|
+
/**
|
|
5280
|
+
* Google Maps content.
|
|
5281
|
+
*/
|
|
5282
|
+
declare interface GoogleMapsCallContent {
|
|
5283
|
+
/**
|
|
5284
|
+
* A unique ID for this specific tool call.
|
|
5285
|
+
*/
|
|
5286
|
+
id: string;
|
|
5287
|
+
type: 'google_maps_call';
|
|
5288
|
+
/**
|
|
5289
|
+
* The arguments to pass to the Google Maps tool.
|
|
5290
|
+
*/
|
|
5291
|
+
arguments?: GoogleMapsCallArguments;
|
|
5292
|
+
/**
|
|
5293
|
+
* A signature hash for backend validation.
|
|
5294
|
+
*/
|
|
5295
|
+
signature?: string;
|
|
5296
|
+
}
|
|
5297
|
+
|
|
5298
|
+
/**
|
|
5299
|
+
* The result of the Google Maps.
|
|
5300
|
+
*/
|
|
5301
|
+
declare interface GoogleMapsResult {
|
|
5302
|
+
/**
|
|
5303
|
+
* The places that were found.
|
|
5304
|
+
*/
|
|
5305
|
+
places?: Array<GoogleMapsResult.Place>;
|
|
5306
|
+
/**
|
|
5307
|
+
* Resource name of the Google Maps widget context token.
|
|
5308
|
+
*/
|
|
5309
|
+
widget_context_token?: string;
|
|
5310
|
+
}
|
|
5311
|
+
|
|
5312
|
+
declare namespace GoogleMapsResult {
|
|
5313
|
+
interface Place {
|
|
5314
|
+
/**
|
|
5315
|
+
* Title of the place.
|
|
5316
|
+
*/
|
|
5317
|
+
name?: string;
|
|
5318
|
+
/**
|
|
5319
|
+
* The ID of the place, in `places/{place_id}` format.
|
|
5320
|
+
*/
|
|
5321
|
+
place_id?: string;
|
|
5322
|
+
/**
|
|
5323
|
+
* Snippets of reviews that are used to generate answers about the
|
|
5324
|
+
* features of a given place in Google Maps.
|
|
5325
|
+
*/
|
|
5326
|
+
review_snippets?: Array<Place.ReviewSnippet>;
|
|
5327
|
+
/**
|
|
5328
|
+
* URI reference of the place.
|
|
5329
|
+
*/
|
|
5330
|
+
url?: string;
|
|
5331
|
+
}
|
|
5332
|
+
namespace Place {
|
|
5333
|
+
/**
|
|
5334
|
+
* Encapsulates a snippet of a user review that answers a question about
|
|
5335
|
+
* the features of a specific place in Google Maps.
|
|
5336
|
+
*/
|
|
5337
|
+
interface ReviewSnippet {
|
|
5338
|
+
/**
|
|
5339
|
+
* The ID of the review snippet.
|
|
5340
|
+
*/
|
|
5341
|
+
review_id?: string;
|
|
5342
|
+
/**
|
|
5343
|
+
* Title of the review.
|
|
5344
|
+
*/
|
|
5345
|
+
title?: string;
|
|
5346
|
+
/**
|
|
5347
|
+
* A link that corresponds to the user review on Google Maps.
|
|
5348
|
+
*/
|
|
5349
|
+
url?: string;
|
|
5350
|
+
}
|
|
5351
|
+
}
|
|
5352
|
+
}
|
|
5353
|
+
|
|
5354
|
+
/**
|
|
5355
|
+
* Google Maps result content.
|
|
5356
|
+
*/
|
|
5357
|
+
declare interface GoogleMapsResultContent {
|
|
5358
|
+
/**
|
|
5359
|
+
* ID to match the ID from the google maps call block.
|
|
5360
|
+
*/
|
|
5361
|
+
call_id: string;
|
|
5362
|
+
/**
|
|
5363
|
+
* The results of the Google Maps.
|
|
5364
|
+
*/
|
|
5365
|
+
result: Array<GoogleMapsResult>;
|
|
5366
|
+
type: 'google_maps_result';
|
|
5367
|
+
/**
|
|
5368
|
+
* A signature hash for backend validation.
|
|
5369
|
+
*/
|
|
5370
|
+
signature?: string;
|
|
5371
|
+
}
|
|
5372
|
+
|
|
5253
5373
|
/** The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). This data type is not supported in Gemini API. */
|
|
5254
5374
|
export declare interface GoogleRpcStatus {
|
|
5255
5375
|
/** The status code, which should be an enum value of google.rpc.Code. */
|
|
@@ -5312,15 +5432,7 @@ declare interface GoogleSearchResult {
|
|
|
5312
5432
|
/**
|
|
5313
5433
|
* Web content snippet that can be embedded in a web page or an app webview.
|
|
5314
5434
|
*/
|
|
5315
|
-
|
|
5316
|
-
/**
|
|
5317
|
-
* Title of the search result.
|
|
5318
|
-
*/
|
|
5319
|
-
title?: string;
|
|
5320
|
-
/**
|
|
5321
|
-
* URI reference of the search result.
|
|
5322
|
-
*/
|
|
5323
|
-
url?: string;
|
|
5435
|
+
search_suggestions?: string;
|
|
5324
5436
|
}
|
|
5325
5437
|
|
|
5326
5438
|
/**
|
|
@@ -6048,13 +6160,13 @@ declare interface Interaction {
|
|
|
6048
6160
|
*/
|
|
6049
6161
|
agent?: (string & {}) | 'deep-research-pro-preview-12-2025';
|
|
6050
6162
|
/**
|
|
6051
|
-
* Configuration for the agent.
|
|
6163
|
+
* Configuration parameters for the agent interaction.
|
|
6052
6164
|
*/
|
|
6053
6165
|
agent_config?: DynamicAgentConfig | DeepResearchAgentConfig;
|
|
6054
6166
|
/**
|
|
6055
|
-
* The
|
|
6167
|
+
* The input for the interaction.
|
|
6056
6168
|
*/
|
|
6057
|
-
input?:
|
|
6169
|
+
input?: Array<Content_2> | string | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent | GoogleMapsCallContent | GoogleMapsResultContent;
|
|
6058
6170
|
/**
|
|
6059
6171
|
* The name of the `Model` used for generating the interaction.
|
|
6060
6172
|
*/
|
|
@@ -6173,7 +6285,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
6173
6285
|
}
|
|
6174
6286
|
|
|
6175
6287
|
export declare namespace Interactions {
|
|
6176
|
-
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallContent as CodeExecutionCallContent, type CodeExecutionResultContent as CodeExecutionResultContent, type Content_2 as Content, type ContentDelta as ContentDelta, type ContentStart as ContentStart, type ContentStop as ContentStop, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileSearchCallContent as FileSearchCallContent, type FileSearchResultContent as FileSearchResultContent, type Function_2 as Function, type FunctionCallContent as FunctionCallContent, type FunctionResultContent as FunctionResultContent, type GenerationConfig_2 as GenerationConfig, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallContent as GoogleSearchCallContent, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultContent as GoogleSearchResultContent, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type Interaction as Interaction, type InteractionCompleteEvent as InteractionCompleteEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStartEvent as InteractionStartEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallContent as MCPServerToolCallContent, type MCPServerToolResultContent as MCPServerToolResultContent, type Model_2 as Model, type SpeechConfig_2 as SpeechConfig, type TextContent as TextContent, type ThinkingLevel_2 as ThinkingLevel, type ThoughtContent as ThoughtContent, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type Turn as Turn, type URLContextCallArguments as URLContextCallArguments, type URLContextCallContent as URLContextCallContent, type URLContextResult as URLContextResult, type URLContextResultContent as URLContextResultContent, type Usage as Usage, type VideoContent as VideoContent, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
|
|
6288
|
+
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallContent as CodeExecutionCallContent, type CodeExecutionResultContent as CodeExecutionResultContent, type Content_2 as Content, type ContentDelta as ContentDelta, type ContentStart as ContentStart, type ContentStop as ContentStop, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileCitation as FileCitation, type FileSearchCallContent as FileSearchCallContent, type FileSearchResultContent as FileSearchResultContent, type Function_2 as Function, type FunctionCallContent as FunctionCallContent, type FunctionResultContent as FunctionResultContent, type GenerationConfig_2 as GenerationConfig, type GoogleMapsCallArguments as GoogleMapsCallArguments, type GoogleMapsCallContent as GoogleMapsCallContent, type GoogleMapsResult as GoogleMapsResult, type GoogleMapsResultContent as GoogleMapsResultContent, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallContent as GoogleSearchCallContent, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultContent as GoogleSearchResultContent, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type Interaction as Interaction, type InteractionCompleteEvent as InteractionCompleteEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStartEvent as InteractionStartEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallContent as MCPServerToolCallContent, type MCPServerToolResultContent as MCPServerToolResultContent, type Model_2 as Model, type PlaceCitation as PlaceCitation, type SpeechConfig_2 as SpeechConfig, type TextContent as TextContent, type ThinkingLevel_2 as ThinkingLevel, type ThoughtContent as ThoughtContent, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type Turn as Turn, type URLCitation as URLCitation, type URLContextCallArguments as URLContextCallArguments, type URLContextCallContent as URLContextCallContent, type URLContextResult as URLContextResult, type URLContextResultContent as URLContextResultContent, type Usage as Usage, type VideoContent as VideoContent, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
|
|
6177
6289
|
}
|
|
6178
6290
|
|
|
6179
6291
|
declare namespace InteractionsAPI {
|
|
@@ -6194,12 +6306,17 @@ declare namespace InteractionsAPI {
|
|
|
6194
6306
|
DocumentContent,
|
|
6195
6307
|
DynamicAgentConfig,
|
|
6196
6308
|
ErrorEvent_2 as ErrorEvent,
|
|
6309
|
+
FileCitation,
|
|
6197
6310
|
FileSearchCallContent,
|
|
6198
6311
|
FileSearchResultContent,
|
|
6199
6312
|
Function_2 as Function,
|
|
6200
6313
|
FunctionCallContent,
|
|
6201
6314
|
FunctionResultContent,
|
|
6202
6315
|
GenerationConfig_2 as GenerationConfig,
|
|
6316
|
+
GoogleMapsCallArguments,
|
|
6317
|
+
GoogleMapsCallContent,
|
|
6318
|
+
GoogleMapsResult,
|
|
6319
|
+
GoogleMapsResultContent,
|
|
6203
6320
|
GoogleSearchCallArguments,
|
|
6204
6321
|
GoogleSearchCallContent,
|
|
6205
6322
|
GoogleSearchResult,
|
|
@@ -6214,6 +6331,7 @@ declare namespace InteractionsAPI {
|
|
|
6214
6331
|
MCPServerToolCallContent,
|
|
6215
6332
|
MCPServerToolResultContent,
|
|
6216
6333
|
Model_2 as Model,
|
|
6334
|
+
PlaceCitation,
|
|
6217
6335
|
SpeechConfig_2 as SpeechConfig,
|
|
6218
6336
|
TextContent,
|
|
6219
6337
|
ThinkingLevel_2 as ThinkingLevel,
|
|
@@ -6222,6 +6340,7 @@ declare namespace InteractionsAPI {
|
|
|
6222
6340
|
ToolChoiceConfig,
|
|
6223
6341
|
ToolChoiceType,
|
|
6224
6342
|
Turn,
|
|
6343
|
+
URLCitation,
|
|
6225
6344
|
URLContextCallArguments,
|
|
6226
6345
|
URLContextCallContent,
|
|
6227
6346
|
URLContextResult,
|
|
@@ -7482,9 +7601,9 @@ declare interface MCPServerToolResultContent {
|
|
|
7482
7601
|
*/
|
|
7483
7602
|
call_id: string;
|
|
7484
7603
|
/**
|
|
7485
|
-
* The
|
|
7604
|
+
* The output from the MCP server call. Can be simple text or rich content.
|
|
7486
7605
|
*/
|
|
7487
|
-
result:
|
|
7606
|
+
result: unknown | Array<TextContent | ImageContent> | string;
|
|
7488
7607
|
type: 'mcp_server_tool_result';
|
|
7489
7608
|
/**
|
|
7490
7609
|
* Name of the tool which is called for this specific tool call.
|
|
@@ -7500,12 +7619,6 @@ declare interface MCPServerToolResultContent {
|
|
|
7500
7619
|
signature?: string;
|
|
7501
7620
|
}
|
|
7502
7621
|
|
|
7503
|
-
declare namespace MCPServerToolResultContent {
|
|
7504
|
-
interface Items {
|
|
7505
|
-
items?: Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent>;
|
|
7506
|
-
}
|
|
7507
|
-
}
|
|
7508
|
-
|
|
7509
7622
|
/**
|
|
7510
7623
|
* Creates a McpCallableTool from MCP clients and an optional config.
|
|
7511
7624
|
*
|
|
@@ -8426,6 +8539,10 @@ export declare interface Part {
|
|
|
8426
8539
|
thoughtSignature?: string;
|
|
8427
8540
|
/** Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. */
|
|
8428
8541
|
videoMetadata?: VideoMetadata;
|
|
8542
|
+
/** Server-side tool call. This field is populated when the model predicts a tool invocation that should be executed on the server. The client is expected to echo this message back to the API. */
|
|
8543
|
+
toolCall?: ToolCall;
|
|
8544
|
+
/** The output from a server-side ToolCall execution. This field is populated by the client with the results of executing the corresponding ToolCall. */
|
|
8545
|
+
toolResponse?: ToolResponse;
|
|
8429
8546
|
}
|
|
8430
8547
|
|
|
8431
8548
|
/** Partial argument value of the function call. This data type is not supported in Gemini API. */
|
|
@@ -8543,6 +8660,59 @@ export declare enum PhishBlockThreshold {
|
|
|
8543
8660
|
BLOCK_ONLY_EXTREMELY_HIGH = "BLOCK_ONLY_EXTREMELY_HIGH"
|
|
8544
8661
|
}
|
|
8545
8662
|
|
|
8663
|
+
/**
|
|
8664
|
+
* A place citation annotation.
|
|
8665
|
+
*/
|
|
8666
|
+
declare interface PlaceCitation {
|
|
8667
|
+
type: 'place_citation';
|
|
8668
|
+
/**
|
|
8669
|
+
* End of the attributed segment, exclusive.
|
|
8670
|
+
*/
|
|
8671
|
+
end_index?: number;
|
|
8672
|
+
/**
|
|
8673
|
+
* Title of the place.
|
|
8674
|
+
*/
|
|
8675
|
+
name?: string;
|
|
8676
|
+
/**
|
|
8677
|
+
* The ID of the place, in `places/{place_id}` format.
|
|
8678
|
+
*/
|
|
8679
|
+
place_id?: string;
|
|
8680
|
+
/**
|
|
8681
|
+
* Snippets of reviews that are used to generate answers about the
|
|
8682
|
+
* features of a given place in Google Maps.
|
|
8683
|
+
*/
|
|
8684
|
+
review_snippets?: Array<PlaceCitation.ReviewSnippet>;
|
|
8685
|
+
/**
|
|
8686
|
+
* Start of segment of the response that is attributed to this source.
|
|
8687
|
+
*/
|
|
8688
|
+
start_index?: number;
|
|
8689
|
+
/**
|
|
8690
|
+
* URI reference of the place.
|
|
8691
|
+
*/
|
|
8692
|
+
url?: string;
|
|
8693
|
+
}
|
|
8694
|
+
|
|
8695
|
+
declare namespace PlaceCitation {
|
|
8696
|
+
/**
|
|
8697
|
+
* Encapsulates a snippet of a user review that answers a question about
|
|
8698
|
+
* the features of a specific place in Google Maps.
|
|
8699
|
+
*/
|
|
8700
|
+
interface ReviewSnippet {
|
|
8701
|
+
/**
|
|
8702
|
+
* The ID of the review snippet.
|
|
8703
|
+
*/
|
|
8704
|
+
review_id?: string;
|
|
8705
|
+
/**
|
|
8706
|
+
* Title of the review.
|
|
8707
|
+
*/
|
|
8708
|
+
title?: string;
|
|
8709
|
+
/**
|
|
8710
|
+
* A link that corresponds to the user review on Google Maps.
|
|
8711
|
+
*/
|
|
8712
|
+
url?: string;
|
|
8713
|
+
}
|
|
8714
|
+
}
|
|
8715
|
+
|
|
8546
8716
|
/** Spec for pointwise metric result. This data type is not supported in Gemini API. */
|
|
8547
8717
|
export declare interface PointwiseMetricResult {
|
|
8548
8718
|
/** Output only. Spec for custom output. */
|
|
@@ -9991,7 +10161,7 @@ export declare interface Tool {
|
|
|
9991
10161
|
/**
|
|
9992
10162
|
* A tool that can be used by the model.
|
|
9993
10163
|
*/
|
|
9994
|
-
declare type Tool_2 = Function_2 | Tool_2.GoogleSearch | Tool_2.CodeExecution | Tool_2.URLContext | Tool_2.ComputerUse | Tool_2.MCPServer | Tool_2.FileSearch;
|
|
10164
|
+
declare type Tool_2 = Function_2 | Tool_2.GoogleSearch | Tool_2.CodeExecution | Tool_2.URLContext | Tool_2.ComputerUse | Tool_2.MCPServer | Tool_2.FileSearch | Tool_2.GoogleMaps;
|
|
9995
10165
|
|
|
9996
10166
|
declare namespace Tool_2 {
|
|
9997
10167
|
/**
|
|
@@ -10073,6 +10243,40 @@ declare namespace Tool_2 {
|
|
|
10073
10243
|
*/
|
|
10074
10244
|
top_k?: number;
|
|
10075
10245
|
}
|
|
10246
|
+
/**
|
|
10247
|
+
* A tool that can be used by the model to call Google Maps.
|
|
10248
|
+
*/
|
|
10249
|
+
interface GoogleMaps {
|
|
10250
|
+
/**
|
|
10251
|
+
* Whether to return a widget context token in the tool call result of the
|
|
10252
|
+
* response.
|
|
10253
|
+
*/
|
|
10254
|
+
enable_widget?: boolean;
|
|
10255
|
+
/**
|
|
10256
|
+
* The latitude of the user's location.
|
|
10257
|
+
*/
|
|
10258
|
+
latitude?: number;
|
|
10259
|
+
/**
|
|
10260
|
+
* The longitude of the user's location.
|
|
10261
|
+
*/
|
|
10262
|
+
longitude?: number;
|
|
10263
|
+
type?: 'google_maps';
|
|
10264
|
+
}
|
|
10265
|
+
}
|
|
10266
|
+
|
|
10267
|
+
/** A predicted server-side `ToolCall` returned from the model.
|
|
10268
|
+
|
|
10269
|
+
This message contains information about a tool that the model wants to invoke.
|
|
10270
|
+
The client is NOT expected to execute this `ToolCall`. Instead, the
|
|
10271
|
+
client should pass this `ToolCall` back to the API in a subsequent turn
|
|
10272
|
+
within a `Content` message, along with the corresponding `ToolResponse`. */
|
|
10273
|
+
export declare interface ToolCall {
|
|
10274
|
+
/** Unique identifier of the tool call. The server returns the tool response with the matching `id`. */
|
|
10275
|
+
id?: string;
|
|
10276
|
+
/** The type of tool that was called. */
|
|
10277
|
+
toolType?: ToolType;
|
|
10278
|
+
/** The tool call arguments. Example: {"arg1": "value1", "arg2": "value2"}. */
|
|
10279
|
+
args?: Record<string, unknown>;
|
|
10076
10280
|
}
|
|
10077
10281
|
|
|
10078
10282
|
/**
|
|
@@ -10099,6 +10303,8 @@ export declare interface ToolConfig {
|
|
|
10099
10303
|
retrievalConfig?: RetrievalConfig;
|
|
10100
10304
|
/** Optional. Function calling config. */
|
|
10101
10305
|
functionCallingConfig?: FunctionCallingConfig;
|
|
10306
|
+
/** If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool invocations. */
|
|
10307
|
+
includeServerSideToolInvocations?: boolean;
|
|
10102
10308
|
}
|
|
10103
10309
|
|
|
10104
10310
|
export declare type ToolListUnion = ToolUnion[];
|
|
@@ -10111,6 +10317,49 @@ export declare interface ToolParallelAiSearch {
|
|
|
10111
10317
|
customConfigs?: Record<string, unknown>;
|
|
10112
10318
|
}
|
|
10113
10319
|
|
|
10320
|
+
/** The output from a server-side `ToolCall` execution.
|
|
10321
|
+
|
|
10322
|
+
This message contains the results of a tool invocation that was initiated by a
|
|
10323
|
+
`ToolCall` from the model. The client should pass this `ToolResponse` back to
|
|
10324
|
+
the API in a subsequent turn within a `Content` message, along with the
|
|
10325
|
+
corresponding `ToolCall`. */
|
|
10326
|
+
export declare class ToolResponse {
|
|
10327
|
+
/** The identifier of the tool call this response is for. */
|
|
10328
|
+
id?: string;
|
|
10329
|
+
/** The type of tool that was called, matching the tool_type in the corresponding ToolCall. */
|
|
10330
|
+
toolType?: ToolType;
|
|
10331
|
+
/** The tool response. */
|
|
10332
|
+
response?: Record<string, unknown>;
|
|
10333
|
+
}
|
|
10334
|
+
|
|
10335
|
+
/** The type of tool in the function call. */
|
|
10336
|
+
export declare enum ToolType {
|
|
10337
|
+
/**
|
|
10338
|
+
* Unspecified tool type.
|
|
10339
|
+
*/
|
|
10340
|
+
TOOL_TYPE_UNSPECIFIED = "TOOL_TYPE_UNSPECIFIED",
|
|
10341
|
+
/**
|
|
10342
|
+
* Google search tool, maps to Tool.google_search.search_types.web_search.
|
|
10343
|
+
*/
|
|
10344
|
+
GOOGLE_SEARCH_WEB = "GOOGLE_SEARCH_WEB",
|
|
10345
|
+
/**
|
|
10346
|
+
* Image search tool, maps to Tool.google_search.search_types.image_search.
|
|
10347
|
+
*/
|
|
10348
|
+
GOOGLE_SEARCH_IMAGE = "GOOGLE_SEARCH_IMAGE",
|
|
10349
|
+
/**
|
|
10350
|
+
* URL context tool, maps to Tool.url_context.
|
|
10351
|
+
*/
|
|
10352
|
+
URL_CONTEXT = "URL_CONTEXT",
|
|
10353
|
+
/**
|
|
10354
|
+
* Google maps tool, maps to Tool.google_maps.
|
|
10355
|
+
*/
|
|
10356
|
+
GOOGLE_MAPS = "GOOGLE_MAPS",
|
|
10357
|
+
/**
|
|
10358
|
+
* File search tool, maps to Tool.file_search.
|
|
10359
|
+
*/
|
|
10360
|
+
FILE_SEARCH = "FILE_SEARCH"
|
|
10361
|
+
}
|
|
10362
|
+
|
|
10114
10363
|
export declare type ToolUnion = Tool | CallableTool;
|
|
10115
10364
|
|
|
10116
10365
|
/** Output only. The traffic type for this request. This enum is not supported in Gemini API. */
|
|
@@ -10537,8 +10786,8 @@ declare namespace types {
|
|
|
10537
10786
|
createPartFromExecutableCode,
|
|
10538
10787
|
createUserContent,
|
|
10539
10788
|
createModelContent,
|
|
10540
|
-
Outcome,
|
|
10541
10789
|
Language,
|
|
10790
|
+
Outcome,
|
|
10542
10791
|
FunctionResponseScheduling,
|
|
10543
10792
|
Type,
|
|
10544
10793
|
PhishBlockThreshold,
|
|
@@ -10569,6 +10818,7 @@ declare namespace types {
|
|
|
10569
10818
|
PairwiseChoice,
|
|
10570
10819
|
TuningTask,
|
|
10571
10820
|
PartMediaResolutionLevel,
|
|
10821
|
+
ToolType,
|
|
10572
10822
|
ResourceScope,
|
|
10573
10823
|
FeatureSelectionPreference,
|
|
10574
10824
|
Environment,
|
|
@@ -10599,9 +10849,11 @@ declare namespace types {
|
|
|
10599
10849
|
Scale,
|
|
10600
10850
|
MusicGenerationMode,
|
|
10601
10851
|
LiveMusicPlaybackControl,
|
|
10602
|
-
PartMediaResolution,
|
|
10603
|
-
CodeExecutionResult,
|
|
10604
10852
|
ExecutableCode,
|
|
10853
|
+
CodeExecutionResult,
|
|
10854
|
+
PartMediaResolution,
|
|
10855
|
+
ToolCall,
|
|
10856
|
+
ToolResponse,
|
|
10605
10857
|
FileData,
|
|
10606
10858
|
PartialArg,
|
|
10607
10859
|
FunctionCall,
|
|
@@ -11106,7 +11358,7 @@ declare interface Uploader {
|
|
|
11106
11358
|
* @param apiClient The ApiClient to use for uploading.
|
|
11107
11359
|
* @return A Promise that resolves to types.File.
|
|
11108
11360
|
*/
|
|
11109
|
-
upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise<File_2>;
|
|
11361
|
+
upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient, httpOptions?: HttpOptions): Promise<File_2>;
|
|
11110
11362
|
/**
|
|
11111
11363
|
* Uploads a file to file search store via the given upload url.
|
|
11112
11364
|
*
|
|
@@ -11115,9 +11367,10 @@ declare interface Uploader {
|
|
|
11115
11367
|
* uploaded to. The uploadUrl must be a url that was returned by the
|
|
11116
11368
|
* https://generativelanguage.googleapis.com/upload/v1beta/{file_search_store_name}:uploadToFileSearchStore endpoint
|
|
11117
11369
|
* @param apiClient The ApiClient to use for uploading.
|
|
11370
|
+
* @param httpOptions Optional HTTP options to merge.
|
|
11118
11371
|
* @return A Promise that resolves to types.UploadToFileSearchStoreOperation.
|
|
11119
11372
|
*/
|
|
11120
|
-
uploadToFileSearchStore(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise<UploadToFileSearchStoreOperation>;
|
|
11373
|
+
uploadToFileSearchStore(file: string | Blob, uploadUrl: string, apiClient: ApiClient, httpOptions?: HttpOptions): Promise<UploadToFileSearchStoreOperation>;
|
|
11121
11374
|
/**
|
|
11122
11375
|
* Returns the file's mimeType and the size of a given file. If the file is a
|
|
11123
11376
|
* string path, the file type is determined by the file extension. If the
|
|
@@ -11293,6 +11546,29 @@ export declare class UpscaleImageResponse {
|
|
|
11293
11546
|
generatedImages?: GeneratedImage[];
|
|
11294
11547
|
}
|
|
11295
11548
|
|
|
11549
|
+
/**
|
|
11550
|
+
* A URL citation annotation.
|
|
11551
|
+
*/
|
|
11552
|
+
declare interface URLCitation {
|
|
11553
|
+
type: 'url_citation';
|
|
11554
|
+
/**
|
|
11555
|
+
* End of the attributed segment, exclusive.
|
|
11556
|
+
*/
|
|
11557
|
+
end_index?: number;
|
|
11558
|
+
/**
|
|
11559
|
+
* Start of segment of the response that is attributed to this source.
|
|
11560
|
+
*/
|
|
11561
|
+
start_index?: number;
|
|
11562
|
+
/**
|
|
11563
|
+
* The title of the URL.
|
|
11564
|
+
*/
|
|
11565
|
+
title?: string;
|
|
11566
|
+
/**
|
|
11567
|
+
* The URL.
|
|
11568
|
+
*/
|
|
11569
|
+
url?: string;
|
|
11570
|
+
}
|
|
11571
|
+
|
|
11296
11572
|
/** Tool to support URL context. */
|
|
11297
11573
|
export declare interface UrlContext {
|
|
11298
11574
|
}
|