@google/genai 1.52.0 → 2.0.1
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/README.md +1 -4
- package/dist/genai.d.ts +438 -432
- package/dist/index.cjs +30 -10
- package/dist/index.mjs +30 -10
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +30 -10
- package/dist/node/index.mjs +30 -10
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +438 -432
- package/dist/vertex_internal/index.cjs +29 -8
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.js +29 -8
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +30 -10
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +438 -432
- package/package.json +2 -2
package/dist/web/web.d.ts
CHANGED
|
@@ -487,6 +487,30 @@ declare interface AudioContent {
|
|
|
487
487
|
uri?: string;
|
|
488
488
|
}
|
|
489
489
|
|
|
490
|
+
/**
|
|
491
|
+
* Configuration for audio output format.
|
|
492
|
+
*/
|
|
493
|
+
declare interface AudioResponseFormat {
|
|
494
|
+
type: 'audio';
|
|
495
|
+
/**
|
|
496
|
+
* Bit rate in bits per second (bps). Only applicable for compressed formats (MP3,
|
|
497
|
+
* Opus).
|
|
498
|
+
*/
|
|
499
|
+
bit_rate?: number;
|
|
500
|
+
/**
|
|
501
|
+
* The delivery mode for the audio output.
|
|
502
|
+
*/
|
|
503
|
+
delivery?: 'inline' | 'url';
|
|
504
|
+
/**
|
|
505
|
+
* The MIME type of the audio output.
|
|
506
|
+
*/
|
|
507
|
+
mime_type?: 'audio/mp3' | 'audio/ogg_opus' | 'audio/l16' | 'audio/wav' | 'audio/alaw' | 'audio/mulaw';
|
|
508
|
+
/**
|
|
509
|
+
* Sample rate in Hz.
|
|
510
|
+
*/
|
|
511
|
+
sample_rate?: number;
|
|
512
|
+
}
|
|
513
|
+
|
|
490
514
|
/** The audio transcription configuration in Setup. */
|
|
491
515
|
export declare interface AudioTranscriptionConfig {
|
|
492
516
|
/** 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
|
|
@@ -659,7 +683,7 @@ declare interface BaseCreateAgentInteractionParams {
|
|
|
659
683
|
/**
|
|
660
684
|
* Body param: The input for the interaction.
|
|
661
685
|
*/
|
|
662
|
-
input: Array<
|
|
686
|
+
input: string | Array<Step> | Array<Content_2> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent;
|
|
663
687
|
/**
|
|
664
688
|
* Body param: Configuration parameters for the agent interaction.
|
|
665
689
|
*/
|
|
@@ -676,7 +700,7 @@ declare interface BaseCreateAgentInteractionParams {
|
|
|
676
700
|
* Body param: Enforces that the generated response is a JSON object that complies
|
|
677
701
|
* with the JSON schema specified in this field.
|
|
678
702
|
*/
|
|
679
|
-
response_format?: unknown;
|
|
703
|
+
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
|
|
680
704
|
/**
|
|
681
705
|
* Body param: The mime type of the response. This is required if response_format
|
|
682
706
|
* is set.
|
|
@@ -722,7 +746,7 @@ declare interface BaseCreateModelInteractionParams {
|
|
|
722
746
|
/**
|
|
723
747
|
* Body param: The input for the interaction.
|
|
724
748
|
*/
|
|
725
|
-
input: Array<
|
|
749
|
+
input: string | Array<Step> | Array<Content_2> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent;
|
|
726
750
|
/**
|
|
727
751
|
* Body param: The name of the `Model` used for generating the interaction.
|
|
728
752
|
*/
|
|
@@ -743,7 +767,7 @@ declare interface BaseCreateModelInteractionParams {
|
|
|
743
767
|
* Body param: Enforces that the generated response is a JSON object that complies
|
|
744
768
|
* with the JSON schema specified in this field.
|
|
745
769
|
*/
|
|
746
|
-
response_format?: unknown;
|
|
770
|
+
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
|
|
747
771
|
/**
|
|
748
772
|
* Body param: The mime type of the response. This is required if response_format
|
|
749
773
|
* is set.
|
|
@@ -1770,9 +1794,9 @@ declare interface CodeExecutionCallArguments {
|
|
|
1770
1794
|
}
|
|
1771
1795
|
|
|
1772
1796
|
/**
|
|
1773
|
-
* Code execution
|
|
1797
|
+
* Code execution call step.
|
|
1774
1798
|
*/
|
|
1775
|
-
declare interface
|
|
1799
|
+
declare interface CodeExecutionCallStep {
|
|
1776
1800
|
/**
|
|
1777
1801
|
* Required. A unique ID for this specific tool call.
|
|
1778
1802
|
*/
|
|
@@ -1780,7 +1804,7 @@ declare interface CodeExecutionCallContent {
|
|
|
1780
1804
|
/**
|
|
1781
1805
|
* Required. The arguments to pass to the code execution.
|
|
1782
1806
|
*/
|
|
1783
|
-
arguments:
|
|
1807
|
+
arguments: CodeExecutionCallStep.Arguments;
|
|
1784
1808
|
type: 'code_execution_call';
|
|
1785
1809
|
/**
|
|
1786
1810
|
* A signature hash for backend validation.
|
|
@@ -1788,6 +1812,22 @@ declare interface CodeExecutionCallContent {
|
|
|
1788
1812
|
signature?: string;
|
|
1789
1813
|
}
|
|
1790
1814
|
|
|
1815
|
+
declare namespace CodeExecutionCallStep {
|
|
1816
|
+
/**
|
|
1817
|
+
* Required. The arguments to pass to the code execution.
|
|
1818
|
+
*/
|
|
1819
|
+
interface Arguments {
|
|
1820
|
+
/**
|
|
1821
|
+
* The code to be executed.
|
|
1822
|
+
*/
|
|
1823
|
+
code?: string;
|
|
1824
|
+
/**
|
|
1825
|
+
* Programming language of the `code`.
|
|
1826
|
+
*/
|
|
1827
|
+
language?: 'python';
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1791
1831
|
/** Result of executing the `ExecutableCode`.
|
|
1792
1832
|
|
|
1793
1833
|
Generated only when the `CodeExecution` tool is used. */
|
|
@@ -1801,9 +1841,9 @@ export declare interface CodeExecutionResult {
|
|
|
1801
1841
|
}
|
|
1802
1842
|
|
|
1803
1843
|
/**
|
|
1804
|
-
* Code execution result
|
|
1844
|
+
* Code execution result step.
|
|
1805
1845
|
*/
|
|
1806
|
-
declare interface
|
|
1846
|
+
declare interface CodeExecutionResultStep {
|
|
1807
1847
|
/**
|
|
1808
1848
|
* Required. ID to match the ID from the function call block.
|
|
1809
1849
|
*/
|
|
@@ -1905,288 +1945,7 @@ export declare interface Content {
|
|
|
1905
1945
|
/**
|
|
1906
1946
|
* The content of the response.
|
|
1907
1947
|
*/
|
|
1908
|
-
declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent
|
|
1909
|
-
|
|
1910
|
-
declare interface ContentDelta {
|
|
1911
|
-
/**
|
|
1912
|
-
* The delta content data for a content block.
|
|
1913
|
-
*/
|
|
1914
|
-
delta: ContentDelta.Text | ContentDelta.Image | ContentDelta.Audio | ContentDelta.Document | ContentDelta.Video | ContentDelta.ThoughtSummary | ContentDelta.ThoughtSignature | ContentDelta.FunctionCall | ContentDelta.CodeExecutionCall | ContentDelta.URLContextCall | ContentDelta.GoogleSearchCall | ContentDelta.MCPServerToolCall | ContentDelta.FileSearchCall | ContentDelta.GoogleMapsCall | ContentDelta.FunctionResult | ContentDelta.CodeExecutionResult | ContentDelta.URLContextResult | ContentDelta.GoogleSearchResult | ContentDelta.MCPServerToolResult | ContentDelta.FileSearchResult | ContentDelta.GoogleMapsResult | ContentDelta.TextAnnotation;
|
|
1915
|
-
event_type: 'content.delta';
|
|
1916
|
-
index: number;
|
|
1917
|
-
/**
|
|
1918
|
-
* The event_id token to be used to resume the interaction stream, from this event.
|
|
1919
|
-
*/
|
|
1920
|
-
event_id?: string;
|
|
1921
|
-
}
|
|
1922
|
-
|
|
1923
|
-
declare namespace ContentDelta {
|
|
1924
|
-
interface Text {
|
|
1925
|
-
text: string;
|
|
1926
|
-
type: 'text';
|
|
1927
|
-
}
|
|
1928
|
-
interface Image {
|
|
1929
|
-
type: 'image';
|
|
1930
|
-
data?: string;
|
|
1931
|
-
mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif' | 'image/gif' | 'image/bmp' | 'image/tiff';
|
|
1932
|
-
/**
|
|
1933
|
-
* The resolution of the media.
|
|
1934
|
-
*/
|
|
1935
|
-
resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
|
|
1936
|
-
uri?: string;
|
|
1937
|
-
}
|
|
1938
|
-
interface Audio {
|
|
1939
|
-
type: 'audio';
|
|
1940
|
-
/**
|
|
1941
|
-
* The number of audio channels.
|
|
1942
|
-
*/
|
|
1943
|
-
channels?: number;
|
|
1944
|
-
data?: string;
|
|
1945
|
-
mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/mpeg' | 'audio/m4a' | 'audio/l16' | 'audio/opus' | 'audio/alaw' | 'audio/mulaw';
|
|
1946
|
-
/**
|
|
1947
|
-
* @deprecated Deprecated. Use sample_rate instead. The value is ignored.
|
|
1948
|
-
*/
|
|
1949
|
-
rate?: number;
|
|
1950
|
-
/**
|
|
1951
|
-
* The sample rate of the audio.
|
|
1952
|
-
*/
|
|
1953
|
-
sample_rate?: number;
|
|
1954
|
-
uri?: string;
|
|
1955
|
-
}
|
|
1956
|
-
interface Document {
|
|
1957
|
-
type: 'document';
|
|
1958
|
-
data?: string;
|
|
1959
|
-
mime_type?: 'application/pdf';
|
|
1960
|
-
uri?: string;
|
|
1961
|
-
}
|
|
1962
|
-
interface Video {
|
|
1963
|
-
type: 'video';
|
|
1964
|
-
data?: string;
|
|
1965
|
-
mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
|
|
1966
|
-
/**
|
|
1967
|
-
* The resolution of the media.
|
|
1968
|
-
*/
|
|
1969
|
-
resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
|
|
1970
|
-
uri?: string;
|
|
1971
|
-
}
|
|
1972
|
-
interface ThoughtSummary {
|
|
1973
|
-
type: 'thought_summary';
|
|
1974
|
-
/**
|
|
1975
|
-
* A new summary item to be added to the thought.
|
|
1976
|
-
*/
|
|
1977
|
-
content?: InteractionsAPI.TextContent | InteractionsAPI.ImageContent;
|
|
1978
|
-
}
|
|
1979
|
-
interface ThoughtSignature {
|
|
1980
|
-
type: 'thought_signature';
|
|
1981
|
-
/**
|
|
1982
|
-
* Signature to match the backend source to be part of the generation.
|
|
1983
|
-
*/
|
|
1984
|
-
signature?: string;
|
|
1985
|
-
}
|
|
1986
|
-
interface FunctionCall {
|
|
1987
|
-
/**
|
|
1988
|
-
* Required. A unique ID for this specific tool call.
|
|
1989
|
-
*/
|
|
1990
|
-
id: string;
|
|
1991
|
-
arguments: {
|
|
1992
|
-
[key: string]: unknown;
|
|
1993
|
-
};
|
|
1994
|
-
name: string;
|
|
1995
|
-
type: 'function_call';
|
|
1996
|
-
/**
|
|
1997
|
-
* A signature hash for backend validation.
|
|
1998
|
-
*/
|
|
1999
|
-
signature?: string;
|
|
2000
|
-
}
|
|
2001
|
-
interface CodeExecutionCall {
|
|
2002
|
-
/**
|
|
2003
|
-
* Required. A unique ID for this specific tool call.
|
|
2004
|
-
*/
|
|
2005
|
-
id: string;
|
|
2006
|
-
/**
|
|
2007
|
-
* The arguments to pass to the code execution.
|
|
2008
|
-
*/
|
|
2009
|
-
arguments: InteractionsAPI.CodeExecutionCallArguments;
|
|
2010
|
-
type: 'code_execution_call';
|
|
2011
|
-
/**
|
|
2012
|
-
* A signature hash for backend validation.
|
|
2013
|
-
*/
|
|
2014
|
-
signature?: string;
|
|
2015
|
-
}
|
|
2016
|
-
interface URLContextCall {
|
|
2017
|
-
/**
|
|
2018
|
-
* Required. A unique ID for this specific tool call.
|
|
2019
|
-
*/
|
|
2020
|
-
id: string;
|
|
2021
|
-
/**
|
|
2022
|
-
* The arguments to pass to the URL context.
|
|
2023
|
-
*/
|
|
2024
|
-
arguments: InteractionsAPI.URLContextCallArguments;
|
|
2025
|
-
type: 'url_context_call';
|
|
2026
|
-
/**
|
|
2027
|
-
* A signature hash for backend validation.
|
|
2028
|
-
*/
|
|
2029
|
-
signature?: string;
|
|
2030
|
-
}
|
|
2031
|
-
interface GoogleSearchCall {
|
|
2032
|
-
/**
|
|
2033
|
-
* Required. A unique ID for this specific tool call.
|
|
2034
|
-
*/
|
|
2035
|
-
id: string;
|
|
2036
|
-
/**
|
|
2037
|
-
* The arguments to pass to Google Search.
|
|
2038
|
-
*/
|
|
2039
|
-
arguments: InteractionsAPI.GoogleSearchCallArguments;
|
|
2040
|
-
type: 'google_search_call';
|
|
2041
|
-
/**
|
|
2042
|
-
* A signature hash for backend validation.
|
|
2043
|
-
*/
|
|
2044
|
-
signature?: string;
|
|
2045
|
-
}
|
|
2046
|
-
interface MCPServerToolCall {
|
|
2047
|
-
/**
|
|
2048
|
-
* Required. A unique ID for this specific tool call.
|
|
2049
|
-
*/
|
|
2050
|
-
id: string;
|
|
2051
|
-
arguments: {
|
|
2052
|
-
[key: string]: unknown;
|
|
2053
|
-
};
|
|
2054
|
-
name: string;
|
|
2055
|
-
server_name: string;
|
|
2056
|
-
type: 'mcp_server_tool_call';
|
|
2057
|
-
/**
|
|
2058
|
-
* A signature hash for backend validation.
|
|
2059
|
-
*/
|
|
2060
|
-
signature?: string;
|
|
2061
|
-
}
|
|
2062
|
-
interface FileSearchCall {
|
|
2063
|
-
/**
|
|
2064
|
-
* Required. A unique ID for this specific tool call.
|
|
2065
|
-
*/
|
|
2066
|
-
id: string;
|
|
2067
|
-
type: 'file_search_call';
|
|
2068
|
-
/**
|
|
2069
|
-
* A signature hash for backend validation.
|
|
2070
|
-
*/
|
|
2071
|
-
signature?: string;
|
|
2072
|
-
}
|
|
2073
|
-
interface GoogleMapsCall {
|
|
2074
|
-
/**
|
|
2075
|
-
* Required. A unique ID for this specific tool call.
|
|
2076
|
-
*/
|
|
2077
|
-
id: string;
|
|
2078
|
-
type: 'google_maps_call';
|
|
2079
|
-
/**
|
|
2080
|
-
* The arguments to pass to the Google Maps tool.
|
|
2081
|
-
*/
|
|
2082
|
-
arguments?: InteractionsAPI.GoogleMapsCallArguments;
|
|
2083
|
-
/**
|
|
2084
|
-
* A signature hash for backend validation.
|
|
2085
|
-
*/
|
|
2086
|
-
signature?: string;
|
|
2087
|
-
}
|
|
2088
|
-
interface FunctionResult {
|
|
2089
|
-
/**
|
|
2090
|
-
* Required. ID to match the ID from the function call block.
|
|
2091
|
-
*/
|
|
2092
|
-
call_id: string;
|
|
2093
|
-
result: unknown | Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent> | string;
|
|
2094
|
-
type: 'function_result';
|
|
2095
|
-
is_error?: boolean;
|
|
2096
|
-
name?: string;
|
|
2097
|
-
/**
|
|
2098
|
-
* A signature hash for backend validation.
|
|
2099
|
-
*/
|
|
2100
|
-
signature?: string;
|
|
2101
|
-
}
|
|
2102
|
-
interface CodeExecutionResult {
|
|
2103
|
-
/**
|
|
2104
|
-
* Required. ID to match the ID from the function call block.
|
|
2105
|
-
*/
|
|
2106
|
-
call_id: string;
|
|
2107
|
-
result: string;
|
|
2108
|
-
type: 'code_execution_result';
|
|
2109
|
-
is_error?: boolean;
|
|
2110
|
-
/**
|
|
2111
|
-
* A signature hash for backend validation.
|
|
2112
|
-
*/
|
|
2113
|
-
signature?: string;
|
|
2114
|
-
}
|
|
2115
|
-
interface URLContextResult {
|
|
2116
|
-
/**
|
|
2117
|
-
* Required. ID to match the ID from the function call block.
|
|
2118
|
-
*/
|
|
2119
|
-
call_id: string;
|
|
2120
|
-
result: Array<InteractionsAPI.URLContextResult>;
|
|
2121
|
-
type: 'url_context_result';
|
|
2122
|
-
is_error?: boolean;
|
|
2123
|
-
/**
|
|
2124
|
-
* A signature hash for backend validation.
|
|
2125
|
-
*/
|
|
2126
|
-
signature?: string;
|
|
2127
|
-
}
|
|
2128
|
-
interface GoogleSearchResult {
|
|
2129
|
-
/**
|
|
2130
|
-
* Required. ID to match the ID from the function call block.
|
|
2131
|
-
*/
|
|
2132
|
-
call_id: string;
|
|
2133
|
-
result: Array<InteractionsAPI.GoogleSearchResult>;
|
|
2134
|
-
type: 'google_search_result';
|
|
2135
|
-
is_error?: boolean;
|
|
2136
|
-
/**
|
|
2137
|
-
* A signature hash for backend validation.
|
|
2138
|
-
*/
|
|
2139
|
-
signature?: string;
|
|
2140
|
-
}
|
|
2141
|
-
interface MCPServerToolResult {
|
|
2142
|
-
/**
|
|
2143
|
-
* Required. ID to match the ID from the function call block.
|
|
2144
|
-
*/
|
|
2145
|
-
call_id: string;
|
|
2146
|
-
result: unknown | Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent> | string;
|
|
2147
|
-
type: 'mcp_server_tool_result';
|
|
2148
|
-
name?: string;
|
|
2149
|
-
server_name?: string;
|
|
2150
|
-
/**
|
|
2151
|
-
* A signature hash for backend validation.
|
|
2152
|
-
*/
|
|
2153
|
-
signature?: string;
|
|
2154
|
-
}
|
|
2155
|
-
interface FileSearchResult {
|
|
2156
|
-
/**
|
|
2157
|
-
* Required. ID to match the ID from the function call block.
|
|
2158
|
-
*/
|
|
2159
|
-
call_id: string;
|
|
2160
|
-
result: Array<unknown>;
|
|
2161
|
-
type: 'file_search_result';
|
|
2162
|
-
/**
|
|
2163
|
-
* A signature hash for backend validation.
|
|
2164
|
-
*/
|
|
2165
|
-
signature?: string;
|
|
2166
|
-
}
|
|
2167
|
-
interface GoogleMapsResult {
|
|
2168
|
-
/**
|
|
2169
|
-
* Required. ID to match the ID from the function call block.
|
|
2170
|
-
*/
|
|
2171
|
-
call_id: string;
|
|
2172
|
-
type: 'google_maps_result';
|
|
2173
|
-
/**
|
|
2174
|
-
* The results of the Google Maps.
|
|
2175
|
-
*/
|
|
2176
|
-
result?: Array<InteractionsAPI.GoogleMapsResult>;
|
|
2177
|
-
/**
|
|
2178
|
-
* A signature hash for backend validation.
|
|
2179
|
-
*/
|
|
2180
|
-
signature?: string;
|
|
2181
|
-
}
|
|
2182
|
-
interface TextAnnotation {
|
|
2183
|
-
type: 'text_annotation';
|
|
2184
|
-
/**
|
|
2185
|
-
* Citation information for model-generated content.
|
|
2186
|
-
*/
|
|
2187
|
-
annotations?: Array<InteractionsAPI.Annotation>;
|
|
2188
|
-
}
|
|
2189
|
-
}
|
|
1948
|
+
declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent;
|
|
2190
1949
|
|
|
2191
1950
|
/** The embedding generated from an input content. */
|
|
2192
1951
|
export declare interface ContentEmbedding {
|
|
@@ -2228,28 +1987,6 @@ export declare class ContentReferenceImage {
|
|
|
2228
1987
|
toReferenceImageAPI(): ReferenceImageAPIInternal;
|
|
2229
1988
|
}
|
|
2230
1989
|
|
|
2231
|
-
declare interface ContentStart {
|
|
2232
|
-
/**
|
|
2233
|
-
* The content of the response.
|
|
2234
|
-
*/
|
|
2235
|
-
content: Content_2;
|
|
2236
|
-
event_type: 'content.start';
|
|
2237
|
-
index: number;
|
|
2238
|
-
/**
|
|
2239
|
-
* The event_id token to be used to resume the interaction stream, from this event.
|
|
2240
|
-
*/
|
|
2241
|
-
event_id?: string;
|
|
2242
|
-
}
|
|
2243
|
-
|
|
2244
|
-
declare interface ContentStop {
|
|
2245
|
-
event_type: 'content.stop';
|
|
2246
|
-
index: number;
|
|
2247
|
-
/**
|
|
2248
|
-
* The event_id token to be used to resume the interaction stream, from this event.
|
|
2249
|
-
*/
|
|
2250
|
-
event_id?: string;
|
|
2251
|
-
}
|
|
2252
|
-
|
|
2253
1990
|
export declare type ContentUnion = Content | PartUnion[] | PartUnion;
|
|
2254
1991
|
|
|
2255
1992
|
/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */
|
|
@@ -2848,8 +2585,7 @@ declare interface DeepResearchAgentConfig {
|
|
|
2848
2585
|
/**
|
|
2849
2586
|
* Enables human-in-the-loop planning for the Deep Research agent. If set to true,
|
|
2850
2587
|
* the Deep Research agent will provide a research plan in its response. The agent
|
|
2851
|
-
* will then proceed only if the user confirms the plan in the next turn.
|
|
2852
|
-
* issue: b/482352502.
|
|
2588
|
+
* will then proceed only if the user confirms the plan in the next turn.
|
|
2853
2589
|
*/
|
|
2854
2590
|
collaborative_planning?: boolean;
|
|
2855
2591
|
/**
|
|
@@ -3910,9 +3646,9 @@ export declare interface FileSearch {
|
|
|
3910
3646
|
}
|
|
3911
3647
|
|
|
3912
3648
|
/**
|
|
3913
|
-
* File Search
|
|
3649
|
+
* File Search call step.
|
|
3914
3650
|
*/
|
|
3915
|
-
declare interface
|
|
3651
|
+
declare interface FileSearchCallStep {
|
|
3916
3652
|
/**
|
|
3917
3653
|
* Required. A unique ID for this specific tool call.
|
|
3918
3654
|
*/
|
|
@@ -3925,18 +3661,14 @@ declare interface FileSearchCallContent {
|
|
|
3925
3661
|
}
|
|
3926
3662
|
|
|
3927
3663
|
/**
|
|
3928
|
-
* File Search result
|
|
3664
|
+
* File Search result step.
|
|
3929
3665
|
*/
|
|
3930
|
-
declare interface
|
|
3666
|
+
declare interface FileSearchResultStep {
|
|
3931
3667
|
/**
|
|
3932
3668
|
* Required. ID to match the ID from the function call block.
|
|
3933
3669
|
*/
|
|
3934
3670
|
call_id: string;
|
|
3935
3671
|
type: 'file_search_result';
|
|
3936
|
-
/**
|
|
3937
|
-
* Optional. The results of the File Search.
|
|
3938
|
-
*/
|
|
3939
|
-
result?: Array<unknown>;
|
|
3940
3672
|
/**
|
|
3941
3673
|
* A signature hash for backend validation.
|
|
3942
3674
|
*/
|
|
@@ -4234,31 +3966,6 @@ export declare interface FunctionCall {
|
|
|
4234
3966
|
willContinue?: boolean;
|
|
4235
3967
|
}
|
|
4236
3968
|
|
|
4237
|
-
/**
|
|
4238
|
-
* A function tool call content block.
|
|
4239
|
-
*/
|
|
4240
|
-
declare interface FunctionCallContent {
|
|
4241
|
-
/**
|
|
4242
|
-
* Required. A unique ID for this specific tool call.
|
|
4243
|
-
*/
|
|
4244
|
-
id: string;
|
|
4245
|
-
/**
|
|
4246
|
-
* Required. The arguments to pass to the function.
|
|
4247
|
-
*/
|
|
4248
|
-
arguments: {
|
|
4249
|
-
[key: string]: unknown;
|
|
4250
|
-
};
|
|
4251
|
-
/**
|
|
4252
|
-
* Required. The name of the tool to call.
|
|
4253
|
-
*/
|
|
4254
|
-
name: string;
|
|
4255
|
-
type: 'function_call';
|
|
4256
|
-
/**
|
|
4257
|
-
* A signature hash for backend validation.
|
|
4258
|
-
*/
|
|
4259
|
-
signature?: string;
|
|
4260
|
-
}
|
|
4261
|
-
|
|
4262
3969
|
/** Function calling config. */
|
|
4263
3970
|
export declare interface FunctionCallingConfig {
|
|
4264
3971
|
/** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */
|
|
@@ -4293,6 +4000,31 @@ export declare enum FunctionCallingConfigMode {
|
|
|
4293
4000
|
VALIDATED = "VALIDATED"
|
|
4294
4001
|
}
|
|
4295
4002
|
|
|
4003
|
+
/**
|
|
4004
|
+
* A function tool call step.
|
|
4005
|
+
*/
|
|
4006
|
+
declare interface FunctionCallStep {
|
|
4007
|
+
/**
|
|
4008
|
+
* Required. A unique ID for this specific tool call.
|
|
4009
|
+
*/
|
|
4010
|
+
id: string;
|
|
4011
|
+
/**
|
|
4012
|
+
* Required. The arguments to pass to the function.
|
|
4013
|
+
*/
|
|
4014
|
+
arguments: {
|
|
4015
|
+
[key: string]: unknown;
|
|
4016
|
+
};
|
|
4017
|
+
/**
|
|
4018
|
+
* Required. The name of the tool to call.
|
|
4019
|
+
*/
|
|
4020
|
+
name: string;
|
|
4021
|
+
type: 'function_call';
|
|
4022
|
+
/**
|
|
4023
|
+
* A signature hash for backend validation.
|
|
4024
|
+
*/
|
|
4025
|
+
signature?: string;
|
|
4026
|
+
}
|
|
4027
|
+
|
|
4296
4028
|
/** Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. */
|
|
4297
4029
|
export declare interface FunctionDeclaration {
|
|
4298
4030
|
/** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */
|
|
@@ -4391,9 +4123,9 @@ export declare enum FunctionResponseScheduling {
|
|
|
4391
4123
|
}
|
|
4392
4124
|
|
|
4393
4125
|
/**
|
|
4394
|
-
*
|
|
4126
|
+
* Result of a function tool call.
|
|
4395
4127
|
*/
|
|
4396
|
-
declare interface
|
|
4128
|
+
declare interface FunctionResultStep {
|
|
4397
4129
|
/**
|
|
4398
4130
|
* Required. ID to match the ID from the function call block.
|
|
4399
4131
|
*/
|
|
@@ -5513,9 +5245,9 @@ declare interface GoogleMapsCallArguments {
|
|
|
5513
5245
|
}
|
|
5514
5246
|
|
|
5515
5247
|
/**
|
|
5516
|
-
* Google Maps
|
|
5248
|
+
* Google Maps call step.
|
|
5517
5249
|
*/
|
|
5518
|
-
declare interface
|
|
5250
|
+
declare interface GoogleMapsCallStep {
|
|
5519
5251
|
/**
|
|
5520
5252
|
* Required. A unique ID for this specific tool call.
|
|
5521
5253
|
*/
|
|
@@ -5524,13 +5256,25 @@ declare interface GoogleMapsCallContent {
|
|
|
5524
5256
|
/**
|
|
5525
5257
|
* The arguments to pass to the Google Maps tool.
|
|
5526
5258
|
*/
|
|
5527
|
-
arguments?:
|
|
5259
|
+
arguments?: GoogleMapsCallStep.Arguments;
|
|
5528
5260
|
/**
|
|
5529
5261
|
* A signature hash for backend validation.
|
|
5530
5262
|
*/
|
|
5531
5263
|
signature?: string;
|
|
5532
5264
|
}
|
|
5533
5265
|
|
|
5266
|
+
declare namespace GoogleMapsCallStep {
|
|
5267
|
+
/**
|
|
5268
|
+
* The arguments to pass to the Google Maps tool.
|
|
5269
|
+
*/
|
|
5270
|
+
interface Arguments {
|
|
5271
|
+
/**
|
|
5272
|
+
* The queries to be executed.
|
|
5273
|
+
*/
|
|
5274
|
+
queries?: Array<string>;
|
|
5275
|
+
}
|
|
5276
|
+
}
|
|
5277
|
+
|
|
5534
5278
|
/**
|
|
5535
5279
|
* The result of the Google Maps.
|
|
5536
5280
|
*/
|
|
@@ -5588,17 +5332,14 @@ declare namespace GoogleMapsResult {
|
|
|
5588
5332
|
}
|
|
5589
5333
|
|
|
5590
5334
|
/**
|
|
5591
|
-
* Google Maps result
|
|
5335
|
+
* Google Maps result step.
|
|
5592
5336
|
*/
|
|
5593
|
-
declare interface
|
|
5337
|
+
declare interface GoogleMapsResultStep {
|
|
5594
5338
|
/**
|
|
5595
5339
|
* Required. ID to match the ID from the function call block.
|
|
5596
5340
|
*/
|
|
5597
5341
|
call_id: string;
|
|
5598
|
-
|
|
5599
|
-
* Required. The results of the Google Maps.
|
|
5600
|
-
*/
|
|
5601
|
-
result: Array<GoogleMapsResult>;
|
|
5342
|
+
result: Array<GoogleMapsResultStep.Result>;
|
|
5602
5343
|
type: 'google_maps_result';
|
|
5603
5344
|
/**
|
|
5604
5345
|
* A signature hash for backend validation.
|
|
@@ -5606,6 +5347,44 @@ declare interface GoogleMapsResultContent {
|
|
|
5606
5347
|
signature?: string;
|
|
5607
5348
|
}
|
|
5608
5349
|
|
|
5350
|
+
declare namespace GoogleMapsResultStep {
|
|
5351
|
+
/**
|
|
5352
|
+
* The result of the Google Maps.
|
|
5353
|
+
*/
|
|
5354
|
+
interface Result {
|
|
5355
|
+
places?: Array<Result.Place>;
|
|
5356
|
+
widget_context_token?: string;
|
|
5357
|
+
}
|
|
5358
|
+
namespace Result {
|
|
5359
|
+
interface Place {
|
|
5360
|
+
name?: string;
|
|
5361
|
+
place_id?: string;
|
|
5362
|
+
review_snippets?: Array<Place.ReviewSnippet>;
|
|
5363
|
+
url?: string;
|
|
5364
|
+
}
|
|
5365
|
+
namespace Place {
|
|
5366
|
+
/**
|
|
5367
|
+
* Encapsulates a snippet of a user review that answers a question about the
|
|
5368
|
+
* features of a specific place in Google Maps.
|
|
5369
|
+
*/
|
|
5370
|
+
interface ReviewSnippet {
|
|
5371
|
+
/**
|
|
5372
|
+
* The ID of the review snippet.
|
|
5373
|
+
*/
|
|
5374
|
+
review_id?: string;
|
|
5375
|
+
/**
|
|
5376
|
+
* Title of the review.
|
|
5377
|
+
*/
|
|
5378
|
+
title?: string;
|
|
5379
|
+
/**
|
|
5380
|
+
* A link that corresponds to the user review on Google Maps.
|
|
5381
|
+
*/
|
|
5382
|
+
url?: string;
|
|
5383
|
+
}
|
|
5384
|
+
}
|
|
5385
|
+
}
|
|
5386
|
+
}
|
|
5387
|
+
|
|
5609
5388
|
/** 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. */
|
|
5610
5389
|
export declare interface GoogleRpcStatus {
|
|
5611
5390
|
/** The status code, which should be an enum value of google.rpc.Code. */
|
|
@@ -5639,9 +5418,9 @@ declare interface GoogleSearchCallArguments {
|
|
|
5639
5418
|
}
|
|
5640
5419
|
|
|
5641
5420
|
/**
|
|
5642
|
-
* Google Search
|
|
5421
|
+
* Google Search call step.
|
|
5643
5422
|
*/
|
|
5644
|
-
declare interface
|
|
5423
|
+
declare interface GoogleSearchCallStep {
|
|
5645
5424
|
/**
|
|
5646
5425
|
* Required. A unique ID for this specific tool call.
|
|
5647
5426
|
*/
|
|
@@ -5649,7 +5428,7 @@ declare interface GoogleSearchCallContent {
|
|
|
5649
5428
|
/**
|
|
5650
5429
|
* Required. The arguments to pass to Google Search.
|
|
5651
5430
|
*/
|
|
5652
|
-
arguments:
|
|
5431
|
+
arguments: GoogleSearchCallStep.Arguments;
|
|
5653
5432
|
type: 'google_search_call';
|
|
5654
5433
|
/**
|
|
5655
5434
|
* The type of search grounding enabled.
|
|
@@ -5661,6 +5440,18 @@ declare interface GoogleSearchCallContent {
|
|
|
5661
5440
|
signature?: string;
|
|
5662
5441
|
}
|
|
5663
5442
|
|
|
5443
|
+
declare namespace GoogleSearchCallStep {
|
|
5444
|
+
/**
|
|
5445
|
+
* Required. The arguments to pass to Google Search.
|
|
5446
|
+
*/
|
|
5447
|
+
interface Arguments {
|
|
5448
|
+
/**
|
|
5449
|
+
* Web search queries for the following-up web search.
|
|
5450
|
+
*/
|
|
5451
|
+
queries?: Array<string>;
|
|
5452
|
+
}
|
|
5453
|
+
}
|
|
5454
|
+
|
|
5664
5455
|
/**
|
|
5665
5456
|
* The result of the Google Search.
|
|
5666
5457
|
*/
|
|
@@ -5672,9 +5463,9 @@ declare interface GoogleSearchResult {
|
|
|
5672
5463
|
}
|
|
5673
5464
|
|
|
5674
5465
|
/**
|
|
5675
|
-
* Google Search result
|
|
5466
|
+
* Google Search result step.
|
|
5676
5467
|
*/
|
|
5677
|
-
declare interface
|
|
5468
|
+
declare interface GoogleSearchResultStep {
|
|
5678
5469
|
/**
|
|
5679
5470
|
* Required. ID to match the ID from the function call block.
|
|
5680
5471
|
*/
|
|
@@ -5682,7 +5473,7 @@ declare interface GoogleSearchResultContent {
|
|
|
5682
5473
|
/**
|
|
5683
5474
|
* Required. The results of the Google Search.
|
|
5684
5475
|
*/
|
|
5685
|
-
result: Array<
|
|
5476
|
+
result: Array<GoogleSearchResultStep.Result>;
|
|
5686
5477
|
type: 'google_search_result';
|
|
5687
5478
|
/**
|
|
5688
5479
|
* Whether the Google Search resulted in an error.
|
|
@@ -5694,6 +5485,18 @@ declare interface GoogleSearchResultContent {
|
|
|
5694
5485
|
signature?: string;
|
|
5695
5486
|
}
|
|
5696
5487
|
|
|
5488
|
+
declare namespace GoogleSearchResultStep {
|
|
5489
|
+
/**
|
|
5490
|
+
* The result of the Google Search.
|
|
5491
|
+
*/
|
|
5492
|
+
interface Result {
|
|
5493
|
+
/**
|
|
5494
|
+
* Web content snippet that can be embedded in a web page or an app webview.
|
|
5495
|
+
*/
|
|
5496
|
+
search_suggestions?: string;
|
|
5497
|
+
}
|
|
5498
|
+
}
|
|
5499
|
+
|
|
5697
5500
|
/** Tool to retrieve public web data for grounding, powered by Google. */
|
|
5698
5501
|
export declare interface GoogleSearchRetrieval {
|
|
5699
5502
|
/** Specifies the dynamic retrieval configuration for the given source. */
|
|
@@ -6311,6 +6114,29 @@ export declare enum ImageResizeMode {
|
|
|
6311
6114
|
PAD = "PAD"
|
|
6312
6115
|
}
|
|
6313
6116
|
|
|
6117
|
+
/**
|
|
6118
|
+
* Configuration for image output format.
|
|
6119
|
+
*/
|
|
6120
|
+
declare interface ImageResponseFormat {
|
|
6121
|
+
type: 'image';
|
|
6122
|
+
/**
|
|
6123
|
+
* The aspect ratio for the image output.
|
|
6124
|
+
*/
|
|
6125
|
+
aspect_ratio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9' | '1:8' | '8:1' | '1:4' | '4:1';
|
|
6126
|
+
/**
|
|
6127
|
+
* The delivery mode for the image output.
|
|
6128
|
+
*/
|
|
6129
|
+
delivery?: 'inline' | 'url';
|
|
6130
|
+
/**
|
|
6131
|
+
* The size of the image output.
|
|
6132
|
+
*/
|
|
6133
|
+
image_size?: '512' | '1K' | '2K' | '4K';
|
|
6134
|
+
/**
|
|
6135
|
+
* The MIME type of the image output.
|
|
6136
|
+
*/
|
|
6137
|
+
mime_type?: 'image/jpeg';
|
|
6138
|
+
}
|
|
6139
|
+
|
|
6314
6140
|
/** Image search for grounding and related configurations. */
|
|
6315
6141
|
export declare interface ImageSearch {
|
|
6316
6142
|
}
|
|
@@ -6442,15 +6268,11 @@ declare interface Interaction {
|
|
|
6442
6268
|
/**
|
|
6443
6269
|
* The input for the interaction.
|
|
6444
6270
|
*/
|
|
6445
|
-
input?: Array<
|
|
6271
|
+
input?: string | Array<Step> | Array<Content_2> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent;
|
|
6446
6272
|
/**
|
|
6447
6273
|
* The name of the `Model` used for generating the interaction.
|
|
6448
6274
|
*/
|
|
6449
6275
|
model?: Model_2;
|
|
6450
|
-
/**
|
|
6451
|
-
* Output only. Responses from the model.
|
|
6452
|
-
*/
|
|
6453
|
-
outputs?: Array<Content_2>;
|
|
6454
6276
|
/**
|
|
6455
6277
|
* The ID of the previous interaction, if any.
|
|
6456
6278
|
*/
|
|
@@ -6459,7 +6281,7 @@ declare interface Interaction {
|
|
|
6459
6281
|
* Enforces that the generated response is a JSON object that complies with the
|
|
6460
6282
|
* JSON schema specified in this field.
|
|
6461
6283
|
*/
|
|
6462
|
-
response_format?: unknown;
|
|
6284
|
+
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
|
|
6463
6285
|
/**
|
|
6464
6286
|
* The mime type of the response. This is required if response_format is set.
|
|
6465
6287
|
*/
|
|
@@ -6469,13 +6291,17 @@ declare interface Interaction {
|
|
|
6469
6291
|
*/
|
|
6470
6292
|
response_modalities?: Array<'text' | 'image' | 'audio' | 'video' | 'document'>;
|
|
6471
6293
|
/**
|
|
6472
|
-
* Output only. The role of the interaction.
|
|
6294
|
+
* @deprecated Output only. The role of the interaction.
|
|
6473
6295
|
*/
|
|
6474
6296
|
role?: string;
|
|
6475
6297
|
/**
|
|
6476
6298
|
* The service tier for the interaction.
|
|
6477
6299
|
*/
|
|
6478
6300
|
service_tier?: 'flex' | 'standard' | 'priority';
|
|
6301
|
+
/**
|
|
6302
|
+
* Output only. The steps that make up the interaction.
|
|
6303
|
+
*/
|
|
6304
|
+
steps?: Array<Step>;
|
|
6479
6305
|
/**
|
|
6480
6306
|
* System instruction for the interaction.
|
|
6481
6307
|
*/
|
|
@@ -6502,8 +6328,8 @@ declare interface InteractionCancelParams {
|
|
|
6502
6328
|
api_version?: string;
|
|
6503
6329
|
}
|
|
6504
6330
|
|
|
6505
|
-
declare interface
|
|
6506
|
-
event_type: 'interaction.
|
|
6331
|
+
declare interface InteractionCompletedEvent {
|
|
6332
|
+
event_type: 'interaction.completed';
|
|
6507
6333
|
/**
|
|
6508
6334
|
* Required. The completed interaction with empty outputs to reduce the payload
|
|
6509
6335
|
* size. Use the preceding ContentDelta events for the actual output.
|
|
@@ -6515,6 +6341,18 @@ declare interface InteractionCompleteEvent {
|
|
|
6515
6341
|
event_id?: string;
|
|
6516
6342
|
}
|
|
6517
6343
|
|
|
6344
|
+
declare interface InteractionCreatedEvent {
|
|
6345
|
+
event_type: 'interaction.created';
|
|
6346
|
+
/**
|
|
6347
|
+
* The Interaction resource.
|
|
6348
|
+
*/
|
|
6349
|
+
interaction: Interaction;
|
|
6350
|
+
/**
|
|
6351
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
6352
|
+
*/
|
|
6353
|
+
event_id?: string;
|
|
6354
|
+
}
|
|
6355
|
+
|
|
6518
6356
|
declare type InteractionCreateParams = CreateModelInteractionParamsNonStreaming | CreateModelInteractionParamsStreaming | CreateAgentInteractionParamsNonStreaming | CreateAgentInteractionParamsStreaming;
|
|
6519
6357
|
|
|
6520
6358
|
declare interface InteractionDeleteParams {
|
|
@@ -6575,7 +6413,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
6575
6413
|
}
|
|
6576
6414
|
|
|
6577
6415
|
export declare namespace Interactions {
|
|
6578
|
-
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type
|
|
6416
|
+
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type AudioResponseFormat as AudioResponseFormat, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallStep as CodeExecutionCallStep, type CodeExecutionResultStep as CodeExecutionResultStep, type Content_2 as Content, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileCitation as FileCitation, type FileSearchCallStep as FileSearchCallStep, type FileSearchResultStep as FileSearchResultStep, type Function_2 as Function, type FunctionCallStep as FunctionCallStep, type FunctionResultStep as FunctionResultStep, type GenerationConfig_2 as GenerationConfig, type GoogleMapsCallArguments as GoogleMapsCallArguments, type GoogleMapsCallStep as GoogleMapsCallStep, type GoogleMapsResult as GoogleMapsResult, type GoogleMapsResultStep as GoogleMapsResultStep, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallStep as GoogleSearchCallStep, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultStep as GoogleSearchResultStep, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type ImageResponseFormat as ImageResponseFormat, type Interaction as Interaction, type InteractionCompletedEvent as InteractionCompletedEvent, type InteractionCreatedEvent as InteractionCreatedEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallStep as MCPServerToolCallStep, type MCPServerToolResultStep as MCPServerToolResultStep, type Model_2 as Model, type ModelOutputStep as ModelOutputStep, type PlaceCitation as PlaceCitation, type SpeechConfig_2 as SpeechConfig, type Step as Step, type StepDelta as StepDelta, type StepStart as StepStart, type StepStop as StepStop, type TextContent as TextContent, type TextResponseFormat as TextResponseFormat, type ThinkingLevel_2 as ThinkingLevel, type ThoughtStep as ThoughtStep, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type URLCitation as URLCitation, type URLContextCallArguments as URLContextCallArguments, type URLContextCallStep as URLContextCallStep, type URLContextResult as URLContextResult, type URLContextResultStep as URLContextResultStep, type Usage as Usage, type UserInputStep as UserInputStep, type VideoContent as VideoContent, type VideoResponseFormat as VideoResponseFormat, type WebhookConfig_2 as WebhookConfig, 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, };
|
|
6579
6417
|
}
|
|
6580
6418
|
|
|
6581
6419
|
declare namespace InteractionsAPI {
|
|
@@ -6585,58 +6423,64 @@ declare namespace InteractionsAPI {
|
|
|
6585
6423
|
AllowedTools,
|
|
6586
6424
|
Annotation,
|
|
6587
6425
|
AudioContent,
|
|
6426
|
+
AudioResponseFormat,
|
|
6588
6427
|
CodeExecutionCallArguments,
|
|
6589
|
-
|
|
6590
|
-
|
|
6428
|
+
CodeExecutionCallStep,
|
|
6429
|
+
CodeExecutionResultStep,
|
|
6591
6430
|
Content_2 as Content,
|
|
6592
|
-
ContentDelta,
|
|
6593
|
-
ContentStart,
|
|
6594
|
-
ContentStop,
|
|
6595
6431
|
DeepResearchAgentConfig,
|
|
6596
6432
|
DocumentContent,
|
|
6597
6433
|
DynamicAgentConfig,
|
|
6598
6434
|
ErrorEvent_2 as ErrorEvent,
|
|
6599
6435
|
FileCitation,
|
|
6600
|
-
|
|
6601
|
-
|
|
6436
|
+
FileSearchCallStep,
|
|
6437
|
+
FileSearchResultStep,
|
|
6602
6438
|
Function_2 as Function,
|
|
6603
|
-
|
|
6604
|
-
|
|
6439
|
+
FunctionCallStep,
|
|
6440
|
+
FunctionResultStep,
|
|
6605
6441
|
GenerationConfig_2 as GenerationConfig,
|
|
6606
6442
|
GoogleMapsCallArguments,
|
|
6607
|
-
|
|
6443
|
+
GoogleMapsCallStep,
|
|
6608
6444
|
GoogleMapsResult,
|
|
6609
|
-
|
|
6445
|
+
GoogleMapsResultStep,
|
|
6610
6446
|
GoogleSearchCallArguments,
|
|
6611
|
-
|
|
6447
|
+
GoogleSearchCallStep,
|
|
6612
6448
|
GoogleSearchResult,
|
|
6613
|
-
|
|
6449
|
+
GoogleSearchResultStep,
|
|
6614
6450
|
ImageConfig_2 as ImageConfig,
|
|
6615
6451
|
ImageContent,
|
|
6452
|
+
ImageResponseFormat,
|
|
6616
6453
|
Interaction,
|
|
6617
|
-
|
|
6454
|
+
InteractionCompletedEvent,
|
|
6455
|
+
InteractionCreatedEvent,
|
|
6618
6456
|
InteractionSSEEvent,
|
|
6619
|
-
InteractionStartEvent,
|
|
6620
6457
|
InteractionStatusUpdate,
|
|
6621
|
-
|
|
6622
|
-
|
|
6458
|
+
MCPServerToolCallStep,
|
|
6459
|
+
MCPServerToolResultStep,
|
|
6623
6460
|
Model_2 as Model,
|
|
6461
|
+
ModelOutputStep,
|
|
6624
6462
|
PlaceCitation,
|
|
6625
6463
|
SpeechConfig_2 as SpeechConfig,
|
|
6464
|
+
Step,
|
|
6465
|
+
StepDelta,
|
|
6466
|
+
StepStart,
|
|
6467
|
+
StepStop,
|
|
6626
6468
|
TextContent,
|
|
6469
|
+
TextResponseFormat,
|
|
6627
6470
|
ThinkingLevel_2 as ThinkingLevel,
|
|
6628
|
-
|
|
6471
|
+
ThoughtStep,
|
|
6629
6472
|
Tool_2 as Tool,
|
|
6630
6473
|
ToolChoiceConfig,
|
|
6631
6474
|
ToolChoiceType,
|
|
6632
|
-
Turn,
|
|
6633
6475
|
URLCitation,
|
|
6634
6476
|
URLContextCallArguments,
|
|
6635
|
-
|
|
6477
|
+
URLContextCallStep,
|
|
6636
6478
|
URLContextResult,
|
|
6637
|
-
|
|
6479
|
+
URLContextResultStep,
|
|
6638
6480
|
Usage,
|
|
6481
|
+
UserInputStep,
|
|
6639
6482
|
VideoContent,
|
|
6483
|
+
VideoResponseFormat,
|
|
6640
6484
|
WebhookConfig_2 as WebhookConfig,
|
|
6641
6485
|
InteractionDeleteResponse,
|
|
6642
6486
|
InteractionCreateParams,
|
|
@@ -6655,19 +6499,7 @@ declare namespace InteractionsAPI {
|
|
|
6655
6499
|
}
|
|
6656
6500
|
}
|
|
6657
6501
|
|
|
6658
|
-
declare type InteractionSSEEvent =
|
|
6659
|
-
|
|
6660
|
-
declare interface InteractionStartEvent {
|
|
6661
|
-
event_type: 'interaction.start';
|
|
6662
|
-
/**
|
|
6663
|
-
* The Interaction resource.
|
|
6664
|
-
*/
|
|
6665
|
-
interaction: Interaction;
|
|
6666
|
-
/**
|
|
6667
|
-
* The event_id token to be used to resume the interaction stream, from this event.
|
|
6668
|
-
*/
|
|
6669
|
-
event_id?: string;
|
|
6670
|
-
}
|
|
6502
|
+
declare type InteractionSSEEvent = InteractionCreatedEvent | InteractionCompletedEvent | InteractionStatusUpdate | ErrorEvent_2 | StepStart | StepDelta | StepStop;
|
|
6671
6503
|
|
|
6672
6504
|
declare interface InteractionStatusUpdate {
|
|
6673
6505
|
event_type: 'interaction.status_update';
|
|
@@ -7870,9 +7702,9 @@ export declare interface McpServer {
|
|
|
7870
7702
|
}
|
|
7871
7703
|
|
|
7872
7704
|
/**
|
|
7873
|
-
* MCPServer tool call
|
|
7705
|
+
* MCPServer tool call step.
|
|
7874
7706
|
*/
|
|
7875
|
-
declare interface
|
|
7707
|
+
declare interface MCPServerToolCallStep {
|
|
7876
7708
|
/**
|
|
7877
7709
|
* Required. A unique ID for this specific tool call.
|
|
7878
7710
|
*/
|
|
@@ -7899,9 +7731,9 @@ declare interface MCPServerToolCallContent {
|
|
|
7899
7731
|
}
|
|
7900
7732
|
|
|
7901
7733
|
/**
|
|
7902
|
-
* MCPServer tool result
|
|
7734
|
+
* MCPServer tool result step.
|
|
7903
7735
|
*/
|
|
7904
|
-
declare interface
|
|
7736
|
+
declare interface MCPServerToolResultStep {
|
|
7905
7737
|
/**
|
|
7906
7738
|
* Required. ID to match the ID from the function call block.
|
|
7907
7739
|
*/
|
|
@@ -7909,7 +7741,7 @@ declare interface MCPServerToolResultContent {
|
|
|
7909
7741
|
/**
|
|
7910
7742
|
* The output from the MCP server call. Can be simple text or rich content.
|
|
7911
7743
|
*/
|
|
7912
|
-
result: unknown | Array<TextContent | ImageContent
|
|
7744
|
+
result: unknown | string | Array<TextContent | ImageContent>;
|
|
7913
7745
|
type: 'mcp_server_tool_result';
|
|
7914
7746
|
/**
|
|
7915
7747
|
* Name of the tool which is called for this specific tool call.
|
|
@@ -8094,6 +7926,14 @@ export declare interface ModelArmorConfig {
|
|
|
8094
7926
|
responseTemplateName?: string;
|
|
8095
7927
|
}
|
|
8096
7928
|
|
|
7929
|
+
/**
|
|
7930
|
+
* Output generated by the model.
|
|
7931
|
+
*/
|
|
7932
|
+
declare interface ModelOutputStep {
|
|
7933
|
+
type: 'model_output';
|
|
7934
|
+
content?: Array<Content_2>;
|
|
7935
|
+
}
|
|
7936
|
+
|
|
8097
7937
|
export declare class Models extends BaseModule {
|
|
8098
7938
|
private readonly apiClient;
|
|
8099
7939
|
constructor(apiClient: ApiClient);
|
|
@@ -10121,6 +9961,119 @@ export declare enum StartSensitivity {
|
|
|
10121
9961
|
START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW"
|
|
10122
9962
|
}
|
|
10123
9963
|
|
|
9964
|
+
/**
|
|
9965
|
+
* A step in the interaction.
|
|
9966
|
+
*/
|
|
9967
|
+
declare type Step = UserInputStep | ModelOutputStep | ThoughtStep | FunctionCallStep | CodeExecutionCallStep | URLContextCallStep | MCPServerToolCallStep | GoogleSearchCallStep | FileSearchCallStep | GoogleMapsCallStep | FunctionResultStep | CodeExecutionResultStep | URLContextResultStep | GoogleSearchResultStep | MCPServerToolResultStep | FileSearchResultStep | GoogleMapsResultStep;
|
|
9968
|
+
|
|
9969
|
+
declare interface StepDelta {
|
|
9970
|
+
delta: StepDelta.Text | StepDelta.Image | StepDelta.Audio | StepDelta.Document | StepDelta.Video | StepDelta.ThoughtSummary | StepDelta.ThoughtSignature | StepDelta.TextAnnotationDelta | StepDelta.ArgumentsDelta;
|
|
9971
|
+
event_type: 'step.delta';
|
|
9972
|
+
index: number;
|
|
9973
|
+
/**
|
|
9974
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
9975
|
+
*/
|
|
9976
|
+
event_id?: string;
|
|
9977
|
+
}
|
|
9978
|
+
|
|
9979
|
+
declare namespace StepDelta {
|
|
9980
|
+
interface Text {
|
|
9981
|
+
text: string;
|
|
9982
|
+
type: 'text';
|
|
9983
|
+
}
|
|
9984
|
+
interface Image {
|
|
9985
|
+
type: 'image';
|
|
9986
|
+
data?: string;
|
|
9987
|
+
mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif' | 'image/gif' | 'image/bmp' | 'image/tiff';
|
|
9988
|
+
/**
|
|
9989
|
+
* The resolution of the media.
|
|
9990
|
+
*/
|
|
9991
|
+
resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
|
|
9992
|
+
uri?: string;
|
|
9993
|
+
}
|
|
9994
|
+
interface Audio {
|
|
9995
|
+
type: 'audio';
|
|
9996
|
+
/**
|
|
9997
|
+
* The number of audio channels.
|
|
9998
|
+
*/
|
|
9999
|
+
channels?: number;
|
|
10000
|
+
data?: string;
|
|
10001
|
+
mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/mpeg' | 'audio/m4a' | 'audio/l16' | 'audio/opus' | 'audio/alaw' | 'audio/mulaw';
|
|
10002
|
+
/**
|
|
10003
|
+
* @deprecated Deprecated. Use sample_rate instead. The value is ignored.
|
|
10004
|
+
*/
|
|
10005
|
+
rate?: number;
|
|
10006
|
+
/**
|
|
10007
|
+
* The sample rate of the audio.
|
|
10008
|
+
*/
|
|
10009
|
+
sample_rate?: number;
|
|
10010
|
+
uri?: string;
|
|
10011
|
+
}
|
|
10012
|
+
interface Document {
|
|
10013
|
+
type: 'document';
|
|
10014
|
+
data?: string;
|
|
10015
|
+
mime_type?: 'application/pdf';
|
|
10016
|
+
uri?: string;
|
|
10017
|
+
}
|
|
10018
|
+
interface Video {
|
|
10019
|
+
type: 'video';
|
|
10020
|
+
data?: string;
|
|
10021
|
+
mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
|
|
10022
|
+
/**
|
|
10023
|
+
* The resolution of the media.
|
|
10024
|
+
*/
|
|
10025
|
+
resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
|
|
10026
|
+
uri?: string;
|
|
10027
|
+
}
|
|
10028
|
+
interface ThoughtSummary {
|
|
10029
|
+
type: 'thought_summary';
|
|
10030
|
+
/**
|
|
10031
|
+
* A new summary item to be added to the thought.
|
|
10032
|
+
*/
|
|
10033
|
+
content?: InteractionsAPI.TextContent | InteractionsAPI.ImageContent;
|
|
10034
|
+
}
|
|
10035
|
+
interface ThoughtSignature {
|
|
10036
|
+
type: 'thought_signature';
|
|
10037
|
+
/**
|
|
10038
|
+
* Signature to match the backend source to be part of the generation.
|
|
10039
|
+
*/
|
|
10040
|
+
signature?: string;
|
|
10041
|
+
}
|
|
10042
|
+
interface TextAnnotationDelta {
|
|
10043
|
+
type: 'text_annotation_delta';
|
|
10044
|
+
/**
|
|
10045
|
+
* Citation information for model-generated content.
|
|
10046
|
+
*/
|
|
10047
|
+
annotations?: Array<InteractionsAPI.Annotation>;
|
|
10048
|
+
}
|
|
10049
|
+
interface ArgumentsDelta {
|
|
10050
|
+
type: 'arguments_delta';
|
|
10051
|
+
partial_arguments?: string;
|
|
10052
|
+
}
|
|
10053
|
+
}
|
|
10054
|
+
|
|
10055
|
+
declare interface StepStart {
|
|
10056
|
+
event_type: 'step.start';
|
|
10057
|
+
index: number;
|
|
10058
|
+
/**
|
|
10059
|
+
* A step in the interaction.
|
|
10060
|
+
*/
|
|
10061
|
+
step: Step;
|
|
10062
|
+
/**
|
|
10063
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
10064
|
+
*/
|
|
10065
|
+
event_id?: string;
|
|
10066
|
+
}
|
|
10067
|
+
|
|
10068
|
+
declare interface StepStop {
|
|
10069
|
+
event_type: 'step.stop';
|
|
10070
|
+
index: number;
|
|
10071
|
+
/**
|
|
10072
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
10073
|
+
*/
|
|
10074
|
+
event_id?: string;
|
|
10075
|
+
}
|
|
10076
|
+
|
|
10124
10077
|
declare class Stream<Item> implements AsyncIterable<Item> {
|
|
10125
10078
|
private iterator;
|
|
10126
10079
|
controller: AbortController;
|
|
@@ -10356,6 +10309,24 @@ declare interface TextContent {
|
|
|
10356
10309
|
annotations?: Array<Annotation>;
|
|
10357
10310
|
}
|
|
10358
10311
|
|
|
10312
|
+
/**
|
|
10313
|
+
* Configuration for text output format.
|
|
10314
|
+
*/
|
|
10315
|
+
declare interface TextResponseFormat {
|
|
10316
|
+
type: 'text';
|
|
10317
|
+
/**
|
|
10318
|
+
* The MIME type of the text output.
|
|
10319
|
+
*/
|
|
10320
|
+
mime_type?: 'application/json' | 'text/plain';
|
|
10321
|
+
/**
|
|
10322
|
+
* The JSON schema that the output should conform to. Only applicable when
|
|
10323
|
+
* mime_type is application/json.
|
|
10324
|
+
*/
|
|
10325
|
+
schema?: {
|
|
10326
|
+
[key: string]: unknown;
|
|
10327
|
+
};
|
|
10328
|
+
}
|
|
10329
|
+
|
|
10359
10330
|
/** The thinking features configuration. */
|
|
10360
10331
|
export declare interface ThinkingConfig {
|
|
10361
10332
|
/** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.
|
|
@@ -10395,12 +10366,12 @@ export declare enum ThinkingLevel {
|
|
|
10395
10366
|
declare type ThinkingLevel_2 = 'minimal' | 'low' | 'medium' | 'high';
|
|
10396
10367
|
|
|
10397
10368
|
/**
|
|
10398
|
-
* A thought
|
|
10369
|
+
* A thought step.
|
|
10399
10370
|
*/
|
|
10400
|
-
declare interface
|
|
10371
|
+
declare interface ThoughtStep {
|
|
10401
10372
|
type: 'thought';
|
|
10402
10373
|
/**
|
|
10403
|
-
*
|
|
10374
|
+
* A signature hash for backend validation.
|
|
10404
10375
|
*/
|
|
10405
10376
|
signature?: string;
|
|
10406
10377
|
/**
|
|
@@ -10570,7 +10541,7 @@ declare namespace Tool_2 {
|
|
|
10570
10541
|
/**
|
|
10571
10542
|
* The list of predefined functions that are excluded from the model call.
|
|
10572
10543
|
*/
|
|
10573
|
-
|
|
10544
|
+
excluded_predefined_functions?: Array<string>;
|
|
10574
10545
|
}
|
|
10575
10546
|
/**
|
|
10576
10547
|
* A MCPServer is a server that can be called by the model to perform actions.
|
|
@@ -11109,14 +11080,6 @@ export declare interface TuningValidationDataset {
|
|
|
11109
11080
|
vertexDatasetResource?: string;
|
|
11110
11081
|
}
|
|
11111
11082
|
|
|
11112
|
-
declare interface Turn {
|
|
11113
|
-
content?: Array<Content_2> | string;
|
|
11114
|
-
/**
|
|
11115
|
-
* The originator of this turn. Must be user for input or model for model output.
|
|
11116
|
-
*/
|
|
11117
|
-
role?: string;
|
|
11118
|
-
}
|
|
11119
|
-
|
|
11120
11083
|
/** The reason why the turn is complete. */
|
|
11121
11084
|
export declare enum TurnCompleteReason {
|
|
11122
11085
|
/**
|
|
@@ -12116,9 +12079,9 @@ declare interface URLContextCallArguments {
|
|
|
12116
12079
|
}
|
|
12117
12080
|
|
|
12118
12081
|
/**
|
|
12119
|
-
* URL context
|
|
12082
|
+
* URL context call step.
|
|
12120
12083
|
*/
|
|
12121
|
-
declare interface
|
|
12084
|
+
declare interface URLContextCallStep {
|
|
12122
12085
|
/**
|
|
12123
12086
|
* Required. A unique ID for this specific tool call.
|
|
12124
12087
|
*/
|
|
@@ -12126,7 +12089,7 @@ declare interface URLContextCallContent {
|
|
|
12126
12089
|
/**
|
|
12127
12090
|
* Required. The arguments to pass to the URL context.
|
|
12128
12091
|
*/
|
|
12129
|
-
arguments:
|
|
12092
|
+
arguments: URLContextCallStep.Arguments;
|
|
12130
12093
|
type: 'url_context_call';
|
|
12131
12094
|
/**
|
|
12132
12095
|
* A signature hash for backend validation.
|
|
@@ -12134,6 +12097,18 @@ declare interface URLContextCallContent {
|
|
|
12134
12097
|
signature?: string;
|
|
12135
12098
|
}
|
|
12136
12099
|
|
|
12100
|
+
declare namespace URLContextCallStep {
|
|
12101
|
+
/**
|
|
12102
|
+
* Required. The arguments to pass to the URL context.
|
|
12103
|
+
*/
|
|
12104
|
+
interface Arguments {
|
|
12105
|
+
/**
|
|
12106
|
+
* The URLs to fetch.
|
|
12107
|
+
*/
|
|
12108
|
+
urls?: Array<string>;
|
|
12109
|
+
}
|
|
12110
|
+
}
|
|
12111
|
+
|
|
12137
12112
|
/** Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL. */
|
|
12138
12113
|
export declare interface UrlContextMetadata {
|
|
12139
12114
|
/** Output only. A list of URL metadata, with one entry for each URL retrieved by the tool. */
|
|
@@ -12155,9 +12130,9 @@ declare interface URLContextResult {
|
|
|
12155
12130
|
}
|
|
12156
12131
|
|
|
12157
12132
|
/**
|
|
12158
|
-
* URL context result
|
|
12133
|
+
* URL context result step.
|
|
12159
12134
|
*/
|
|
12160
|
-
declare interface
|
|
12135
|
+
declare interface URLContextResultStep {
|
|
12161
12136
|
/**
|
|
12162
12137
|
* Required. ID to match the ID from the function call block.
|
|
12163
12138
|
*/
|
|
@@ -12165,7 +12140,7 @@ declare interface URLContextResultContent {
|
|
|
12165
12140
|
/**
|
|
12166
12141
|
* Required. The results of the URL context.
|
|
12167
12142
|
*/
|
|
12168
|
-
result: Array<
|
|
12143
|
+
result: Array<URLContextResultStep.Result>;
|
|
12169
12144
|
type: 'url_context_result';
|
|
12170
12145
|
/**
|
|
12171
12146
|
* Whether the URL context resulted in an error.
|
|
@@ -12177,6 +12152,22 @@ declare interface URLContextResultContent {
|
|
|
12177
12152
|
signature?: string;
|
|
12178
12153
|
}
|
|
12179
12154
|
|
|
12155
|
+
declare namespace URLContextResultStep {
|
|
12156
|
+
/**
|
|
12157
|
+
* The result of the URL context.
|
|
12158
|
+
*/
|
|
12159
|
+
interface Result {
|
|
12160
|
+
/**
|
|
12161
|
+
* The status of the URL retrieval.
|
|
12162
|
+
*/
|
|
12163
|
+
status?: 'success' | 'error' | 'paywall' | 'unsafe';
|
|
12164
|
+
/**
|
|
12165
|
+
* The URL that was fetched.
|
|
12166
|
+
*/
|
|
12167
|
+
url?: string;
|
|
12168
|
+
}
|
|
12169
|
+
}
|
|
12170
|
+
|
|
12180
12171
|
/** The metadata for a single URL retrieval. */
|
|
12181
12172
|
export declare interface UrlMetadata {
|
|
12182
12173
|
/** The URL retrieved by the tool. */
|
|
@@ -12355,6 +12346,14 @@ export declare interface UsageMetadata {
|
|
|
12355
12346
|
trafficType?: TrafficType;
|
|
12356
12347
|
}
|
|
12357
12348
|
|
|
12349
|
+
/**
|
|
12350
|
+
* Input provided by the user.
|
|
12351
|
+
*/
|
|
12352
|
+
declare interface UserInputStep {
|
|
12353
|
+
type: 'user_input';
|
|
12354
|
+
content?: Array<Content_2>;
|
|
12355
|
+
}
|
|
12356
|
+
|
|
12358
12357
|
/** The type of the VAD signal. */
|
|
12359
12358
|
export declare enum VadSignalType {
|
|
12360
12359
|
/**
|
|
@@ -12568,6 +12567,13 @@ export declare interface VideoMetadata {
|
|
|
12568
12567
|
startOffset?: string;
|
|
12569
12568
|
}
|
|
12570
12569
|
|
|
12570
|
+
/**
|
|
12571
|
+
* Configuration for video output format.
|
|
12572
|
+
*/
|
|
12573
|
+
declare interface VideoResponseFormat {
|
|
12574
|
+
type: 'video';
|
|
12575
|
+
}
|
|
12576
|
+
|
|
12571
12577
|
/** Voice activity signal. */
|
|
12572
12578
|
export declare interface VoiceActivity {
|
|
12573
12579
|
/** The type of the voice activity signal. */
|