@google/genai 1.42.0 → 1.43.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 +270 -160
- package/dist/index.cjs +187 -77
- package/dist/index.mjs +188 -78
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +187 -77
- package/dist/node/index.mjs +188 -78
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +270 -160
- package/dist/tokenizer/node.cjs +48 -32
- package/dist/tokenizer/node.d.ts +48 -3
- package/dist/tokenizer/node.mjs +48 -32
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/web/index.mjs +188 -78
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +270 -160
- package/package.json +1 -1
package/dist/node/node.d.ts
CHANGED
|
@@ -411,18 +411,13 @@ declare interface AudioContent {
|
|
|
411
411
|
/**
|
|
412
412
|
* The mime type of the audio.
|
|
413
413
|
*/
|
|
414
|
-
mime_type?:
|
|
414
|
+
mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac';
|
|
415
415
|
/**
|
|
416
416
|
* The URI of the audio.
|
|
417
417
|
*/
|
|
418
418
|
uri?: string;
|
|
419
419
|
}
|
|
420
420
|
|
|
421
|
-
/**
|
|
422
|
-
* The mime type of the audio.
|
|
423
|
-
*/
|
|
424
|
-
declare type AudioMimeType = 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | (string & {});
|
|
425
|
-
|
|
426
421
|
/** The audio transcription configuration in Setup. */
|
|
427
422
|
export declare interface AudioTranscriptionConfig {
|
|
428
423
|
}
|
|
@@ -1336,10 +1331,12 @@ export declare interface Candidate {
|
|
|
1336
1331
|
If empty, the model has not stopped generating the tokens.
|
|
1337
1332
|
*/
|
|
1338
1333
|
finishReason?: FinishReason;
|
|
1334
|
+
/** Output only. Metadata returned when grounding is enabled. It
|
|
1335
|
+
contains the sources used to ground the generated content.
|
|
1336
|
+
*/
|
|
1337
|
+
groundingMetadata?: GroundingMetadata;
|
|
1339
1338
|
/** Output only. Average log probability score of the candidate. */
|
|
1340
1339
|
avgLogprobs?: number;
|
|
1341
|
-
/** Output only. Metadata specifies sources used to ground generated content. */
|
|
1342
|
-
groundingMetadata?: GroundingMetadata;
|
|
1343
1340
|
/** Output only. Index of the candidate. */
|
|
1344
1341
|
index?: number;
|
|
1345
1342
|
/** Output only. Log-likelihood scores for the response tokens and top tokens */
|
|
@@ -1603,15 +1600,15 @@ declare interface CodeExecutionCallArguments {
|
|
|
1603
1600
|
* Code execution content.
|
|
1604
1601
|
*/
|
|
1605
1602
|
declare interface CodeExecutionCallContent {
|
|
1606
|
-
type: 'code_execution_call';
|
|
1607
1603
|
/**
|
|
1608
1604
|
* A unique ID for this specific tool call.
|
|
1609
1605
|
*/
|
|
1610
|
-
id
|
|
1606
|
+
id: string;
|
|
1611
1607
|
/**
|
|
1612
1608
|
* The arguments to pass to the code execution.
|
|
1613
1609
|
*/
|
|
1614
|
-
arguments
|
|
1610
|
+
arguments: CodeExecutionCallArguments;
|
|
1611
|
+
type: 'code_execution_call';
|
|
1615
1612
|
}
|
|
1616
1613
|
|
|
1617
1614
|
/** Result of executing the [ExecutableCode]. Only generated when using the [CodeExecution] tool, and always follows a `part` containing the [ExecutableCode]. */
|
|
@@ -1626,19 +1623,19 @@ export declare interface CodeExecutionResult {
|
|
|
1626
1623
|
* Code execution result content.
|
|
1627
1624
|
*/
|
|
1628
1625
|
declare interface CodeExecutionResultContent {
|
|
1629
|
-
type: 'code_execution_result';
|
|
1630
1626
|
/**
|
|
1631
1627
|
* ID to match the ID from the code execution call block.
|
|
1632
1628
|
*/
|
|
1633
|
-
call_id
|
|
1629
|
+
call_id: string;
|
|
1634
1630
|
/**
|
|
1635
|
-
*
|
|
1631
|
+
* The output of the code execution.
|
|
1636
1632
|
*/
|
|
1637
|
-
|
|
1633
|
+
result: string;
|
|
1634
|
+
type: 'code_execution_result';
|
|
1638
1635
|
/**
|
|
1639
|
-
*
|
|
1636
|
+
* Whether the code execution resulted in an error.
|
|
1640
1637
|
*/
|
|
1641
|
-
|
|
1638
|
+
is_error?: boolean;
|
|
1642
1639
|
/**
|
|
1643
1640
|
* A signature hash for backend validation.
|
|
1644
1641
|
*/
|
|
@@ -1730,31 +1727,28 @@ export declare interface Content {
|
|
|
1730
1727
|
declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
|
|
1731
1728
|
|
|
1732
1729
|
declare interface ContentDelta {
|
|
1730
|
+
delta: ContentDelta.TextDelta | ContentDelta.ImageDelta | ContentDelta.AudioDelta | ContentDelta.DocumentDelta | ContentDelta.VideoDelta | ContentDelta.ThoughtSummaryDelta | ContentDelta.ThoughtSignatureDelta | ContentDelta.FunctionCallDelta | ContentDelta.FunctionResultDelta | ContentDelta.CodeExecutionCallDelta | ContentDelta.CodeExecutionResultDelta | ContentDelta.URLContextCallDelta | ContentDelta.URLContextResultDelta | ContentDelta.GoogleSearchCallDelta | ContentDelta.GoogleSearchResultDelta | ContentDelta.MCPServerToolCallDelta | ContentDelta.MCPServerToolResultDelta | ContentDelta.FileSearchCallDelta | ContentDelta.FileSearchResultDelta;
|
|
1733
1731
|
event_type: 'content.delta';
|
|
1734
|
-
|
|
1732
|
+
index: number;
|
|
1735
1733
|
/**
|
|
1736
1734
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
1737
1735
|
*/
|
|
1738
1736
|
event_id?: string;
|
|
1739
|
-
index?: number;
|
|
1740
1737
|
}
|
|
1741
1738
|
|
|
1742
1739
|
declare namespace ContentDelta {
|
|
1743
1740
|
interface TextDelta {
|
|
1741
|
+
text: string;
|
|
1744
1742
|
type: 'text';
|
|
1745
1743
|
/**
|
|
1746
1744
|
* Citation information for model-generated content.
|
|
1747
1745
|
*/
|
|
1748
1746
|
annotations?: Array<InteractionsAPI.Annotation>;
|
|
1749
|
-
text?: string;
|
|
1750
1747
|
}
|
|
1751
1748
|
interface ImageDelta {
|
|
1752
1749
|
type: 'image';
|
|
1753
1750
|
data?: string;
|
|
1754
|
-
|
|
1755
|
-
* The mime type of the image.
|
|
1756
|
-
*/
|
|
1757
|
-
mime_type?: InteractionsAPI.ImageMimeType;
|
|
1751
|
+
mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif';
|
|
1758
1752
|
/**
|
|
1759
1753
|
* The resolution of the media.
|
|
1760
1754
|
*/
|
|
@@ -1764,28 +1758,19 @@ declare namespace ContentDelta {
|
|
|
1764
1758
|
interface AudioDelta {
|
|
1765
1759
|
type: 'audio';
|
|
1766
1760
|
data?: string;
|
|
1767
|
-
|
|
1768
|
-
* The mime type of the audio.
|
|
1769
|
-
*/
|
|
1770
|
-
mime_type?: InteractionsAPI.AudioMimeType;
|
|
1761
|
+
mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac';
|
|
1771
1762
|
uri?: string;
|
|
1772
1763
|
}
|
|
1773
1764
|
interface DocumentDelta {
|
|
1774
1765
|
type: 'document';
|
|
1775
1766
|
data?: string;
|
|
1776
|
-
|
|
1777
|
-
* The mime type of the document.
|
|
1778
|
-
*/
|
|
1779
|
-
mime_type?: InteractionsAPI.DocumentMimeType;
|
|
1767
|
+
mime_type?: 'application/pdf';
|
|
1780
1768
|
uri?: string;
|
|
1781
1769
|
}
|
|
1782
1770
|
interface VideoDelta {
|
|
1783
1771
|
type: 'video';
|
|
1784
1772
|
data?: string;
|
|
1785
|
-
|
|
1786
|
-
* The mime type of the video.
|
|
1787
|
-
*/
|
|
1788
|
-
mime_type?: InteractionsAPI.VideoMimeType;
|
|
1773
|
+
mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
|
|
1789
1774
|
/**
|
|
1790
1775
|
* The resolution of the media.
|
|
1791
1776
|
*/
|
|
@@ -1807,28 +1792,28 @@ declare namespace ContentDelta {
|
|
|
1807
1792
|
signature?: string;
|
|
1808
1793
|
}
|
|
1809
1794
|
interface FunctionCallDelta {
|
|
1810
|
-
type: 'function_call';
|
|
1811
1795
|
/**
|
|
1812
1796
|
* A unique ID for this specific tool call.
|
|
1813
1797
|
*/
|
|
1814
|
-
id
|
|
1815
|
-
arguments
|
|
1798
|
+
id: string;
|
|
1799
|
+
arguments: {
|
|
1816
1800
|
[key: string]: unknown;
|
|
1817
1801
|
};
|
|
1818
|
-
name
|
|
1802
|
+
name: string;
|
|
1803
|
+
type: 'function_call';
|
|
1819
1804
|
}
|
|
1820
1805
|
interface FunctionResultDelta {
|
|
1821
|
-
type: 'function_result';
|
|
1822
1806
|
/**
|
|
1823
1807
|
* ID to match the ID from the function call block.
|
|
1824
1808
|
*/
|
|
1825
|
-
call_id
|
|
1826
|
-
is_error?: boolean;
|
|
1827
|
-
name?: string;
|
|
1809
|
+
call_id: string;
|
|
1828
1810
|
/**
|
|
1829
1811
|
* Tool call result delta.
|
|
1830
1812
|
*/
|
|
1831
|
-
result
|
|
1813
|
+
result: FunctionResultDelta.Items | unknown | string;
|
|
1814
|
+
type: 'function_result';
|
|
1815
|
+
is_error?: boolean;
|
|
1816
|
+
name?: string;
|
|
1832
1817
|
}
|
|
1833
1818
|
namespace FunctionResultDelta {
|
|
1834
1819
|
interface Items {
|
|
@@ -1836,91 +1821,91 @@ declare namespace ContentDelta {
|
|
|
1836
1821
|
}
|
|
1837
1822
|
}
|
|
1838
1823
|
interface CodeExecutionCallDelta {
|
|
1839
|
-
type: 'code_execution_call';
|
|
1840
1824
|
/**
|
|
1841
1825
|
* A unique ID for this specific tool call.
|
|
1842
1826
|
*/
|
|
1843
|
-
id
|
|
1827
|
+
id: string;
|
|
1844
1828
|
/**
|
|
1845
1829
|
* The arguments to pass to the code execution.
|
|
1846
1830
|
*/
|
|
1847
|
-
arguments
|
|
1831
|
+
arguments: InteractionsAPI.CodeExecutionCallArguments;
|
|
1832
|
+
type: 'code_execution_call';
|
|
1848
1833
|
}
|
|
1849
1834
|
interface CodeExecutionResultDelta {
|
|
1850
|
-
type: 'code_execution_result';
|
|
1851
1835
|
/**
|
|
1852
1836
|
* ID to match the ID from the function call block.
|
|
1853
1837
|
*/
|
|
1854
|
-
call_id
|
|
1838
|
+
call_id: string;
|
|
1839
|
+
result: string;
|
|
1840
|
+
type: 'code_execution_result';
|
|
1855
1841
|
is_error?: boolean;
|
|
1856
|
-
result?: string;
|
|
1857
1842
|
signature?: string;
|
|
1858
1843
|
}
|
|
1859
1844
|
interface URLContextCallDelta {
|
|
1860
|
-
type: 'url_context_call';
|
|
1861
1845
|
/**
|
|
1862
1846
|
* A unique ID for this specific tool call.
|
|
1863
1847
|
*/
|
|
1864
|
-
id
|
|
1848
|
+
id: string;
|
|
1865
1849
|
/**
|
|
1866
1850
|
* The arguments to pass to the URL context.
|
|
1867
1851
|
*/
|
|
1868
|
-
arguments
|
|
1852
|
+
arguments: InteractionsAPI.URLContextCallArguments;
|
|
1853
|
+
type: 'url_context_call';
|
|
1869
1854
|
}
|
|
1870
1855
|
interface URLContextResultDelta {
|
|
1871
|
-
type: 'url_context_result';
|
|
1872
1856
|
/**
|
|
1873
1857
|
* ID to match the ID from the function call block.
|
|
1874
1858
|
*/
|
|
1875
|
-
call_id
|
|
1859
|
+
call_id: string;
|
|
1860
|
+
result: Array<InteractionsAPI.URLContextResult>;
|
|
1861
|
+
type: 'url_context_result';
|
|
1876
1862
|
is_error?: boolean;
|
|
1877
|
-
result?: Array<InteractionsAPI.URLContextResult>;
|
|
1878
1863
|
signature?: string;
|
|
1879
1864
|
}
|
|
1880
1865
|
interface GoogleSearchCallDelta {
|
|
1881
|
-
type: 'google_search_call';
|
|
1882
1866
|
/**
|
|
1883
1867
|
* A unique ID for this specific tool call.
|
|
1884
1868
|
*/
|
|
1885
|
-
id
|
|
1869
|
+
id: string;
|
|
1886
1870
|
/**
|
|
1887
1871
|
* The arguments to pass to Google Search.
|
|
1888
1872
|
*/
|
|
1889
|
-
arguments
|
|
1873
|
+
arguments: InteractionsAPI.GoogleSearchCallArguments;
|
|
1874
|
+
type: 'google_search_call';
|
|
1890
1875
|
}
|
|
1891
1876
|
interface GoogleSearchResultDelta {
|
|
1892
|
-
type: 'google_search_result';
|
|
1893
1877
|
/**
|
|
1894
1878
|
* ID to match the ID from the function call block.
|
|
1895
1879
|
*/
|
|
1896
|
-
call_id
|
|
1880
|
+
call_id: string;
|
|
1881
|
+
result: Array<InteractionsAPI.GoogleSearchResult>;
|
|
1882
|
+
type: 'google_search_result';
|
|
1897
1883
|
is_error?: boolean;
|
|
1898
|
-
result?: Array<InteractionsAPI.GoogleSearchResult>;
|
|
1899
1884
|
signature?: string;
|
|
1900
1885
|
}
|
|
1901
1886
|
interface MCPServerToolCallDelta {
|
|
1902
|
-
type: 'mcp_server_tool_call';
|
|
1903
1887
|
/**
|
|
1904
1888
|
* A unique ID for this specific tool call.
|
|
1905
1889
|
*/
|
|
1906
|
-
id
|
|
1907
|
-
arguments
|
|
1890
|
+
id: string;
|
|
1891
|
+
arguments: {
|
|
1908
1892
|
[key: string]: unknown;
|
|
1909
1893
|
};
|
|
1910
|
-
name
|
|
1911
|
-
server_name
|
|
1894
|
+
name: string;
|
|
1895
|
+
server_name: string;
|
|
1896
|
+
type: 'mcp_server_tool_call';
|
|
1912
1897
|
}
|
|
1913
1898
|
interface MCPServerToolResultDelta {
|
|
1914
|
-
type: 'mcp_server_tool_result';
|
|
1915
1899
|
/**
|
|
1916
1900
|
* ID to match the ID from the function call block.
|
|
1917
1901
|
*/
|
|
1918
|
-
call_id
|
|
1919
|
-
name?: string;
|
|
1902
|
+
call_id: string;
|
|
1920
1903
|
/**
|
|
1921
1904
|
* Tool call result delta.
|
|
1922
1905
|
*/
|
|
1923
|
-
result
|
|
1906
|
+
result: MCPServerToolResultDelta.Items | unknown | string;
|
|
1907
|
+
type: 'mcp_server_tool_result';
|
|
1908
|
+
name?: string;
|
|
1924
1909
|
server_name?: string;
|
|
1925
1910
|
}
|
|
1926
1911
|
namespace MCPServerToolResultDelta {
|
|
@@ -1929,11 +1914,11 @@ declare namespace ContentDelta {
|
|
|
1929
1914
|
}
|
|
1930
1915
|
}
|
|
1931
1916
|
interface FileSearchCallDelta {
|
|
1932
|
-
type: 'file_search_call';
|
|
1933
1917
|
/**
|
|
1934
1918
|
* A unique ID for this specific tool call.
|
|
1935
1919
|
*/
|
|
1936
|
-
id
|
|
1920
|
+
id: string;
|
|
1921
|
+
type: 'file_search_call';
|
|
1937
1922
|
}
|
|
1938
1923
|
interface FileSearchResultDelta {
|
|
1939
1924
|
type: 'file_search_result';
|
|
@@ -2001,25 +1986,25 @@ export declare class ContentReferenceImage {
|
|
|
2001
1986
|
}
|
|
2002
1987
|
|
|
2003
1988
|
declare interface ContentStart {
|
|
2004
|
-
event_type: 'content.start';
|
|
2005
1989
|
/**
|
|
2006
1990
|
* The content of the response.
|
|
2007
1991
|
*/
|
|
2008
|
-
content
|
|
1992
|
+
content: Content_2;
|
|
1993
|
+
event_type: 'content.start';
|
|
1994
|
+
index: number;
|
|
2009
1995
|
/**
|
|
2010
1996
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
2011
1997
|
*/
|
|
2012
1998
|
event_id?: string;
|
|
2013
|
-
index?: number;
|
|
2014
1999
|
}
|
|
2015
2000
|
|
|
2016
2001
|
declare interface ContentStop {
|
|
2017
2002
|
event_type: 'content.stop';
|
|
2003
|
+
index: number;
|
|
2018
2004
|
/**
|
|
2019
2005
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
2020
2006
|
*/
|
|
2021
2007
|
event_id?: string;
|
|
2022
|
-
index?: number;
|
|
2023
2008
|
}
|
|
2024
2009
|
|
|
2025
2010
|
export declare type ContentUnion = Content | PartUnion[] | PartUnion;
|
|
@@ -2825,18 +2810,13 @@ declare interface DocumentContent {
|
|
|
2825
2810
|
/**
|
|
2826
2811
|
* The mime type of the document.
|
|
2827
2812
|
*/
|
|
2828
|
-
mime_type?:
|
|
2813
|
+
mime_type?: 'application/pdf';
|
|
2829
2814
|
/**
|
|
2830
2815
|
* The URI of the document.
|
|
2831
2816
|
*/
|
|
2832
2817
|
uri?: string;
|
|
2833
2818
|
}
|
|
2834
2819
|
|
|
2835
|
-
/**
|
|
2836
|
-
* The mime type of the document.
|
|
2837
|
-
*/
|
|
2838
|
-
declare type DocumentMimeType = (string & {}) | 'application/pdf';
|
|
2839
|
-
|
|
2840
2820
|
declare class Documents extends BaseModule {
|
|
2841
2821
|
private readonly apiClient;
|
|
2842
2822
|
constructor(apiClient: ApiClient);
|
|
@@ -3511,17 +3491,21 @@ export declare interface FileSearch {
|
|
|
3511
3491
|
* File Search content.
|
|
3512
3492
|
*/
|
|
3513
3493
|
declare interface FileSearchCallContent {
|
|
3514
|
-
type: 'file_search_call';
|
|
3515
3494
|
/**
|
|
3516
3495
|
* A unique ID for this specific tool call.
|
|
3517
3496
|
*/
|
|
3518
|
-
id
|
|
3497
|
+
id: string;
|
|
3498
|
+
type: 'file_search_call';
|
|
3519
3499
|
}
|
|
3520
3500
|
|
|
3521
3501
|
/**
|
|
3522
3502
|
* File Search result content.
|
|
3523
3503
|
*/
|
|
3524
3504
|
declare interface FileSearchResultContent {
|
|
3505
|
+
/**
|
|
3506
|
+
* ID to match the ID from the file search call block.
|
|
3507
|
+
*/
|
|
3508
|
+
call_id: string;
|
|
3525
3509
|
type: 'file_search_result';
|
|
3526
3510
|
/**
|
|
3527
3511
|
* The results of the File Search.
|
|
@@ -4718,7 +4702,7 @@ declare interface GenerationConfig_2 {
|
|
|
4718
4702
|
/**
|
|
4719
4703
|
* The tool choice for the interaction.
|
|
4720
4704
|
*/
|
|
4721
|
-
tool_choice?:
|
|
4705
|
+
tool_choice?: ToolChoiceType | ToolChoiceConfig;
|
|
4722
4706
|
/**
|
|
4723
4707
|
* The maximum cumulative probability of tokens to consider when sampling.
|
|
4724
4708
|
*/
|
|
@@ -5068,8 +5052,10 @@ export declare interface GoogleRpcStatus {
|
|
|
5068
5052
|
message?: string;
|
|
5069
5053
|
}
|
|
5070
5054
|
|
|
5071
|
-
/**
|
|
5055
|
+
/** Tool to support web search. */
|
|
5072
5056
|
export declare interface GoogleSearch {
|
|
5057
|
+
/** Different types of search that can be enabled on the GoogleSearch tool. */
|
|
5058
|
+
searchTypes?: SearchTypes;
|
|
5073
5059
|
/** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: ["amazon.com", "facebook.com"]. This field is not supported in Gemini API. */
|
|
5074
5060
|
excludeDomains?: string[];
|
|
5075
5061
|
/** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API. */
|
|
@@ -5092,15 +5078,19 @@ declare interface GoogleSearchCallArguments {
|
|
|
5092
5078
|
* Google Search content.
|
|
5093
5079
|
*/
|
|
5094
5080
|
declare interface GoogleSearchCallContent {
|
|
5095
|
-
type: 'google_search_call';
|
|
5096
5081
|
/**
|
|
5097
5082
|
* A unique ID for this specific tool call.
|
|
5098
5083
|
*/
|
|
5099
|
-
id
|
|
5084
|
+
id: string;
|
|
5100
5085
|
/**
|
|
5101
5086
|
* The arguments to pass to Google Search.
|
|
5102
5087
|
*/
|
|
5103
|
-
arguments
|
|
5088
|
+
arguments: GoogleSearchCallArguments;
|
|
5089
|
+
type: 'google_search_call';
|
|
5090
|
+
/**
|
|
5091
|
+
* The type of search grounding enabled.
|
|
5092
|
+
*/
|
|
5093
|
+
search_type?: 'web_search' | 'image_search';
|
|
5104
5094
|
}
|
|
5105
5095
|
|
|
5106
5096
|
/**
|
|
@@ -5125,19 +5115,19 @@ declare interface GoogleSearchResult {
|
|
|
5125
5115
|
* Google Search result content.
|
|
5126
5116
|
*/
|
|
5127
5117
|
declare interface GoogleSearchResultContent {
|
|
5128
|
-
type: 'google_search_result';
|
|
5129
5118
|
/**
|
|
5130
5119
|
* ID to match the ID from the google search call block.
|
|
5131
5120
|
*/
|
|
5132
|
-
call_id
|
|
5121
|
+
call_id: string;
|
|
5133
5122
|
/**
|
|
5134
|
-
*
|
|
5123
|
+
* The results of the Google Search.
|
|
5135
5124
|
*/
|
|
5136
|
-
|
|
5125
|
+
result: Array<GoogleSearchResult>;
|
|
5126
|
+
type: 'google_search_result';
|
|
5137
5127
|
/**
|
|
5138
|
-
*
|
|
5128
|
+
* Whether the Google Search resulted in an error.
|
|
5139
5129
|
*/
|
|
5140
|
-
|
|
5130
|
+
is_error?: boolean;
|
|
5141
5131
|
/**
|
|
5142
5132
|
* The signature of the Google Search result.
|
|
5143
5133
|
*/
|
|
@@ -5160,8 +5150,16 @@ export declare interface GoogleTypeDate {
|
|
|
5160
5150
|
year?: number;
|
|
5161
5151
|
}
|
|
5162
5152
|
|
|
5163
|
-
/**
|
|
5153
|
+
/** A piece of evidence that supports a claim made by the model.
|
|
5154
|
+
|
|
5155
|
+
This is used to show a citation for a claim made by the model. When grounding
|
|
5156
|
+
is enabled, the model returns a `GroundingChunk` that contains a reference to
|
|
5157
|
+
the source of the information. */
|
|
5164
5158
|
export declare interface GroundingChunk {
|
|
5159
|
+
/** A grounding chunk from an image search result. See the `Image`
|
|
5160
|
+
message for details.
|
|
5161
|
+
*/
|
|
5162
|
+
image?: GroundingChunkImage;
|
|
5165
5163
|
/** Grounding chunk from Google Maps. This field is not supported in Gemini API. */
|
|
5166
5164
|
maps?: GroundingChunkMaps;
|
|
5167
5165
|
/** Grounding chunk from context retrieved by the retrieval tools. This field is not supported in Gemini API. */
|
|
@@ -5170,6 +5168,22 @@ export declare interface GroundingChunk {
|
|
|
5170
5168
|
web?: GroundingChunkWeb;
|
|
5171
5169
|
}
|
|
5172
5170
|
|
|
5171
|
+
/** A piece of evidence that comes from an image search result.
|
|
5172
|
+
|
|
5173
|
+
It contains the URI of the image search result and the URI of the image.
|
|
5174
|
+
This is used to provide the user with a link to the source of the
|
|
5175
|
+
information. */
|
|
5176
|
+
export declare interface GroundingChunkImage {
|
|
5177
|
+
/** The URI of the image search result page. */
|
|
5178
|
+
sourceUri?: string;
|
|
5179
|
+
/** The URI of the image. */
|
|
5180
|
+
imageUri?: string;
|
|
5181
|
+
/** The title of the image search result page. */
|
|
5182
|
+
title?: string;
|
|
5183
|
+
/** The domain of the image search result page. */
|
|
5184
|
+
domain?: string;
|
|
5185
|
+
}
|
|
5186
|
+
|
|
5173
5187
|
/** Chunk from Google Maps. This data type is not supported in Gemini API. */
|
|
5174
5188
|
export declare interface GroundingChunkMaps {
|
|
5175
5189
|
/** Sources used to generate the place answer. This includes review snippets and photos that were used to generate the answer, as well as uris to flag content. */
|
|
@@ -5244,12 +5258,19 @@ export declare interface GroundingChunkWeb {
|
|
|
5244
5258
|
uri?: string;
|
|
5245
5259
|
}
|
|
5246
5260
|
|
|
5247
|
-
/** Metadata returned to client when grounding is enabled. */
|
|
5248
5261
|
export declare interface GroundingMetadata {
|
|
5262
|
+
/** Optional. The image search queries that were used to generate the
|
|
5263
|
+
content. This field is populated only when the grounding source is Google
|
|
5264
|
+
Search with the Image Search search_type enabled.
|
|
5265
|
+
*/
|
|
5266
|
+
imageSearchQueries?: string[];
|
|
5267
|
+
/** A list of supporting references retrieved from the grounding
|
|
5268
|
+
source. This field is populated when the grounding source is Google
|
|
5269
|
+
Search, Vertex AI Search, or Google Maps.
|
|
5270
|
+
*/
|
|
5271
|
+
groundingChunks?: GroundingChunk[];
|
|
5249
5272
|
/** Optional. Output only. Resource name of the Google Maps widget context token to be used with the PlacesContextElement widget to render contextual data. This is populated only for Google Maps grounding. This field is not supported in Gemini API. */
|
|
5250
5273
|
googleMapsWidgetContextToken?: string;
|
|
5251
|
-
/** List of supporting references retrieved from specified grounding source. */
|
|
5252
|
-
groundingChunks?: GroundingChunk[];
|
|
5253
5274
|
/** Optional. List of grounding support. */
|
|
5254
5275
|
groundingSupports?: GroundingSupport[];
|
|
5255
5276
|
/** Optional. Output only. Retrieval metadata. */
|
|
@@ -5573,6 +5594,12 @@ export declare interface ImageConfig {
|
|
|
5573
5594
|
/** Controls the generation of people. Supported values are:
|
|
5574
5595
|
ALLOW_ALL, ALLOW_ADULT, ALLOW_NONE. */
|
|
5575
5596
|
personGeneration?: string;
|
|
5597
|
+
/** Controls whether prominent people (celebrities)
|
|
5598
|
+
generation is allowed. If used with personGeneration, personGeneration
|
|
5599
|
+
enum would take precedence. For instance, if ALLOW_NONE is set, all person
|
|
5600
|
+
generation would be blocked. If this field is unspecified, the default
|
|
5601
|
+
behavior is to allow prominent people. */
|
|
5602
|
+
prominentPeople?: ProminentPeople;
|
|
5576
5603
|
/** MIME type of the generated image. This field is not
|
|
5577
5604
|
supported in Gemini API. */
|
|
5578
5605
|
outputMimeType?: string;
|
|
@@ -5585,8 +5612,8 @@ export declare interface ImageConfig {
|
|
|
5585
5612
|
* The configuration for image interaction.
|
|
5586
5613
|
*/
|
|
5587
5614
|
declare interface ImageConfig_2 {
|
|
5588
|
-
aspect_ratio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9';
|
|
5589
|
-
image_size?: '1K' | '2K' | '4K';
|
|
5615
|
+
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';
|
|
5616
|
+
image_size?: '1K' | '2K' | '4K' | '512';
|
|
5590
5617
|
}
|
|
5591
5618
|
|
|
5592
5619
|
/**
|
|
@@ -5601,7 +5628,7 @@ declare interface ImageContent {
|
|
|
5601
5628
|
/**
|
|
5602
5629
|
* The mime type of the image.
|
|
5603
5630
|
*/
|
|
5604
|
-
mime_type?:
|
|
5631
|
+
mime_type?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif';
|
|
5605
5632
|
/**
|
|
5606
5633
|
* The resolution of the media.
|
|
5607
5634
|
*/
|
|
@@ -5612,11 +5639,6 @@ declare interface ImageContent {
|
|
|
5612
5639
|
uri?: string;
|
|
5613
5640
|
}
|
|
5614
5641
|
|
|
5615
|
-
/**
|
|
5616
|
-
* The mime type of the image.
|
|
5617
|
-
*/
|
|
5618
|
-
declare type ImageMimeType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/heic' | 'image/heif' | (string & {});
|
|
5619
|
-
|
|
5620
5642
|
/** Enum that specifies the language of the text in the prompt. */
|
|
5621
5643
|
export declare enum ImagePromptLanguage {
|
|
5622
5644
|
/**
|
|
@@ -5653,6 +5675,10 @@ export declare enum ImagePromptLanguage {
|
|
|
5653
5675
|
es = "es"
|
|
5654
5676
|
}
|
|
5655
5677
|
|
|
5678
|
+
/** Image search for grounding and related configurations. */
|
|
5679
|
+
export declare interface ImageSearch {
|
|
5680
|
+
}
|
|
5681
|
+
|
|
5656
5682
|
/** Optional parameters for importing a file. */
|
|
5657
5683
|
export declare interface ImportFileConfig {
|
|
5658
5684
|
/** Used to override HTTP request options. */
|
|
@@ -5756,19 +5782,32 @@ declare interface Interaction {
|
|
|
5756
5782
|
* Output only. A unique identifier for the interaction completion.
|
|
5757
5783
|
*/
|
|
5758
5784
|
id: string;
|
|
5785
|
+
/**
|
|
5786
|
+
* Output only. The time at which the response was created in ISO 8601 format
|
|
5787
|
+
* (YYYY-MM-DDThh:mm:ssZ).
|
|
5788
|
+
*/
|
|
5789
|
+
created: string;
|
|
5759
5790
|
/**
|
|
5760
5791
|
* Output only. The status of the interaction.
|
|
5761
5792
|
*/
|
|
5762
5793
|
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
5794
|
+
/**
|
|
5795
|
+
* Output only. The time at which the response was last updated in ISO 8601 format
|
|
5796
|
+
* (YYYY-MM-DDThh:mm:ssZ).
|
|
5797
|
+
*/
|
|
5798
|
+
updated: string;
|
|
5763
5799
|
/**
|
|
5764
5800
|
* The name of the `Agent` used for generating the interaction.
|
|
5765
5801
|
*/
|
|
5766
5802
|
agent?: (string & {}) | 'deep-research-pro-preview-12-2025';
|
|
5767
5803
|
/**
|
|
5768
|
-
*
|
|
5769
|
-
|
|
5804
|
+
* Configuration for the agent.
|
|
5805
|
+
*/
|
|
5806
|
+
agent_config?: DynamicAgentConfig | DeepResearchAgentConfig;
|
|
5807
|
+
/**
|
|
5808
|
+
* The inputs for the interaction.
|
|
5770
5809
|
*/
|
|
5771
|
-
|
|
5810
|
+
input?: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
|
|
5772
5811
|
/**
|
|
5773
5812
|
* The name of the `Model` used for generating the interaction.
|
|
5774
5813
|
*/
|
|
@@ -5781,15 +5820,31 @@ declare interface Interaction {
|
|
|
5781
5820
|
* The ID of the previous interaction, if any.
|
|
5782
5821
|
*/
|
|
5783
5822
|
previous_interaction_id?: string;
|
|
5823
|
+
/**
|
|
5824
|
+
* Enforces that the generated response is a JSON object that complies with
|
|
5825
|
+
* the JSON schema specified in this field.
|
|
5826
|
+
*/
|
|
5827
|
+
response_format?: unknown;
|
|
5828
|
+
/**
|
|
5829
|
+
* The mime type of the response. This is required if response_format is set.
|
|
5830
|
+
*/
|
|
5831
|
+
response_mime_type?: string;
|
|
5832
|
+
/**
|
|
5833
|
+
* The requested modalities of the response (TEXT, IMAGE, AUDIO).
|
|
5834
|
+
*/
|
|
5835
|
+
response_modalities?: Array<'text' | 'image' | 'audio'>;
|
|
5784
5836
|
/**
|
|
5785
5837
|
* Output only. The role of the interaction.
|
|
5786
5838
|
*/
|
|
5787
5839
|
role?: string;
|
|
5788
5840
|
/**
|
|
5789
|
-
*
|
|
5790
|
-
* (YYYY-MM-DDThh:mm:ssZ).
|
|
5841
|
+
* System instruction for the interaction.
|
|
5791
5842
|
*/
|
|
5792
|
-
|
|
5843
|
+
system_instruction?: string;
|
|
5844
|
+
/**
|
|
5845
|
+
* A list of tool declarations the model may call during interaction.
|
|
5846
|
+
*/
|
|
5847
|
+
tools?: Array<Tool_2>;
|
|
5793
5848
|
/**
|
|
5794
5849
|
* Output only. Statistics on the interaction request's token usage.
|
|
5795
5850
|
*/
|
|
@@ -5806,13 +5861,14 @@ declare interface InteractionCancelParams {
|
|
|
5806
5861
|
declare interface InteractionCompleteEvent {
|
|
5807
5862
|
event_type: 'interaction.complete';
|
|
5808
5863
|
/**
|
|
5809
|
-
* The
|
|
5864
|
+
* The completed interaction with empty outputs to reduce the payload size.
|
|
5865
|
+
* Use the preceding ContentDelta events for the actual output.
|
|
5810
5866
|
*/
|
|
5811
|
-
|
|
5867
|
+
interaction: Interaction;
|
|
5812
5868
|
/**
|
|
5813
|
-
* The
|
|
5869
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
5814
5870
|
*/
|
|
5815
|
-
|
|
5871
|
+
event_id?: string;
|
|
5816
5872
|
}
|
|
5817
5873
|
|
|
5818
5874
|
declare type InteractionCreateParams = CreateModelInteractionParamsNonStreaming | CreateModelInteractionParamsStreaming | CreateAgentInteractionParamsNonStreaming | CreateAgentInteractionParamsStreaming;
|
|
@@ -5870,7 +5926,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
5870
5926
|
}
|
|
5871
5927
|
|
|
5872
5928
|
export declare namespace Interactions {
|
|
5873
|
-
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type
|
|
5929
|
+
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallContent as CodeExecutionCallContent, type CodeExecutionResultContent as CodeExecutionResultContent, type Content_2 as Content, type ContentDelta as ContentDelta, type ContentStart as ContentStart, type ContentStop as ContentStop, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileSearchCallContent as FileSearchCallContent, type FileSearchResultContent as FileSearchResultContent, type Function_2 as Function, type FunctionCallContent as FunctionCallContent, type FunctionResultContent as FunctionResultContent, type GenerationConfig_2 as GenerationConfig, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallContent as GoogleSearchCallContent, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultContent as GoogleSearchResultContent, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type Interaction as Interaction, type InteractionCompleteEvent as InteractionCompleteEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStartEvent as InteractionStartEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallContent as MCPServerToolCallContent, type MCPServerToolResultContent as MCPServerToolResultContent, type Model_2 as Model, type SpeechConfig_2 as SpeechConfig, type TextContent as TextContent, type ThinkingLevel_2 as ThinkingLevel, type ThoughtContent as ThoughtContent, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type Turn as Turn, type URLContextCallArguments as URLContextCallArguments, type URLContextCallContent as URLContextCallContent, type URLContextResult as URLContextResult, type URLContextResultContent as URLContextResultContent, type Usage as Usage, type VideoContent as VideoContent, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
|
|
5874
5930
|
}
|
|
5875
5931
|
|
|
5876
5932
|
declare namespace InteractionsAPI {
|
|
@@ -5880,7 +5936,6 @@ declare namespace InteractionsAPI {
|
|
|
5880
5936
|
AllowedTools,
|
|
5881
5937
|
Annotation,
|
|
5882
5938
|
AudioContent,
|
|
5883
|
-
AudioMimeType,
|
|
5884
5939
|
CodeExecutionCallArguments,
|
|
5885
5940
|
CodeExecutionCallContent,
|
|
5886
5941
|
CodeExecutionResultContent,
|
|
@@ -5890,7 +5945,6 @@ declare namespace InteractionsAPI {
|
|
|
5890
5945
|
ContentStop,
|
|
5891
5946
|
DeepResearchAgentConfig,
|
|
5892
5947
|
DocumentContent,
|
|
5893
|
-
DocumentMimeType,
|
|
5894
5948
|
DynamicAgentConfig,
|
|
5895
5949
|
ErrorEvent_2 as ErrorEvent,
|
|
5896
5950
|
FileSearchCallContent,
|
|
@@ -5905,7 +5959,6 @@ declare namespace InteractionsAPI {
|
|
|
5905
5959
|
GoogleSearchResultContent,
|
|
5906
5960
|
ImageConfig_2 as ImageConfig,
|
|
5907
5961
|
ImageContent,
|
|
5908
|
-
ImageMimeType,
|
|
5909
5962
|
Interaction,
|
|
5910
5963
|
InteractionCompleteEvent,
|
|
5911
5964
|
InteractionSSEEvent,
|
|
@@ -5919,7 +5972,6 @@ declare namespace InteractionsAPI {
|
|
|
5919
5972
|
ThinkingLevel_2 as ThinkingLevel,
|
|
5920
5973
|
ThoughtContent,
|
|
5921
5974
|
Tool_2 as Tool,
|
|
5922
|
-
ToolChoice,
|
|
5923
5975
|
ToolChoiceConfig,
|
|
5924
5976
|
ToolChoiceType,
|
|
5925
5977
|
Turn,
|
|
@@ -5929,7 +5981,6 @@ declare namespace InteractionsAPI {
|
|
|
5929
5981
|
URLContextResultContent,
|
|
5930
5982
|
Usage,
|
|
5931
5983
|
VideoContent,
|
|
5932
|
-
VideoMimeType,
|
|
5933
5984
|
InteractionDeleteResponse,
|
|
5934
5985
|
InteractionCreateParams,
|
|
5935
5986
|
BaseCreateModelInteractionParams,
|
|
@@ -5952,23 +6003,23 @@ declare type InteractionSSEEvent = InteractionStartEvent | InteractionCompleteEv
|
|
|
5952
6003
|
declare interface InteractionStartEvent {
|
|
5953
6004
|
event_type: 'interaction.start';
|
|
5954
6005
|
/**
|
|
5955
|
-
* The
|
|
6006
|
+
* The Interaction resource.
|
|
5956
6007
|
*/
|
|
5957
|
-
|
|
6008
|
+
interaction: Interaction;
|
|
5958
6009
|
/**
|
|
5959
|
-
* The
|
|
6010
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
5960
6011
|
*/
|
|
5961
|
-
|
|
6012
|
+
event_id?: string;
|
|
5962
6013
|
}
|
|
5963
6014
|
|
|
5964
6015
|
declare interface InteractionStatusUpdate {
|
|
5965
6016
|
event_type: 'interaction.status_update';
|
|
6017
|
+
interaction_id: string;
|
|
6018
|
+
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
5966
6019
|
/**
|
|
5967
6020
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
5968
6021
|
*/
|
|
5969
6022
|
event_id?: string;
|
|
5970
|
-
interaction_id?: string;
|
|
5971
|
-
status?: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
5972
6023
|
}
|
|
5973
6024
|
|
|
5974
6025
|
/** Parameters for the private _Register method. */
|
|
@@ -7138,6 +7189,14 @@ export declare enum MaskReferenceMode {
|
|
|
7138
7189
|
MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
|
|
7139
7190
|
}
|
|
7140
7191
|
|
|
7192
|
+
/** A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 5. This data type is not supported in Vertex AI. */
|
|
7193
|
+
export declare interface McpServer {
|
|
7194
|
+
/** The name of the MCPServer. */
|
|
7195
|
+
name?: string;
|
|
7196
|
+
/** A transport that can stream HTTP requests and responses. */
|
|
7197
|
+
streamableHttpTransport?: StreamableHttpTransport;
|
|
7198
|
+
}
|
|
7199
|
+
|
|
7141
7200
|
/**
|
|
7142
7201
|
* MCPServer tool call content.
|
|
7143
7202
|
*/
|
|
@@ -7346,7 +7405,7 @@ export declare interface Model {
|
|
|
7346
7405
|
/**
|
|
7347
7406
|
* The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
|
|
7348
7407
|
*/
|
|
7349
|
-
declare type Model_2 = 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | (string & {});
|
|
7408
|
+
declare type Model_2 = 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | (string & {});
|
|
7350
7409
|
|
|
7351
7410
|
/** Configuration for Model Armor integrations of prompt and responses. This data type is not supported in Gemini API. */
|
|
7352
7411
|
export declare interface ModelArmorConfig {
|
|
@@ -8267,6 +8326,22 @@ export declare interface ProductImage {
|
|
|
8267
8326
|
productImage?: Image_2;
|
|
8268
8327
|
}
|
|
8269
8328
|
|
|
8329
|
+
/** Enum for controlling whether the model can generate images of prominent people (celebrities). */
|
|
8330
|
+
export declare enum ProminentPeople {
|
|
8331
|
+
/**
|
|
8332
|
+
* Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
|
|
8333
|
+
*/
|
|
8334
|
+
PROMINENT_PEOPLE_UNSPECIFIED = "PROMINENT_PEOPLE_UNSPECIFIED",
|
|
8335
|
+
/**
|
|
8336
|
+
* Allows the model to generate images of prominent people.
|
|
8337
|
+
*/
|
|
8338
|
+
ALLOW_PROMINENT_PEOPLE = "ALLOW_PROMINENT_PEOPLE",
|
|
8339
|
+
/**
|
|
8340
|
+
* Prevents the model from generating images of prominent people.
|
|
8341
|
+
*/
|
|
8342
|
+
BLOCK_PROMINENT_PEOPLE = "BLOCK_PROMINENT_PEOPLE"
|
|
8343
|
+
}
|
|
8344
|
+
|
|
8270
8345
|
/**
|
|
8271
8346
|
* @license
|
|
8272
8347
|
* Copyright 2025 Google LLC
|
|
@@ -8819,6 +8894,15 @@ export declare interface SearchEntryPoint {
|
|
|
8819
8894
|
sdkBlob?: string;
|
|
8820
8895
|
}
|
|
8821
8896
|
|
|
8897
|
+
/** Tool to support computer use. */
|
|
8898
|
+
export declare interface SearchTypes {
|
|
8899
|
+
/** Setting this field enables web search. Only text results are
|
|
8900
|
+
returned. */
|
|
8901
|
+
webSearch?: WebSearch;
|
|
8902
|
+
/** Setting this field enables image search. Image bytes are returned. */
|
|
8903
|
+
imageSearch?: ImageSearch;
|
|
8904
|
+
}
|
|
8905
|
+
|
|
8822
8906
|
/** Segment of the content. */
|
|
8823
8907
|
export declare interface Segment {
|
|
8824
8908
|
/** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */
|
|
@@ -9181,6 +9265,20 @@ declare class Stream<Item> implements AsyncIterable<Item> {
|
|
|
9181
9265
|
toReadableStream(): _ReadableStream_2;
|
|
9182
9266
|
}
|
|
9183
9267
|
|
|
9268
|
+
/** A transport that can stream HTTP requests and responses. Next ID: 6. This data type is not supported in Vertex AI. */
|
|
9269
|
+
export declare interface StreamableHttpTransport {
|
|
9270
|
+
/** Optional: Fields for authentication headers, timeouts, etc., if needed. */
|
|
9271
|
+
headers?: Record<string, string>;
|
|
9272
|
+
/** Timeout for SSE read operations. */
|
|
9273
|
+
sseReadTimeout?: string;
|
|
9274
|
+
/** Whether to close the client session when the transport closes. */
|
|
9275
|
+
terminateOnClose?: boolean;
|
|
9276
|
+
/** HTTP timeout for regular operations. */
|
|
9277
|
+
timeout?: string;
|
|
9278
|
+
/** The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp". */
|
|
9279
|
+
url?: string;
|
|
9280
|
+
}
|
|
9281
|
+
|
|
9184
9282
|
/** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
|
|
9185
9283
|
export declare interface StringList {
|
|
9186
9284
|
/** The string values of the metadata to store. */
|
|
@@ -9366,15 +9464,15 @@ export declare interface TestTableItem {
|
|
|
9366
9464
|
* A text content block.
|
|
9367
9465
|
*/
|
|
9368
9466
|
declare interface TextContent {
|
|
9467
|
+
/**
|
|
9468
|
+
* The text content.
|
|
9469
|
+
*/
|
|
9470
|
+
text: string;
|
|
9369
9471
|
type: 'text';
|
|
9370
9472
|
/**
|
|
9371
9473
|
* Citation information for model-generated content.
|
|
9372
9474
|
*/
|
|
9373
9475
|
annotations?: Array<Annotation>;
|
|
9374
|
-
/**
|
|
9375
|
-
* The text content.
|
|
9376
|
-
*/
|
|
9377
|
-
text?: string;
|
|
9378
9476
|
}
|
|
9379
9477
|
|
|
9380
9478
|
/** The thinking features configuration. */
|
|
@@ -9540,6 +9638,8 @@ export declare interface Tool {
|
|
|
9540
9638
|
computerUse?: ComputerUse;
|
|
9541
9639
|
/** Optional. Tool to retrieve knowledge from the File Search Stores. */
|
|
9542
9640
|
fileSearch?: FileSearch;
|
|
9641
|
+
/** Enables the model to execute Google Search as part of generation. */
|
|
9642
|
+
googleSearch?: GoogleSearch;
|
|
9543
9643
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
9544
9644
|
codeExecution?: ToolCodeExecution;
|
|
9545
9645
|
/** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
|
|
@@ -9548,12 +9648,12 @@ export declare interface Tool {
|
|
|
9548
9648
|
functionDeclarations?: FunctionDeclaration[];
|
|
9549
9649
|
/** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
|
|
9550
9650
|
googleMaps?: GoogleMaps;
|
|
9551
|
-
/** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
|
|
9552
|
-
googleSearch?: GoogleSearch;
|
|
9553
9651
|
/** Optional. Specialized retrieval tool that is powered by Google Search. */
|
|
9554
9652
|
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
9555
9653
|
/** Optional. Tool to support URL context retrieval. */
|
|
9556
9654
|
urlContext?: UrlContext;
|
|
9655
|
+
/** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
|
|
9656
|
+
mcpServers?: McpServer[];
|
|
9557
9657
|
}
|
|
9558
9658
|
|
|
9559
9659
|
/**
|
|
@@ -9567,6 +9667,10 @@ declare namespace Tool_2 {
|
|
|
9567
9667
|
*/
|
|
9568
9668
|
interface GoogleSearch {
|
|
9569
9669
|
type: 'google_search';
|
|
9670
|
+
/**
|
|
9671
|
+
* The types of search grounding to enable.
|
|
9672
|
+
*/
|
|
9673
|
+
search_types?: Array<'web_search' | 'image_search'>;
|
|
9570
9674
|
}
|
|
9571
9675
|
/**
|
|
9572
9676
|
* A tool that can be used by the model to execute code.
|
|
@@ -9640,13 +9744,11 @@ declare namespace Tool_2 {
|
|
|
9640
9744
|
}
|
|
9641
9745
|
|
|
9642
9746
|
/**
|
|
9643
|
-
* The configuration
|
|
9747
|
+
* The tool choice configuration containing allowed tools.
|
|
9644
9748
|
*/
|
|
9645
|
-
declare type ToolChoice = ToolChoiceType | ToolChoiceConfig;
|
|
9646
|
-
|
|
9647
9749
|
declare interface ToolChoiceConfig {
|
|
9648
9750
|
/**
|
|
9649
|
-
* The
|
|
9751
|
+
* The allowed tools.
|
|
9650
9752
|
*/
|
|
9651
9753
|
allowed_tools?: AllowedTools;
|
|
9652
9754
|
}
|
|
@@ -10057,10 +10159,10 @@ declare namespace types {
|
|
|
10057
10159
|
Language,
|
|
10058
10160
|
FunctionResponseScheduling,
|
|
10059
10161
|
Type,
|
|
10162
|
+
PhishBlockThreshold,
|
|
10060
10163
|
ApiSpec,
|
|
10061
10164
|
AuthType,
|
|
10062
10165
|
HttpElementLocation,
|
|
10063
|
-
PhishBlockThreshold,
|
|
10064
10166
|
Behavior,
|
|
10065
10167
|
DynamicRetrievalConfigMode,
|
|
10066
10168
|
FunctionCallingConfigMode,
|
|
@@ -10084,6 +10186,7 @@ declare namespace types {
|
|
|
10084
10186
|
ResourceScope,
|
|
10085
10187
|
FeatureSelectionPreference,
|
|
10086
10188
|
Environment,
|
|
10189
|
+
ProminentPeople,
|
|
10087
10190
|
EmbeddingApiType,
|
|
10088
10191
|
SafetyFilterLevel,
|
|
10089
10192
|
PersonGeneration,
|
|
@@ -10131,6 +10234,11 @@ declare namespace types {
|
|
|
10131
10234
|
ModelSelectionConfig,
|
|
10132
10235
|
ComputerUse,
|
|
10133
10236
|
FileSearch,
|
|
10237
|
+
WebSearch,
|
|
10238
|
+
ImageSearch,
|
|
10239
|
+
SearchTypes,
|
|
10240
|
+
Interval,
|
|
10241
|
+
GoogleSearch,
|
|
10134
10242
|
ApiAuthApiKeyConfig,
|
|
10135
10243
|
ApiAuth,
|
|
10136
10244
|
ApiKeyConfig,
|
|
@@ -10157,11 +10265,11 @@ declare namespace types {
|
|
|
10157
10265
|
EnterpriseWebSearch,
|
|
10158
10266
|
FunctionDeclaration,
|
|
10159
10267
|
GoogleMaps,
|
|
10160
|
-
Interval,
|
|
10161
|
-
GoogleSearch,
|
|
10162
10268
|
DynamicRetrievalConfig,
|
|
10163
10269
|
GoogleSearchRetrieval,
|
|
10164
10270
|
UrlContext,
|
|
10271
|
+
StreamableHttpTransport,
|
|
10272
|
+
McpServer,
|
|
10165
10273
|
Tool,
|
|
10166
10274
|
LatLng,
|
|
10167
10275
|
RetrievalConfig,
|
|
@@ -10188,6 +10296,7 @@ declare namespace types {
|
|
|
10188
10296
|
GoogleTypeDate,
|
|
10189
10297
|
Citation,
|
|
10190
10298
|
CitationMetadata,
|
|
10299
|
+
GroundingChunkImage,
|
|
10191
10300
|
GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
|
|
10192
10301
|
GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
|
|
10193
10302
|
GroundingChunkMapsPlaceAnswerSources,
|
|
@@ -10798,15 +10907,15 @@ declare interface URLContextCallArguments {
|
|
|
10798
10907
|
* URL context content.
|
|
10799
10908
|
*/
|
|
10800
10909
|
declare interface URLContextCallContent {
|
|
10801
|
-
type: 'url_context_call';
|
|
10802
10910
|
/**
|
|
10803
10911
|
* A unique ID for this specific tool call.
|
|
10804
10912
|
*/
|
|
10805
|
-
id
|
|
10913
|
+
id: string;
|
|
10806
10914
|
/**
|
|
10807
10915
|
* The arguments to pass to the URL context.
|
|
10808
10916
|
*/
|
|
10809
|
-
arguments
|
|
10917
|
+
arguments: URLContextCallArguments;
|
|
10918
|
+
type: 'url_context_call';
|
|
10810
10919
|
}
|
|
10811
10920
|
|
|
10812
10921
|
/** Metadata related to url context retrieval tool. */
|
|
@@ -10833,19 +10942,19 @@ declare interface URLContextResult {
|
|
|
10833
10942
|
* URL context result content.
|
|
10834
10943
|
*/
|
|
10835
10944
|
declare interface URLContextResultContent {
|
|
10836
|
-
type: 'url_context_result';
|
|
10837
10945
|
/**
|
|
10838
10946
|
* ID to match the ID from the url context call block.
|
|
10839
10947
|
*/
|
|
10840
|
-
call_id
|
|
10948
|
+
call_id: string;
|
|
10841
10949
|
/**
|
|
10842
|
-
*
|
|
10950
|
+
* The results of the URL context.
|
|
10843
10951
|
*/
|
|
10844
|
-
|
|
10952
|
+
result: Array<URLContextResult>;
|
|
10953
|
+
type: 'url_context_result';
|
|
10845
10954
|
/**
|
|
10846
|
-
*
|
|
10955
|
+
* Whether the URL context resulted in an error.
|
|
10847
10956
|
*/
|
|
10848
|
-
|
|
10957
|
+
is_error?: boolean;
|
|
10849
10958
|
/**
|
|
10850
10959
|
* The signature of the URL context result.
|
|
10851
10960
|
*/
|
|
@@ -11132,7 +11241,7 @@ declare interface VideoContent {
|
|
|
11132
11241
|
/**
|
|
11133
11242
|
* The mime type of the video.
|
|
11134
11243
|
*/
|
|
11135
|
-
mime_type?:
|
|
11244
|
+
mime_type?: 'video/mp4' | 'video/mpeg' | 'video/mpg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/webm' | 'video/wmv' | 'video/3gpp';
|
|
11136
11245
|
/**
|
|
11137
11246
|
* The resolution of the media.
|
|
11138
11247
|
*/
|
|
@@ -11214,11 +11323,6 @@ export declare interface VideoMetadata {
|
|
|
11214
11323
|
startOffset?: string;
|
|
11215
11324
|
}
|
|
11216
11325
|
|
|
11217
|
-
/**
|
|
11218
|
-
* The mime type of the video.
|
|
11219
|
-
*/
|
|
11220
|
-
declare type VideoMimeType = 'video/mp4' | 'video/mpeg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/mpg' | 'video/webm' | 'video/wmv' | 'video/3gpp' | (string & {});
|
|
11221
|
-
|
|
11222
11326
|
/** Voice activity signal. */
|
|
11223
11327
|
export declare interface VoiceActivity {
|
|
11224
11328
|
/** The type of the voice activity signal. */
|
|
@@ -11253,6 +11357,12 @@ export declare interface VoiceConfig {
|
|
|
11253
11357
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
11254
11358
|
}
|
|
11255
11359
|
|
|
11360
|
+
/** Standard web search for grounding and related configurations.
|
|
11361
|
+
|
|
11362
|
+
Only text results are returned. */
|
|
11363
|
+
export declare interface WebSearch {
|
|
11364
|
+
}
|
|
11365
|
+
|
|
11256
11366
|
declare interface WebSocket_2 {
|
|
11257
11367
|
/**
|
|
11258
11368
|
* Connects the socket to the server.
|