@google/genai 0.14.1 → 1.0.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/web/web.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Client } from '@modelcontextprotocol/sdk/client/index.js';
1
2
  import { GoogleAuthOptions } from 'google-auth-library';
2
3
 
3
4
  /** Marks the end of user activity.
@@ -10,8 +11,17 @@ export declare interface ActivityEnd {
10
11
 
11
12
  /** The different ways of handling user activity. */
12
13
  export declare enum ActivityHandling {
14
+ /**
15
+ * If unspecified, the default behavior is `START_OF_ACTIVITY_INTERRUPTS`.
16
+ */
13
17
  ACTIVITY_HANDLING_UNSPECIFIED = "ACTIVITY_HANDLING_UNSPECIFIED",
18
+ /**
19
+ * If true, start of activity will interrupt the model's response (also called "barge in"). The model's current response will be cut-off in the moment of the interruption. This is the default behavior.
20
+ */
14
21
  START_OF_ACTIVITY_INTERRUPTS = "START_OF_ACTIVITY_INTERRUPTS",
22
+ /**
23
+ * The model's response will not be interrupted.
24
+ */
15
25
  NO_INTERRUPTION = "NO_INTERRUPTION"
16
26
  }
17
27
 
@@ -25,12 +35,33 @@ export declare interface ActivityStart {
25
35
 
26
36
  /** Optional. Adapter size for tuning. */
27
37
  export declare enum AdapterSize {
38
+ /**
39
+ * Adapter size is unspecified.
40
+ */
28
41
  ADAPTER_SIZE_UNSPECIFIED = "ADAPTER_SIZE_UNSPECIFIED",
42
+ /**
43
+ * Adapter size 1.
44
+ */
29
45
  ADAPTER_SIZE_ONE = "ADAPTER_SIZE_ONE",
46
+ /**
47
+ * Adapter size 2.
48
+ */
30
49
  ADAPTER_SIZE_TWO = "ADAPTER_SIZE_TWO",
50
+ /**
51
+ * Adapter size 4.
52
+ */
31
53
  ADAPTER_SIZE_FOUR = "ADAPTER_SIZE_FOUR",
54
+ /**
55
+ * Adapter size 8.
56
+ */
32
57
  ADAPTER_SIZE_EIGHT = "ADAPTER_SIZE_EIGHT",
58
+ /**
59
+ * Adapter size 16.
60
+ */
33
61
  ADAPTER_SIZE_SIXTEEN = "ADAPTER_SIZE_SIXTEEN",
62
+ /**
63
+ * Adapter size 32.
64
+ */
34
65
  ADAPTER_SIZE_THIRTY_TWO = "ADAPTER_SIZE_THIRTY_TWO"
35
66
  }
36
67
 
@@ -166,6 +197,16 @@ export declare interface ApiKeyConfig {
166
197
  apiKeyString?: string;
167
198
  }
168
199
 
200
+ /** Representation of an audio chunk. */
201
+ export declare interface AudioChunk {
202
+ /** Raw byets of audio data. */
203
+ data?: string;
204
+ /** MIME type of the audio chunk. */
205
+ mimeType?: string;
206
+ /** Prompts and config used for generating this audio chunk. */
207
+ sourceMetadata?: LiveMusicSourceMetadata;
208
+ }
209
+
169
210
  /** The audio transcription configuration in Setup. */
170
211
  export declare interface AudioTranscriptionConfig {
171
212
  }
@@ -234,11 +275,29 @@ export declare interface AuthConfigOidcConfig {
234
275
  /** Type of auth scheme. */
235
276
  export declare enum AuthType {
236
277
  AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
278
+ /**
279
+ * No Auth.
280
+ */
237
281
  NO_AUTH = "NO_AUTH",
282
+ /**
283
+ * API Key Auth.
284
+ */
238
285
  API_KEY_AUTH = "API_KEY_AUTH",
286
+ /**
287
+ * HTTP Basic Auth.
288
+ */
239
289
  HTTP_BASIC_AUTH = "HTTP_BASIC_AUTH",
290
+ /**
291
+ * Google Service Account Auth.
292
+ */
240
293
  GOOGLE_SERVICE_ACCOUNT_AUTH = "GOOGLE_SERVICE_ACCOUNT_AUTH",
294
+ /**
295
+ * OAuth auth.
296
+ */
241
297
  OAUTH = "OAUTH",
298
+ /**
299
+ * OpenID Connect (OIDC) Auth.
300
+ */
242
301
  OIDC_AUTH = "OIDC_AUTH"
243
302
  }
244
303
 
@@ -256,6 +315,28 @@ export declare interface AutomaticActivityDetection {
256
315
  silenceDurationMs?: number;
257
316
  }
258
317
 
318
+ /** The configuration for automatic function calling. */
319
+ export declare interface AutomaticFunctionCallingConfig {
320
+ /** Whether to disable automatic function calling.
321
+ If not set or set to False, will enable automatic function calling.
322
+ If set to True, will disable automatic function calling.
323
+ */
324
+ disable?: boolean;
325
+ /** If automatic function calling is enabled,
326
+ maximum number of remote calls for automatic function calling.
327
+ This number should be a positive integer.
328
+ If not set, SDK will set maximum number of remote calls to 10.
329
+ */
330
+ maximumRemoteCalls?: number;
331
+ /** If automatic function calling is enabled,
332
+ whether to ignore call history to the response.
333
+ If not set, SDK will set ignore_call_history to false,
334
+ and will append the call history to
335
+ GenerateContentResponse.automatic_function_calling_history.
336
+ */
337
+ ignoreCallHistory?: boolean;
338
+ }
339
+
259
340
  /**
260
341
  * @license
261
342
  * Copyright 2025 Google LLC
@@ -272,6 +353,22 @@ export declare interface BaseUrlParameters {
272
353
  vertexUrl?: string;
273
354
  }
274
355
 
356
+ /** Defines the function behavior. Defaults to `BLOCKING`. */
357
+ export declare enum Behavior {
358
+ /**
359
+ * This value is unused.
360
+ */
361
+ UNSPECIFIED = "UNSPECIFIED",
362
+ /**
363
+ * If set, the system will wait to receive the function response before continuing the conversation.
364
+ */
365
+ BLOCKING = "BLOCKING",
366
+ /**
367
+ * If set, the system will not wait to receive the function response. Instead, it will attempt to handle function responses as they become available while maintaining the conversation between the user and the model.
368
+ */
369
+ NON_BLOCKING = "NON_BLOCKING"
370
+ }
371
+
275
372
  /** Content blob. */
276
373
  declare interface Blob_2 {
277
374
  /** Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is not currently used in the Gemini GenerateContent calls. */
@@ -287,10 +384,25 @@ export declare type BlobImageUnion = Blob_2;
287
384
 
288
385
  /** Output only. Blocked reason. */
289
386
  export declare enum BlockedReason {
387
+ /**
388
+ * Unspecified blocked reason.
389
+ */
290
390
  BLOCKED_REASON_UNSPECIFIED = "BLOCKED_REASON_UNSPECIFIED",
391
+ /**
392
+ * Candidates blocked due to safety.
393
+ */
291
394
  SAFETY = "SAFETY",
395
+ /**
396
+ * Candidates blocked due to other reason.
397
+ */
292
398
  OTHER = "OTHER",
399
+ /**
400
+ * Candidates blocked due to the terms which are included from the terminology blocklist.
401
+ */
293
402
  BLOCKLIST = "BLOCKLIST",
403
+ /**
404
+ * Candidates blocked due to prohibited content.
405
+ */
294
406
  PROHIBITED_CONTENT = "PROHIBITED_CONTENT"
295
407
  }
296
408
 
@@ -413,6 +525,33 @@ export declare class Caches extends BaseModule {
413
525
  private listInternal;
414
526
  }
415
527
 
528
+ /**
529
+ * CallableTool is an invokable tool that can be executed with external
530
+ * application (e.g., via Model Context Protocol) or local functions with
531
+ * function calling.
532
+ */
533
+ export declare interface CallableTool {
534
+ /**
535
+ * Returns tool that can be called by Gemini.
536
+ */
537
+ tool(): Promise<Tool>;
538
+ /**
539
+ * Executes the callable tool with the given function call arguments and
540
+ * returns the response parts from the tool execution.
541
+ */
542
+ callTool(functionCalls: FunctionCall[]): Promise<Part[]>;
543
+ }
544
+
545
+ /**
546
+ * CallableToolConfig is the configuration for a callable tool.
547
+ */
548
+ export declare interface CallableToolConfig {
549
+ /**
550
+ * Specifies the model's behavior after invoking this tool.
551
+ */
552
+ behavior?: Behavior;
553
+ }
554
+
416
555
  /** A response candidate generated from the model. */
417
556
  export declare interface Candidate {
418
557
  /** Contains the multi-part content of the response.
@@ -431,6 +570,8 @@ export declare interface Candidate {
431
570
  If empty, the model has not stopped generating the tokens.
432
571
  */
433
572
  finishReason?: FinishReason;
573
+ /** Metadata related to url context retrieval tool. */
574
+ urlContextMetadata?: UrlContextMetadata;
434
575
  /** Output only. Average log probability score of the candidate. */
435
576
  avgLogprobs?: number;
436
577
  /** Output only. Metadata specifies sources used to ground generated content. */
@@ -768,6 +909,40 @@ export declare class CountTokensResponse {
768
909
  cachedContentTokenCount?: number;
769
910
  }
770
911
 
912
+ /** Optional parameters. */
913
+ export declare interface CreateAuthTokenConfig {
914
+ /** Used to override HTTP request options. */
915
+ httpOptions?: HttpOptions;
916
+ /** Abort signal which can be used to cancel the request.
917
+
918
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
919
+ operation will not cancel the request in the service. You will still
920
+ be charged usage for any applicable operations.
921
+ */
922
+ abortSignal?: AbortSignal;
923
+ /** An optional time after which, when using the resulting token,
924
+ messages in Live API sessions will be rejected. (Gemini may
925
+ preemptively close the session after this time.)
926
+
927
+ If not set then this defaults to 30 minutes in the future. If set, this
928
+ value must be less than 20 hours in the future. */
929
+ expireTime?: string;
930
+ /** The time after which new Live API sessions using the token
931
+ resulting from this request will be rejected.
932
+
933
+ If not set this defaults to 60 seconds in the future. If set, this value
934
+ must be less than 20 hours in the future. */
935
+ newSessionExpireTime?: string;
936
+ /** The number of times the token can be used. If this value is zero
937
+ then no limit is applied. Default is 1. Resuming a Live API session does
938
+ not count as a use. */
939
+ uses?: number;
940
+ /** Configuration specific to Live API connections created using this token. */
941
+ liveEphemeralParameters?: LiveEphemeralParameters;
942
+ /** Additional fields to lock in the effective LiveConnectParameters. */
943
+ lockAdditionalFields?: string[];
944
+ }
945
+
771
946
  /** Optional configuration for cached content creation. */
772
947
  export declare interface CreateCachedContentConfig {
773
948
  /** Used to override HTTP request options. */
@@ -798,6 +973,16 @@ export declare interface CreateCachedContentConfig {
798
973
  /** Configuration for the tools to use. This config is shared for all tools.
799
974
  */
800
975
  toolConfig?: ToolConfig;
976
+ /** The Cloud KMS resource identifier of the customer managed
977
+ encryption key used to protect a resource.
978
+ The key needs to be in the same region as where the compute resource is
979
+ created. See
980
+ https://cloud.google.com/vertex-ai/docs/general/cmek for more
981
+ details. If this is set, then all created CachedContent objects
982
+ will be encrypted with the provided encryption key.
983
+ Allowed formats: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
984
+ */
985
+ kmsKeyName?: string;
801
986
  }
802
987
 
803
988
  /** Parameters for caches.create method. */
@@ -1159,7 +1344,13 @@ export declare interface DynamicRetrievalConfig {
1159
1344
 
1160
1345
  /** Config for the dynamic retrieval config mode. */
1161
1346
  export declare enum DynamicRetrievalConfigMode {
1347
+ /**
1348
+ * Always trigger retrieval.
1349
+ */
1162
1350
  MODE_UNSPECIFIED = "MODE_UNSPECIFIED",
1351
+ /**
1352
+ * Run retrieval only when system decides it is necessary.
1353
+ */
1163
1354
  MODE_DYNAMIC = "MODE_DYNAMIC"
1164
1355
  }
1165
1356
 
@@ -1338,8 +1529,17 @@ export declare interface Endpoint {
1338
1529
 
1339
1530
  /** End of speech sensitivity. */
1340
1531
  export declare enum EndSensitivity {
1532
+ /**
1533
+ * The default is END_SENSITIVITY_LOW.
1534
+ */
1341
1535
  END_SENSITIVITY_UNSPECIFIED = "END_SENSITIVITY_UNSPECIFIED",
1536
+ /**
1537
+ * Automatic detection ends speech more often.
1538
+ */
1342
1539
  END_SENSITIVITY_HIGH = "END_SENSITIVITY_HIGH",
1540
+ /**
1541
+ * Automatic detection ends speech less often.
1542
+ */
1343
1543
  END_SENSITIVITY_LOW = "END_SENSITIVITY_LOW"
1344
1544
  }
1345
1545
 
@@ -1588,17 +1788,53 @@ export declare interface FileStatus {
1588
1788
  If empty, the model has not stopped generating the tokens.
1589
1789
  */
1590
1790
  export declare enum FinishReason {
1791
+ /**
1792
+ * The finish reason is unspecified.
1793
+ */
1591
1794
  FINISH_REASON_UNSPECIFIED = "FINISH_REASON_UNSPECIFIED",
1795
+ /**
1796
+ * Token generation reached a natural stopping point or a configured stop sequence.
1797
+ */
1592
1798
  STOP = "STOP",
1799
+ /**
1800
+ * Token generation reached the configured maximum output tokens.
1801
+ */
1593
1802
  MAX_TOKENS = "MAX_TOKENS",
1803
+ /**
1804
+ * Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, [content][] is empty if content filters blocks the output.
1805
+ */
1594
1806
  SAFETY = "SAFETY",
1807
+ /**
1808
+ * The token generation stopped because of potential recitation.
1809
+ */
1595
1810
  RECITATION = "RECITATION",
1811
+ /**
1812
+ * The token generation stopped because of using an unsupported language.
1813
+ */
1596
1814
  LANGUAGE = "LANGUAGE",
1815
+ /**
1816
+ * All other reasons that stopped the token generation.
1817
+ */
1597
1818
  OTHER = "OTHER",
1819
+ /**
1820
+ * Token generation stopped because the content contains forbidden terms.
1821
+ */
1598
1822
  BLOCKLIST = "BLOCKLIST",
1823
+ /**
1824
+ * Token generation stopped for potentially containing prohibited content.
1825
+ */
1599
1826
  PROHIBITED_CONTENT = "PROHIBITED_CONTENT",
1827
+ /**
1828
+ * Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).
1829
+ */
1600
1830
  SPII = "SPII",
1831
+ /**
1832
+ * The function call generated by the model is invalid.
1833
+ */
1601
1834
  MALFORMED_FUNCTION_CALL = "MALFORMED_FUNCTION_CALL",
1835
+ /**
1836
+ * Token generation stopped because generated images have safety violations.
1837
+ */
1602
1838
  IMAGE_SAFETY = "IMAGE_SAFETY"
1603
1839
  }
1604
1840
 
@@ -1623,14 +1859,32 @@ export declare interface FunctionCallingConfig {
1623
1859
 
1624
1860
  /** Config for the function calling config mode. */
1625
1861
  export declare enum FunctionCallingConfigMode {
1862
+ /**
1863
+ * The function calling config mode is unspecified. Should not be used.
1864
+ */
1626
1865
  MODE_UNSPECIFIED = "MODE_UNSPECIFIED",
1866
+ /**
1867
+ * Default model behavior, model decides to predict either function calls or natural language response.
1868
+ */
1627
1869
  AUTO = "AUTO",
1870
+ /**
1871
+ * Model is constrained to always predicting function calls only. If "allowed_function_names" are set, the predicted function calls will be limited to any one of "allowed_function_names", else the predicted function calls will be any one of the provided "function_declarations".
1872
+ */
1628
1873
  ANY = "ANY",
1874
+ /**
1875
+ * Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
1876
+ */
1629
1877
  NONE = "NONE"
1630
1878
  }
1631
1879
 
1632
- /** 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. */
1880
+ /** Defines a function that the model can generate JSON inputs for.
1881
+
1882
+ The inputs are based on `OpenAPI 3.0 specifications
1883
+ <https://spec.openapis.org/oas/v3.0.3>`_.
1884
+ */
1633
1885
  export declare interface FunctionDeclaration {
1886
+ /** Defines the function behavior. */
1887
+ behavior?: Behavior;
1634
1888
  /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */
1635
1889
  description?: string;
1636
1890
  /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */
@@ -1643,8 +1897,11 @@ export declare interface FunctionDeclaration {
1643
1897
 
1644
1898
  /** A function response. */
1645
1899
  export declare class FunctionResponse {
1646
- /** The id of the function call this response is for. Populated by the client
1647
- to match the corresponding function call `id`. */
1900
+ /** Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls (see FunctionDeclaration.behavior for details), ignored otherwise. If false, the default, future responses will not be considered. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. */
1901
+ willContinue?: boolean;
1902
+ /** Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. */
1903
+ scheduling?: FunctionResponseScheduling;
1904
+ /** Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`. */
1648
1905
  id?: string;
1649
1906
  /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */
1650
1907
  name?: string;
@@ -1652,6 +1909,26 @@ export declare class FunctionResponse {
1652
1909
  response?: Record<string, unknown>;
1653
1910
  }
1654
1911
 
1912
+ /** Specifies how the response should be scheduled in the conversation. */
1913
+ export declare enum FunctionResponseScheduling {
1914
+ /**
1915
+ * This value is unused.
1916
+ */
1917
+ SCHEDULING_UNSPECIFIED = "SCHEDULING_UNSPECIFIED",
1918
+ /**
1919
+ * Only add the result to the conversation context, do not interrupt or trigger generation.
1920
+ */
1921
+ SILENT = "SILENT",
1922
+ /**
1923
+ * Add the result to the conversation context, and prompt to generate output without interrupting ongoing generation.
1924
+ */
1925
+ WHEN_IDLE = "WHEN_IDLE",
1926
+ /**
1927
+ * Add the result to the conversation context, interrupt ongoing generation and prompt to generate output.
1928
+ */
1929
+ INTERRUPT = "INTERRUPT"
1930
+ }
1931
+
1655
1932
  /** Optional model configuration parameters.
1656
1933
 
1657
1934
  For more information, see `Content generation parameters
@@ -1777,6 +2054,9 @@ export declare interface GenerateContentConfig {
1777
2054
  model.
1778
2055
  */
1779
2056
  audioTimestamp?: boolean;
2057
+ /** The configuration for automatic function calling.
2058
+ */
2059
+ automaticFunctionCalling?: AutomaticFunctionCallingConfig;
1780
2060
  /** The thinking features configuration.
1781
2061
  */
1782
2062
  thinkingConfig?: ThinkingConfig;
@@ -1806,6 +2086,9 @@ export declare class GenerateContentResponse {
1806
2086
  /** Identifier for each response.
1807
2087
  */
1808
2088
  responseId?: string;
2089
+ /** The history of automatic function calling.
2090
+ */
2091
+ automaticFunctionCallingHistory?: Content[];
1809
2092
  /** Output only. The model version used to generate the response. */
1810
2093
  modelVersion?: string;
1811
2094
  /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */
@@ -2454,6 +2737,10 @@ export declare interface GoogleRpcStatus {
2454
2737
 
2455
2738
  /** Tool to support Google Search in Model. Powered by Google. */
2456
2739
  export declare interface GoogleSearch {
2740
+ /** Optional. Filter search results to a specific time range.
2741
+ If customers set a start time, they must set an end time (and vice versa).
2742
+ */
2743
+ timeRangeFilter?: Interval;
2457
2744
  }
2458
2745
 
2459
2746
  /** Tool to retrieve public web data for grounding, powered by Google. */
@@ -2528,46 +2815,121 @@ export declare interface GroundingSupport {
2528
2815
 
2529
2816
  /** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */
2530
2817
  export declare enum HarmBlockMethod {
2818
+ /**
2819
+ * The harm block method is unspecified.
2820
+ */
2531
2821
  HARM_BLOCK_METHOD_UNSPECIFIED = "HARM_BLOCK_METHOD_UNSPECIFIED",
2822
+ /**
2823
+ * The harm block method uses both probability and severity scores.
2824
+ */
2532
2825
  SEVERITY = "SEVERITY",
2826
+ /**
2827
+ * The harm block method uses the probability score.
2828
+ */
2533
2829
  PROBABILITY = "PROBABILITY"
2534
2830
  }
2535
2831
 
2536
2832
  /** Required. The harm block threshold. */
2537
2833
  export declare enum HarmBlockThreshold {
2834
+ /**
2835
+ * Unspecified harm block threshold.
2836
+ */
2538
2837
  HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
2838
+ /**
2839
+ * Block low threshold and above (i.e. block more).
2840
+ */
2539
2841
  BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
2842
+ /**
2843
+ * Block medium threshold and above.
2844
+ */
2540
2845
  BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
2846
+ /**
2847
+ * Block only high threshold (i.e. block less).
2848
+ */
2541
2849
  BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
2850
+ /**
2851
+ * Block none.
2852
+ */
2542
2853
  BLOCK_NONE = "BLOCK_NONE",
2854
+ /**
2855
+ * Turn off the safety filter.
2856
+ */
2543
2857
  OFF = "OFF"
2544
2858
  }
2545
2859
 
2546
2860
  /** Required. Harm category. */
2547
2861
  export declare enum HarmCategory {
2862
+ /**
2863
+ * The harm category is unspecified.
2864
+ */
2548
2865
  HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED",
2866
+ /**
2867
+ * The harm category is hate speech.
2868
+ */
2549
2869
  HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
2870
+ /**
2871
+ * The harm category is dangerous content.
2872
+ */
2550
2873
  HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
2874
+ /**
2875
+ * The harm category is harassment.
2876
+ */
2551
2877
  HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT",
2878
+ /**
2879
+ * The harm category is sexually explicit content.
2880
+ */
2552
2881
  HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT",
2882
+ /**
2883
+ * The harm category is civic integrity.
2884
+ */
2553
2885
  HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY"
2554
2886
  }
2555
2887
 
2556
2888
  /** Output only. Harm probability levels in the content. */
2557
2889
  export declare enum HarmProbability {
2890
+ /**
2891
+ * Harm probability unspecified.
2892
+ */
2558
2893
  HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED",
2894
+ /**
2895
+ * Negligible level of harm.
2896
+ */
2559
2897
  NEGLIGIBLE = "NEGLIGIBLE",
2898
+ /**
2899
+ * Low level of harm.
2900
+ */
2560
2901
  LOW = "LOW",
2902
+ /**
2903
+ * Medium level of harm.
2904
+ */
2561
2905
  MEDIUM = "MEDIUM",
2906
+ /**
2907
+ * High level of harm.
2908
+ */
2562
2909
  HIGH = "HIGH"
2563
2910
  }
2564
2911
 
2565
2912
  /** Output only. Harm severity levels in the content. */
2566
2913
  export declare enum HarmSeverity {
2914
+ /**
2915
+ * Harm severity unspecified.
2916
+ */
2567
2917
  HARM_SEVERITY_UNSPECIFIED = "HARM_SEVERITY_UNSPECIFIED",
2918
+ /**
2919
+ * Negligible level of harm severity.
2920
+ */
2568
2921
  HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE",
2922
+ /**
2923
+ * Low level of harm severity.
2924
+ */
2569
2925
  HARM_SEVERITY_LOW = "HARM_SEVERITY_LOW",
2926
+ /**
2927
+ * Medium level of harm severity.
2928
+ */
2570
2929
  HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM",
2930
+ /**
2931
+ * High level of harm severity.
2932
+ */
2571
2933
  HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH"
2572
2934
  }
2573
2935
 
@@ -2668,25 +3030,81 @@ export declare enum ImagePromptLanguage {
2668
3030
  hi = "hi"
2669
3031
  }
2670
3032
 
3033
+ /** Represents a time interval, encoded as a start time (inclusive) and an end time (exclusive).
3034
+
3035
+ The start time must be less than or equal to the end time.
3036
+ When the start equals the end time, the interval is an empty interval.
3037
+ (matches no time)
3038
+ When both start and end are unspecified, the interval matches any time.
3039
+ */
3040
+ export declare interface Interval {
3041
+ /** The start time of the interval. */
3042
+ startTime?: string;
3043
+ /** The end time of the interval. */
3044
+ endTime?: string;
3045
+ }
3046
+
2671
3047
  /** Output only. The detailed state of the job. */
2672
3048
  export declare enum JobState {
3049
+ /**
3050
+ * The job state is unspecified.
3051
+ */
2673
3052
  JOB_STATE_UNSPECIFIED = "JOB_STATE_UNSPECIFIED",
3053
+ /**
3054
+ * The job has been just created or resumed and processing has not yet begun.
3055
+ */
2674
3056
  JOB_STATE_QUEUED = "JOB_STATE_QUEUED",
3057
+ /**
3058
+ * The service is preparing to run the job.
3059
+ */
2675
3060
  JOB_STATE_PENDING = "JOB_STATE_PENDING",
3061
+ /**
3062
+ * The job is in progress.
3063
+ */
2676
3064
  JOB_STATE_RUNNING = "JOB_STATE_RUNNING",
3065
+ /**
3066
+ * The job completed successfully.
3067
+ */
2677
3068
  JOB_STATE_SUCCEEDED = "JOB_STATE_SUCCEEDED",
3069
+ /**
3070
+ * The job failed.
3071
+ */
2678
3072
  JOB_STATE_FAILED = "JOB_STATE_FAILED",
3073
+ /**
3074
+ * The job is being cancelled. From this state the job may only go to either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
3075
+ */
2679
3076
  JOB_STATE_CANCELLING = "JOB_STATE_CANCELLING",
3077
+ /**
3078
+ * The job has been cancelled.
3079
+ */
2680
3080
  JOB_STATE_CANCELLED = "JOB_STATE_CANCELLED",
3081
+ /**
3082
+ * The job has been stopped, and can be resumed.
3083
+ */
2681
3084
  JOB_STATE_PAUSED = "JOB_STATE_PAUSED",
3085
+ /**
3086
+ * The job has expired.
3087
+ */
2682
3088
  JOB_STATE_EXPIRED = "JOB_STATE_EXPIRED",
3089
+ /**
3090
+ * The job is being updated. Only jobs in the `RUNNING` state can be updated. After updating, the job goes back to the `RUNNING` state.
3091
+ */
2683
3092
  JOB_STATE_UPDATING = "JOB_STATE_UPDATING",
3093
+ /**
3094
+ * The job is partially succeeded, some results may be missing due to errors.
3095
+ */
2684
3096
  JOB_STATE_PARTIALLY_SUCCEEDED = "JOB_STATE_PARTIALLY_SUCCEEDED"
2685
3097
  }
2686
3098
 
2687
3099
  /** Required. Programming language of the `code`. */
2688
3100
  export declare enum Language {
3101
+ /**
3102
+ * Unspecified language. This value should not be used.
3103
+ */
2689
3104
  LANGUAGE_UNSPECIFIED = "LANGUAGE_UNSPECIFIED",
3105
+ /**
3106
+ * Python >= 3.10, with numpy and simpy available.
3107
+ */
2690
3108
  PYTHON = "PYTHON"
2691
3109
  }
2692
3110
 
@@ -2827,12 +3245,14 @@ export declare class Live {
2827
3245
  private readonly apiClient;
2828
3246
  private readonly auth;
2829
3247
  private readonly webSocketFactory;
3248
+ readonly music: LiveMusic;
2830
3249
  constructor(apiClient: ApiClient, auth: Auth, webSocketFactory: WebSocketFactory);
2831
3250
  /**
2832
3251
  Establishes a connection to the specified model with the given
2833
3252
  configuration and returns a Session object representing that connection.
2834
3253
 
2835
- @experimental
3254
+ @experimental Built-in MCP support is an experimental feature, may change in
3255
+ future versions.
2836
3256
 
2837
3257
  @remarks
2838
3258
 
@@ -2870,6 +3290,7 @@ export declare class Live {
2870
3290
  ```
2871
3291
  */
2872
3292
  connect(params: types.LiveConnectParameters): Promise<Session>;
3293
+ private isCallableTool;
2873
3294
  }
2874
3295
 
2875
3296
  /** Callbacks for the live API. */
@@ -3003,6 +3424,9 @@ export declare interface LiveClientSetup {
3003
3424
  specified for the output audio.
3004
3425
  */
3005
3426
  outputAudioTranscription?: AudioTranscriptionConfig;
3427
+ /** Configures the proactivity of the model. This allows the model to respond proactively to
3428
+ the input and to ignore irrelevant input. */
3429
+ proactivity?: ProactivityConfig;
3006
3430
  }
3007
3431
 
3008
3432
  /** Client generated response to a `ToolCall` received from the server.
@@ -3022,6 +3446,15 @@ export declare class LiveClientToolResponse {
3022
3446
 
3023
3447
  /** Session config for the API connection. */
3024
3448
  export declare interface LiveConnectConfig {
3449
+ /** Used to override HTTP request options. */
3450
+ httpOptions?: HttpOptions;
3451
+ /** Abort signal which can be used to cancel the request.
3452
+
3453
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
3454
+ operation will not cancel the request in the service. You will still
3455
+ be charged usage for any applicable operations.
3456
+ */
3457
+ abortSignal?: AbortSignal;
3025
3458
  /** The generation configuration for the session. */
3026
3459
  generationConfig?: GenerationConfig;
3027
3460
  /** The requested modalities of the response. Represents the set of
@@ -3060,6 +3493,8 @@ export declare interface LiveConnectConfig {
3060
3493
  /** The speech generation configuration.
3061
3494
  */
3062
3495
  speechConfig?: SpeechConfig;
3496
+ /** If enabled, the model will detect emotions and adapt its responses accordingly. */
3497
+ enableAffectiveDialog?: boolean;
3063
3498
  /** The user provided system instructions for the model.
3064
3499
  Note: only text should be used in parts and content in each part will be
3065
3500
  in a separate paragraph. */
@@ -3087,6 +3522,9 @@ export declare interface LiveConnectConfig {
3087
3522
 
3088
3523
  If included, server will compress context window to fit into given length. */
3089
3524
  contextWindowCompression?: ContextWindowCompressionConfig;
3525
+ /** Configures the proactivity of the model. This allows the model to respond proactively to
3526
+ the input and to ignore irrelevant input. */
3527
+ proactivity?: ProactivityConfig;
3090
3528
  }
3091
3529
 
3092
3530
  /** Parameters for connecting to the live API. */
@@ -3101,23 +3539,315 @@ export declare interface LiveConnectParameters {
3101
3539
  config?: LiveConnectConfig;
3102
3540
  }
3103
3541
 
3104
- /** Parameters for sending client content to the live API. */
3105
- export declare interface LiveSendClientContentParameters {
3106
- /** Client content to send to the session. */
3107
- turns?: ContentListUnion;
3108
- /** If true, indicates that the server content generation should start with
3109
- the currently accumulated prompt. Otherwise, the server will await
3110
- additional messages before starting generation. */
3111
- turnComplete?: boolean;
3542
+ /** Config for LiveEphemeralParameters for Auth Token creation. */
3543
+ export declare interface LiveEphemeralParameters {
3544
+ /** ID of the model to configure in the ephemeral token for Live API.
3545
+ For a list of models, see `Gemini models
3546
+ <https://ai.google.dev/gemini-api/docs/models>`. */
3547
+ model?: string;
3548
+ /** Configuration specific to Live API connections created using this token. */
3549
+ config?: LiveConnectConfig;
3112
3550
  }
3113
3551
 
3114
- /** Parameters for sending realtime input to the live API. */
3115
- export declare interface LiveSendRealtimeInputParameters {
3116
- /** Realtime input to send to the session. */
3117
- media?: BlobImageUnion;
3118
- /** The realtime audio input stream. */
3119
- audio?: Blob_2;
3120
- /**
3552
+ /**
3553
+ LiveMusic class encapsulates the configuration for live music
3554
+ generation via Lyria Live models.
3555
+
3556
+ @experimental
3557
+ */
3558
+ declare class LiveMusic {
3559
+ private readonly apiClient;
3560
+ private readonly auth;
3561
+ private readonly webSocketFactory;
3562
+ constructor(apiClient: ApiClient, auth: Auth, webSocketFactory: WebSocketFactory);
3563
+ /**
3564
+ Establishes a connection to the specified model and returns a
3565
+ LiveMusicSession object representing that connection.
3566
+
3567
+ @experimental
3568
+
3569
+ @remarks
3570
+
3571
+ @param params - The parameters for establishing a connection to the model.
3572
+ @return A live session.
3573
+
3574
+ @example
3575
+ ```ts
3576
+ let model = 'models/lyria-realtime-exp';
3577
+ const session = await ai.live.music.connect({
3578
+ model: model,
3579
+ callbacks: {
3580
+ onmessage: (e: MessageEvent) => {
3581
+ console.log('Received message from the server: %s\n', debug(e.data));
3582
+ },
3583
+ onerror: (e: ErrorEvent) => {
3584
+ console.log('Error occurred: %s\n', debug(e.error));
3585
+ },
3586
+ onclose: (e: CloseEvent) => {
3587
+ console.log('Connection closed.');
3588
+ },
3589
+ },
3590
+ });
3591
+ ```
3592
+ */
3593
+ connect(params: types.LiveMusicConnectParameters): Promise<LiveMusicSession>;
3594
+ }
3595
+
3596
+ /** Callbacks for the realtime music API. */
3597
+ export declare interface LiveMusicCallbacks {
3598
+ /**
3599
+ * Called when a message is received from the server.
3600
+ */
3601
+ onmessage: (e: LiveMusicServerMessage) => void;
3602
+ /**
3603
+ * Called when an error occurs.
3604
+ */
3605
+ onerror?: ((e: ErrorEvent) => void) | null;
3606
+ /**
3607
+ * Called when the websocket connection is closed.
3608
+ */
3609
+ onclose?: ((e: CloseEvent) => void) | null;
3610
+ }
3611
+
3612
+ /** User input to start or steer the music. */
3613
+ export declare interface LiveMusicClientContent {
3614
+ /** Weighted prompts as the model input. */
3615
+ weightedPrompts?: WeightedPrompt[];
3616
+ }
3617
+
3618
+ /** Messages sent by the client in the LiveMusicClientMessage call. */
3619
+ export declare interface LiveMusicClientMessage {
3620
+ /** Message to be sent in the first (and only in the first) `LiveMusicClientMessage`.
3621
+ Clients should wait for a `LiveMusicSetupComplete` message before
3622
+ sending any additional messages. */
3623
+ setup?: LiveMusicClientSetup;
3624
+ /** User input to influence music generation. */
3625
+ clientContent?: LiveMusicClientContent;
3626
+ /** Configuration for music generation. */
3627
+ musicGenerationConfig?: LiveMusicGenerationConfig;
3628
+ /** Playback control signal for the music generation. */
3629
+ playbackControl?: LiveMusicPlaybackControl;
3630
+ }
3631
+
3632
+ /** Message to be sent by the system when connecting to the API. */
3633
+ export declare interface LiveMusicClientSetup {
3634
+ /** The model's resource name. Format: `models/{model}`. */
3635
+ model?: string;
3636
+ }
3637
+
3638
+ /** Parameters for connecting to the live API. */
3639
+ export declare interface LiveMusicConnectParameters {
3640
+ /** The model's resource name. */
3641
+ model: string;
3642
+ /** Callbacks invoked on server events. */
3643
+ callbacks: LiveMusicCallbacks;
3644
+ }
3645
+
3646
+ /** A prompt that was filtered with the reason. */
3647
+ export declare interface LiveMusicFilteredPrompt {
3648
+ /** The text prompt that was filtered. */
3649
+ text?: string;
3650
+ /** The reason the prompt was filtered. */
3651
+ filteredReason?: string;
3652
+ }
3653
+
3654
+ /** Configuration for music generation. */
3655
+ export declare interface LiveMusicGenerationConfig {
3656
+ /** Controls the variance in audio generation. Higher values produce
3657
+ higher variance. Range is [0.0, 3.0]. */
3658
+ temperature?: number;
3659
+ /** Controls how the model selects tokens for output. Samples the topK
3660
+ tokens with the highest probabilities. Range is [1, 1000]. */
3661
+ topK?: number;
3662
+ /** Seeds audio generation. If not set, the request uses a randomly
3663
+ generated seed. */
3664
+ seed?: number;
3665
+ /** Controls how closely the model follows prompts.
3666
+ Higher guidance follows more closely, but will make transitions more
3667
+ abrupt. Range is [0.0, 6.0]. */
3668
+ guidance?: number;
3669
+ /** Beats per minute. Range is [60, 200]. */
3670
+ bpm?: number;
3671
+ /** Density of sounds. Range is [0.0, 1.0]. */
3672
+ density?: number;
3673
+ /** Brightness of the music. Range is [0.0, 1.0]. */
3674
+ brightness?: number;
3675
+ /** Scale of the generated music. */
3676
+ scale?: Scale;
3677
+ /** Whether the audio output should contain bass. */
3678
+ muteBass?: boolean;
3679
+ /** Whether the audio output should contain drums. */
3680
+ muteDrums?: boolean;
3681
+ /** Whether the audio output should contain only bass and drums. */
3682
+ onlyBassAndDrums?: boolean;
3683
+ /** The mode of music generation. Default mode is QUALITY. */
3684
+ musicGenerationMode?: MusicGenerationMode;
3685
+ }
3686
+
3687
+ /** The playback control signal to apply to the music generation. */
3688
+ export declare enum LiveMusicPlaybackControl {
3689
+ /**
3690
+ * This value is unused.
3691
+ */
3692
+ PLAYBACK_CONTROL_UNSPECIFIED = "PLAYBACK_CONTROL_UNSPECIFIED",
3693
+ /**
3694
+ * Start generating the music.
3695
+ */
3696
+ PLAY = "PLAY",
3697
+ /**
3698
+ * Hold the music generation. Use PLAY to resume from the current position.
3699
+ */
3700
+ PAUSE = "PAUSE",
3701
+ /**
3702
+ * Stop the music generation and reset the context (prompts retained).
3703
+ Use PLAY to restart the music generation.
3704
+ */
3705
+ STOP = "STOP",
3706
+ /**
3707
+ * Reset the context of the music generation without stopping it.
3708
+ Retains the current prompts and config.
3709
+ */
3710
+ RESET_CONTEXT = "RESET_CONTEXT"
3711
+ }
3712
+
3713
+ /** Server update generated by the model in response to client messages.
3714
+
3715
+ Content is generated as quickly as possible, and not in real time.
3716
+ Clients may choose to buffer and play it out in real time.
3717
+ */
3718
+ export declare interface LiveMusicServerContent {
3719
+ /** The audio chunks that the model has generated. */
3720
+ audioChunks?: AudioChunk[];
3721
+ }
3722
+
3723
+ /** Response message for the LiveMusicClientMessage call. */
3724
+ export declare class LiveMusicServerMessage {
3725
+ /** Message sent in response to a `LiveMusicClientSetup` message from the client.
3726
+ Clients should wait for this message before sending any additional messages. */
3727
+ setupComplete?: LiveMusicServerSetupComplete;
3728
+ /** Content generated by the model in response to client messages. */
3729
+ serverContent?: LiveMusicServerContent;
3730
+ /** A prompt that was filtered with the reason. */
3731
+ filteredPrompt?: LiveMusicFilteredPrompt;
3732
+ /**
3733
+ * Returns the first audio chunk from the server content, if present.
3734
+ *
3735
+ * @remarks
3736
+ * If there are no audio chunks in the response, undefined will be returned.
3737
+ */
3738
+ get audioChunk(): AudioChunk | undefined;
3739
+ }
3740
+
3741
+ /** Sent in response to a `LiveMusicClientSetup` message from the client. */
3742
+ export declare interface LiveMusicServerSetupComplete {
3743
+ }
3744
+
3745
+ /**
3746
+ Represents a connection to the API.
3747
+
3748
+ @experimental
3749
+ */
3750
+ export declare class LiveMusicSession {
3751
+ readonly conn: WebSocket_2;
3752
+ private readonly apiClient;
3753
+ constructor(conn: WebSocket_2, apiClient: ApiClient);
3754
+ /**
3755
+ Sets inputs to steer music generation. Updates the session's current
3756
+ weighted prompts.
3757
+
3758
+ @param params - Contains one property, `weightedPrompts`.
3759
+
3760
+ - `weightedPrompts` to send to the model; weights are normalized to
3761
+ sum to 1.0.
3762
+
3763
+ @experimental
3764
+ */
3765
+ setWeightedPrompts(params: types.LiveMusicSetWeightedPromptsParameters): Promise<void>;
3766
+ /**
3767
+ Sets a configuration to the model. Updates the session's current
3768
+ music generation config.
3769
+
3770
+ @param params - Contains one property, `musicGenerationConfig`.
3771
+
3772
+ - `musicGenerationConfig` to set in the model. Passing an empty or
3773
+ undefined config to the model will reset the config to defaults.
3774
+
3775
+ @experimental
3776
+ */
3777
+ setMusicGenerationConfig(params: types.LiveMusicSetConfigParameters): Promise<void>;
3778
+ private sendPlaybackControl;
3779
+ /**
3780
+ * Start the music stream.
3781
+ *
3782
+ * @experimental
3783
+ */
3784
+ play(): void;
3785
+ /**
3786
+ * Temporarily halt the music stream. Use `play` to resume from the current
3787
+ * position.
3788
+ *
3789
+ * @experimental
3790
+ */
3791
+ pause(): void;
3792
+ /**
3793
+ * Stop the music stream and reset the state. Retains the current prompts
3794
+ * and config.
3795
+ *
3796
+ * @experimental
3797
+ */
3798
+ stop(): void;
3799
+ /**
3800
+ * Resets the context of the music generation without stopping it.
3801
+ * Retains the current prompts and config.
3802
+ *
3803
+ * @experimental
3804
+ */
3805
+ resetContext(): void;
3806
+ /**
3807
+ Terminates the WebSocket connection.
3808
+
3809
+ @experimental
3810
+ */
3811
+ close(): void;
3812
+ }
3813
+
3814
+ /** Parameters for setting config for the live music API. */
3815
+ export declare interface LiveMusicSetConfigParameters {
3816
+ /** Configuration for music generation. */
3817
+ musicGenerationConfig: LiveMusicGenerationConfig;
3818
+ }
3819
+
3820
+ /** Parameters for setting weighted prompts for the live music API. */
3821
+ export declare interface LiveMusicSetWeightedPromptsParameters {
3822
+ /** A map of text prompts to weights to use for the generation request. */
3823
+ weightedPrompts: WeightedPrompt[];
3824
+ }
3825
+
3826
+ /** Prompts and config used for generating this audio chunk. */
3827
+ export declare interface LiveMusicSourceMetadata {
3828
+ /** Weighted prompts for generating this audio chunk. */
3829
+ clientContent?: LiveMusicClientContent;
3830
+ /** Music generation config for generating this audio chunk. */
3831
+ musicGenerationConfig?: LiveMusicGenerationConfig;
3832
+ }
3833
+
3834
+ /** Parameters for sending client content to the live API. */
3835
+ export declare interface LiveSendClientContentParameters {
3836
+ /** Client content to send to the session. */
3837
+ turns?: ContentListUnion;
3838
+ /** If true, indicates that the server content generation should start with
3839
+ the currently accumulated prompt. Otherwise, the server will await
3840
+ additional messages before starting generation. */
3841
+ turnComplete?: boolean;
3842
+ }
3843
+
3844
+ /** Parameters for sending realtime input to the live API. */
3845
+ export declare interface LiveSendRealtimeInputParameters {
3846
+ /** Realtime input to send to the session. */
3847
+ media?: BlobImageUnion;
3848
+ /** The realtime audio input stream. */
3849
+ audio?: Blob_2;
3850
+ /**
3121
3851
  Indicates that the audio stream has ended, e.g. because the microphone was
3122
3852
  turned off.
3123
3853
 
@@ -3175,6 +3905,8 @@ export declare interface LiveServerContent {
3175
3905
  model turn.
3176
3906
  */
3177
3907
  outputTranscription?: Transcription;
3908
+ /** Metadata related to url context retrieval tool. */
3909
+ urlContextMetadata?: UrlContextMetadata;
3178
3910
  }
3179
3911
 
3180
3912
  /** Server will not be able to service client soon. */
@@ -3324,29 +4056,83 @@ export declare enum MaskReferenceMode {
3324
4056
  MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
3325
4057
  }
3326
4058
 
4059
+ /**
4060
+ * Creates a McpCallableTool from MCP clients and an optional config.
4061
+ *
4062
+ * The callable tool can invoke the MCP clients with given function call
4063
+ * arguments. (often for automatic function calling).
4064
+ * Use the config to modify tool parameters such as behavior.
4065
+ *
4066
+ * @experimental Built-in MCP support is an experimental feature, may change in future
4067
+ * versions.
4068
+ */
4069
+ export declare function mcpToTool(...args: [...Client[], CallableToolConfig | Client]): CallableTool;
4070
+
3327
4071
  /** Server content modalities. */
3328
4072
  export declare enum MediaModality {
4073
+ /**
4074
+ * The modality is unspecified.
4075
+ */
3329
4076
  MODALITY_UNSPECIFIED = "MODALITY_UNSPECIFIED",
4077
+ /**
4078
+ * Plain text.
4079
+ */
3330
4080
  TEXT = "TEXT",
4081
+ /**
4082
+ * Images.
4083
+ */
3331
4084
  IMAGE = "IMAGE",
4085
+ /**
4086
+ * Video.
4087
+ */
3332
4088
  VIDEO = "VIDEO",
4089
+ /**
4090
+ * Audio.
4091
+ */
3333
4092
  AUDIO = "AUDIO",
4093
+ /**
4094
+ * Document, e.g. PDF.
4095
+ */
3334
4096
  DOCUMENT = "DOCUMENT"
3335
4097
  }
3336
4098
 
3337
4099
  /** The media resolution to use. */
3338
4100
  export declare enum MediaResolution {
4101
+ /**
4102
+ * Media resolution has not been set
4103
+ */
3339
4104
  MEDIA_RESOLUTION_UNSPECIFIED = "MEDIA_RESOLUTION_UNSPECIFIED",
4105
+ /**
4106
+ * Media resolution set to low (64 tokens).
4107
+ */
3340
4108
  MEDIA_RESOLUTION_LOW = "MEDIA_RESOLUTION_LOW",
4109
+ /**
4110
+ * Media resolution set to medium (256 tokens).
4111
+ */
3341
4112
  MEDIA_RESOLUTION_MEDIUM = "MEDIA_RESOLUTION_MEDIUM",
4113
+ /**
4114
+ * Media resolution set to high (zoomed reframing with 256 tokens).
4115
+ */
3342
4116
  MEDIA_RESOLUTION_HIGH = "MEDIA_RESOLUTION_HIGH"
3343
4117
  }
3344
4118
 
3345
4119
  /** Server content modalities. */
3346
4120
  export declare enum Modality {
4121
+ /**
4122
+ * The modality is unspecified.
4123
+ */
3347
4124
  MODALITY_UNSPECIFIED = "MODALITY_UNSPECIFIED",
4125
+ /**
4126
+ * Indicates the model should return text
4127
+ */
3348
4128
  TEXT = "TEXT",
4129
+ /**
4130
+ * Indicates the model should return images.
4131
+ */
3349
4132
  IMAGE = "IMAGE",
4133
+ /**
4134
+ * Indicates the model should return images.
4135
+ */
3350
4136
  AUDIO = "AUDIO"
3351
4137
  }
3352
4138
 
@@ -3360,7 +4146,13 @@ export declare interface ModalityTokenCount {
3360
4146
 
3361
4147
  /** The mode of the predictor to be used in dynamic retrieval. */
3362
4148
  export declare enum Mode {
4149
+ /**
4150
+ * Always trigger retrieval.
4151
+ */
3363
4152
  MODE_UNSPECIFIED = "MODE_UNSPECIFIED",
4153
+ /**
4154
+ * Run retrieval only when system decides it is necessary.
4155
+ */
3364
4156
  MODE_DYNAMIC = "MODE_DYNAMIC"
3365
4157
  }
3366
4158
 
@@ -3481,6 +4273,15 @@ export declare class Models extends BaseModule {
3481
4273
  * ```
3482
4274
  */
3483
4275
  generateContentStream: (params: types.GenerateContentParameters) => Promise<AsyncGenerator<types.GenerateContentResponse>>;
4276
+ /**
4277
+ * Transforms the CallableTools in the parameters to be simply Tools, it
4278
+ * copies the params into a new object and replaces the tools, it does not
4279
+ * modify the original params. Also sets the MCP usage header if there are
4280
+ * MCP tools in the parameters.
4281
+ */
4282
+ private processParamsForMcpUsage;
4283
+ private initAfcToolsMap;
4284
+ private processAfcStream;
3484
4285
  /**
3485
4286
  * Generates an image based on a text description and configuration.
3486
4287
  *
@@ -3698,6 +4499,30 @@ export declare interface ModelSelectionConfig {
3698
4499
  featureSelectionPreference?: FeatureSelectionPreference;
3699
4500
  }
3700
4501
 
4502
+ /** The configuration for the multi-speaker setup. */
4503
+ export declare interface MultiSpeakerVoiceConfig {
4504
+ /** The configuration for the speaker to use. */
4505
+ speakerVoiceConfigs?: SpeakerVoiceConfig[];
4506
+ }
4507
+
4508
+ /** The mode of music generation. */
4509
+ export declare enum MusicGenerationMode {
4510
+ /**
4511
+ * This value is unused.
4512
+ */
4513
+ MUSIC_GENERATION_MODE_UNSPECIFIED = "MUSIC_GENERATION_MODE_UNSPECIFIED",
4514
+ /**
4515
+ * Steer text prompts to regions of latent space with higher quality
4516
+ music.
4517
+ */
4518
+ QUALITY = "QUALITY",
4519
+ /**
4520
+ * Steer text prompts to regions of latent space with a larger diversity
4521
+ of music.
4522
+ */
4523
+ DIVERSITY = "DIVERSITY"
4524
+ }
4525
+
3701
4526
  /** A long-running operation. */
3702
4527
  export declare interface Operation {
3703
4528
  /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */
@@ -3739,9 +4564,21 @@ export declare class Operations extends BaseModule {
3739
4564
  */
3740
4565
  /** Required. Outcome of the code execution. */
3741
4566
  export declare enum Outcome {
4567
+ /**
4568
+ * Unspecified status. This value should not be used.
4569
+ */
3742
4570
  OUTCOME_UNSPECIFIED = "OUTCOME_UNSPECIFIED",
4571
+ /**
4572
+ * Code execution completed successfully.
4573
+ */
3743
4574
  OUTCOME_OK = "OUTCOME_OK",
4575
+ /**
4576
+ * Code execution finished but with a failure. `stderr` should contain the reason.
4577
+ */
3744
4578
  OUTCOME_FAILED = "OUTCOME_FAILED",
4579
+ /**
4580
+ * Code execution ran for too long, and was cancelled. There may or may not be a partial output present.
4581
+ */
3745
4582
  OUTCOME_DEADLINE_EXCEEDED = "OUTCOME_DEADLINE_EXCEEDED"
3746
4583
  }
3747
4584
 
@@ -3922,11 +4759,18 @@ export declare enum PersonGeneration {
3922
4759
 
3923
4760
  /** The configuration for the prebuilt speaker to use. */
3924
4761
  export declare interface PrebuiltVoiceConfig {
3925
- /** The name of the prebuilt voice to use.
3926
- */
4762
+ /** The name of the prebuilt voice to use. */
3927
4763
  voiceName?: string;
3928
4764
  }
3929
4765
 
4766
+ /** Config for proactivity features. */
4767
+ export declare interface ProactivityConfig {
4768
+ /** If enabled, the model can reject responding to the last prompt. For
4769
+ example, this allows the model to ignore out of context speech or to stay
4770
+ silent if the user did not make a request, yet. */
4771
+ proactiveAudio?: boolean;
4772
+ }
4773
+
3930
4774
  /** Specifies the context retrieval config. */
3931
4775
  export declare interface RagRetrievalConfig {
3932
4776
  /** Optional. Config for filters. */
@@ -4107,6 +4951,62 @@ export declare interface SafetySetting {
4107
4951
  threshold?: HarmBlockThreshold;
4108
4952
  }
4109
4953
 
4954
+ /** Scale of the generated music. */
4955
+ export declare enum Scale {
4956
+ /**
4957
+ * Default value. This value is unused.
4958
+ */
4959
+ SCALE_UNSPECIFIED = "SCALE_UNSPECIFIED",
4960
+ /**
4961
+ * C major or A minor.
4962
+ */
4963
+ C_MAJOR_A_MINOR = "C_MAJOR_A_MINOR",
4964
+ /**
4965
+ * Db major or Bb minor.
4966
+ */
4967
+ D_FLAT_MAJOR_B_FLAT_MINOR = "D_FLAT_MAJOR_B_FLAT_MINOR",
4968
+ /**
4969
+ * D major or B minor.
4970
+ */
4971
+ D_MAJOR_B_MINOR = "D_MAJOR_B_MINOR",
4972
+ /**
4973
+ * Eb major or C minor
4974
+ */
4975
+ E_FLAT_MAJOR_C_MINOR = "E_FLAT_MAJOR_C_MINOR",
4976
+ /**
4977
+ * E major or Db minor.
4978
+ */
4979
+ E_MAJOR_D_FLAT_MINOR = "E_MAJOR_D_FLAT_MINOR",
4980
+ /**
4981
+ * F major or D minor.
4982
+ */
4983
+ F_MAJOR_D_MINOR = "F_MAJOR_D_MINOR",
4984
+ /**
4985
+ * Gb major or Eb minor.
4986
+ */
4987
+ G_FLAT_MAJOR_E_FLAT_MINOR = "G_FLAT_MAJOR_E_FLAT_MINOR",
4988
+ /**
4989
+ * G major or E minor.
4990
+ */
4991
+ G_MAJOR_E_MINOR = "G_MAJOR_E_MINOR",
4992
+ /**
4993
+ * Ab major or F minor.
4994
+ */
4995
+ A_FLAT_MAJOR_F_MINOR = "A_FLAT_MAJOR_F_MINOR",
4996
+ /**
4997
+ * A major or Gb minor.
4998
+ */
4999
+ A_MAJOR_G_FLAT_MINOR = "A_MAJOR_G_FLAT_MINOR",
5000
+ /**
5001
+ * Bb major or G minor.
5002
+ */
5003
+ B_FLAT_MAJOR_G_MINOR = "B_FLAT_MAJOR_G_MINOR",
5004
+ /**
5005
+ * B major or Ab minor.
5006
+ */
5007
+ B_MAJOR_A_FLAT_MINOR = "B_MAJOR_A_FLAT_MINOR"
5008
+ }
5009
+
4110
5010
  /** Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. */
4111
5011
  export declare interface Schema {
4112
5012
  /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */
@@ -4155,7 +5055,7 @@ export declare interface Schema {
4155
5055
  type?: Type;
4156
5056
  }
4157
5057
 
4158
- export declare type SchemaUnion = Schema;
5058
+ export declare type SchemaUnion = Schema | unknown;
4159
5059
 
4160
5060
  /** Google search entry point. */
4161
5061
  export declare interface SearchEntryPoint {
@@ -4371,11 +5271,24 @@ export declare interface SlidingWindow {
4371
5271
  targetTokens?: string;
4372
5272
  }
4373
5273
 
5274
+ /** The configuration for the speaker to use. */
5275
+ export declare interface SpeakerVoiceConfig {
5276
+ /** The name of the speaker to use. Should be the same as in the
5277
+ prompt. */
5278
+ speaker?: string;
5279
+ /** The configuration for the voice to use. */
5280
+ voiceConfig?: VoiceConfig;
5281
+ }
5282
+
4374
5283
  /** The speech generation configuration. */
4375
5284
  export declare interface SpeechConfig {
4376
5285
  /** The configuration for the speaker to use.
4377
5286
  */
4378
5287
  voiceConfig?: VoiceConfig;
5288
+ /** The configuration for the multi-speaker setup.
5289
+ It is mutually exclusive with the voice_config field.
5290
+ */
5291
+ multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
4379
5292
  /** Language code (ISO 639. e.g. en-US) for the speech synthesization.
4380
5293
  Only available for Live API.
4381
5294
  */
@@ -4386,8 +5299,17 @@ export declare type SpeechConfigUnion = SpeechConfig | string;
4386
5299
 
4387
5300
  /** Start of speech sensitivity. */
4388
5301
  export declare enum StartSensitivity {
5302
+ /**
5303
+ * The default is START_SENSITIVITY_LOW.
5304
+ */
4389
5305
  START_SENSITIVITY_UNSPECIFIED = "START_SENSITIVITY_UNSPECIFIED",
5306
+ /**
5307
+ * Automatic detection will detect the start of speech more often.
5308
+ */
4390
5309
  START_SENSITIVITY_HIGH = "START_SENSITIVITY_HIGH",
5310
+ /**
5311
+ * Automatic detection will detect the start of speech less often.
5312
+ */
4391
5313
  START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW"
4392
5314
  }
4393
5315
 
@@ -4582,6 +5504,8 @@ export declare interface TokensInfo {
4582
5504
 
4583
5505
  /** Tool details of a tool that the model may use to generate a response. */
4584
5506
  export declare interface Tool {
5507
+ /** List of function declarations that the tool supports. */
5508
+ functionDeclarations?: FunctionDeclaration[];
4585
5509
  /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. */
4586
5510
  retrieval?: Retrieval;
4587
5511
  /** Optional. Google Search tool type. Specialized retrieval tool
@@ -4595,10 +5519,10 @@ export declare interface Tool {
4595
5519
  /** Optional. Google Maps tool type. Specialized retrieval tool
4596
5520
  that is powered by Google Maps. */
4597
5521
  googleMaps?: GoogleMaps;
5522
+ /** Optional. Tool to support URL context retrieval. */
5523
+ urlContext?: UrlContext;
4598
5524
  /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */
4599
5525
  codeExecution?: ToolCodeExecution;
4600
- /** Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided. */
4601
- functionDeclarations?: FunctionDeclaration[];
4602
5526
  }
4603
5527
 
4604
5528
  /** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */
@@ -4616,12 +5540,23 @@ export declare interface ToolConfig {
4616
5540
  retrievalConfig?: RetrievalConfig;
4617
5541
  }
4618
5542
 
4619
- export declare type ToolListUnion = Tool[];
5543
+ export declare type ToolListUnion = ToolUnion[];
5544
+
5545
+ export declare type ToolUnion = Tool | CallableTool;
4620
5546
 
4621
5547
  /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */
4622
5548
  export declare enum TrafficType {
5549
+ /**
5550
+ * Unspecified request traffic type.
5551
+ */
4623
5552
  TRAFFIC_TYPE_UNSPECIFIED = "TRAFFIC_TYPE_UNSPECIFIED",
5553
+ /**
5554
+ * Type for Pay-As-You-Go traffic.
5555
+ */
4624
5556
  ON_DEMAND = "ON_DEMAND",
5557
+ /**
5558
+ * Type for Provisioned Throughput traffic.
5559
+ */
4625
5560
  PROVISIONED_THROUGHPUT = "PROVISIONED_THROUGHPUT"
4626
5561
  }
4627
5562
 
@@ -4784,19 +5719,49 @@ export declare interface TuningValidationDataset {
4784
5719
 
4785
5720
  /** Options about which input is included in the user's turn. */
4786
5721
  export declare enum TurnCoverage {
5722
+ /**
5723
+ * If unspecified, the default behavior is `TURN_INCLUDES_ONLY_ACTIVITY`.
5724
+ */
4787
5725
  TURN_COVERAGE_UNSPECIFIED = "TURN_COVERAGE_UNSPECIFIED",
5726
+ /**
5727
+ * The users turn only includes activity since the last turn, excluding inactivity (e.g. silence on the audio stream). This is the default behavior.
5728
+ */
4788
5729
  TURN_INCLUDES_ONLY_ACTIVITY = "TURN_INCLUDES_ONLY_ACTIVITY",
5730
+ /**
5731
+ * The users turn includes all realtime input since the last turn, including inactivity (e.g. silence on the audio stream).
5732
+ */
4789
5733
  TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT"
4790
5734
  }
4791
5735
 
4792
5736
  /** Optional. The type of the data. */
4793
5737
  export declare enum Type {
5738
+ /**
5739
+ * Not specified, should not be used.
5740
+ */
4794
5741
  TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
5742
+ /**
5743
+ * OpenAPI string type
5744
+ */
4795
5745
  STRING = "STRING",
5746
+ /**
5747
+ * OpenAPI number type
5748
+ */
4796
5749
  NUMBER = "NUMBER",
5750
+ /**
5751
+ * OpenAPI integer type
5752
+ */
4797
5753
  INTEGER = "INTEGER",
5754
+ /**
5755
+ * OpenAPI boolean type
5756
+ */
4798
5757
  BOOLEAN = "BOOLEAN",
5758
+ /**
5759
+ * OpenAPI array type
5760
+ */
4799
5761
  ARRAY = "ARRAY",
5762
+ /**
5763
+ * OpenAPI object type
5764
+ */
4800
5765
  OBJECT = "OBJECT"
4801
5766
  }
4802
5767
 
@@ -4816,9 +5781,9 @@ declare namespace types {
4816
5781
  HarmCategory,
4817
5782
  HarmBlockMethod,
4818
5783
  HarmBlockThreshold,
5784
+ Type,
4819
5785
  Mode,
4820
5786
  AuthType,
4821
- Type,
4822
5787
  FinishReason,
4823
5788
  HarmProbability,
4824
5789
  HarmSeverity,
@@ -4829,8 +5794,10 @@ declare namespace types {
4829
5794
  JobState,
4830
5795
  AdapterSize,
4831
5796
  FeatureSelectionPreference,
5797
+ Behavior,
4832
5798
  DynamicRetrievalConfigMode,
4833
5799
  FunctionCallingConfigMode,
5800
+ UrlRetrievalStatus,
4834
5801
  SafetyFilterLevel,
4835
5802
  PersonGeneration,
4836
5803
  ImagePromptLanguage,
@@ -4845,8 +5812,12 @@ declare namespace types {
4845
5812
  EndSensitivity,
4846
5813
  ActivityHandling,
4847
5814
  TurnCoverage,
4848
- Blob_2 as Blob,
5815
+ FunctionResponseScheduling,
5816
+ Scale,
5817
+ MusicGenerationMode,
5818
+ LiveMusicPlaybackControl,
4849
5819
  VideoMetadata,
5820
+ Blob_2 as Blob,
4850
5821
  CodeExecutionResult,
4851
5822
  ExecutableCode,
4852
5823
  FileData,
@@ -4857,6 +5828,9 @@ declare namespace types {
4857
5828
  HttpOptions,
4858
5829
  ModelSelectionConfig,
4859
5830
  SafetySetting,
5831
+ Schema,
5832
+ FunctionDeclaration,
5833
+ Interval,
4860
5834
  GoogleSearch,
4861
5835
  DynamicRetrievalConfig,
4862
5836
  GoogleSearchRetrieval,
@@ -4868,6 +5842,7 @@ declare namespace types {
4868
5842
  AuthConfigOidcConfig,
4869
5843
  AuthConfig,
4870
5844
  GoogleMaps,
5845
+ UrlContext,
4871
5846
  VertexAISearch,
4872
5847
  VertexRagStoreRagResource,
4873
5848
  RagRetrievalConfigFilter,
@@ -4879,8 +5854,6 @@ declare namespace types {
4879
5854
  VertexRagStore,
4880
5855
  Retrieval,
4881
5856
  ToolCodeExecution,
4882
- Schema,
4883
- FunctionDeclaration,
4884
5857
  Tool,
4885
5858
  FunctionCallingConfig,
4886
5859
  LatLng,
@@ -4888,7 +5861,10 @@ declare namespace types {
4888
5861
  ToolConfig,
4889
5862
  PrebuiltVoiceConfig,
4890
5863
  VoiceConfig,
5864
+ SpeakerVoiceConfig,
5865
+ MultiSpeakerVoiceConfig,
4891
5866
  SpeechConfig,
5867
+ AutomaticFunctionCallingConfig,
4892
5868
  ThinkingConfig,
4893
5869
  GenerationConfigRoutingConfigAutoRoutingMode,
4894
5870
  GenerationConfigRoutingConfigManualRoutingMode,
@@ -4898,6 +5874,8 @@ declare namespace types {
4898
5874
  GoogleTypeDate,
4899
5875
  Citation,
4900
5876
  CitationMetadata,
5877
+ UrlMetadata,
5878
+ UrlContextMetadata,
4901
5879
  GroundingChunkRetrievedContext,
4902
5880
  GroundingChunkWeb,
4903
5881
  GroundingChunk,
@@ -5016,7 +5994,6 @@ declare namespace types {
5016
5994
  CreateFileParameters,
5017
5995
  HttpResponse,
5018
5996
  LiveCallbacks,
5019
- UploadFileParameters,
5020
5997
  CreateFileResponse,
5021
5998
  GetFileConfig,
5022
5999
  GetFileParameters,
@@ -5058,6 +6035,7 @@ declare namespace types {
5058
6035
  SlidingWindow,
5059
6036
  ContextWindowCompressionConfig,
5060
6037
  AudioTranscriptionConfig,
6038
+ ProactivityConfig,
5061
6039
  LiveClientSetup,
5062
6040
  LiveClientContent,
5063
6041
  ActivityStart,
@@ -5072,6 +6050,26 @@ declare namespace types {
5072
6050
  SendMessageParameters,
5073
6051
  LiveSendClientContentParameters,
5074
6052
  LiveSendToolResponseParameters,
6053
+ LiveMusicClientSetup,
6054
+ WeightedPrompt,
6055
+ LiveMusicClientContent,
6056
+ LiveMusicGenerationConfig,
6057
+ LiveMusicClientMessage,
6058
+ LiveMusicServerSetupComplete,
6059
+ LiveMusicSourceMetadata,
6060
+ AudioChunk,
6061
+ LiveMusicServerContent,
6062
+ LiveMusicFilteredPrompt,
6063
+ LiveMusicServerMessage,
6064
+ LiveMusicCallbacks,
6065
+ UploadFileParameters,
6066
+ CallableTool,
6067
+ CallableToolConfig,
6068
+ LiveMusicConnectParameters,
6069
+ LiveMusicSetConfigParameters,
6070
+ LiveMusicSetWeightedPromptsParameters,
6071
+ LiveEphemeralParameters,
6072
+ CreateAuthTokenConfig,
5075
6073
  OperationGetParameters,
5076
6074
  BlobImageUnion,
5077
6075
  PartUnion,
@@ -5080,6 +6078,7 @@ declare namespace types {
5080
6078
  ContentListUnion,
5081
6079
  SchemaUnion,
5082
6080
  SpeechConfigUnion,
6081
+ ToolUnion,
5083
6082
  ToolListUnion,
5084
6083
  DownloadableFileUnion
5085
6084
  }
@@ -5226,6 +6225,40 @@ export declare class UpscaleImageResponse {
5226
6225
  generatedImages?: GeneratedImage[];
5227
6226
  }
5228
6227
 
6228
+ /** Tool to support URL context retrieval. */
6229
+ export declare interface UrlContext {
6230
+ }
6231
+
6232
+ /** Metadata related to url context retrieval tool. */
6233
+ export declare interface UrlContextMetadata {
6234
+ /** List of url context. */
6235
+ urlMetadata?: UrlMetadata[];
6236
+ }
6237
+
6238
+ /** Context for a single url retrieval. */
6239
+ export declare interface UrlMetadata {
6240
+ /** The URL retrieved by the tool. */
6241
+ retrievedUrl?: string;
6242
+ /** Status of the url retrieval. */
6243
+ urlRetrievalStatus?: UrlRetrievalStatus;
6244
+ }
6245
+
6246
+ /** Status of the url retrieval. */
6247
+ export declare enum UrlRetrievalStatus {
6248
+ /**
6249
+ * Default value. This value is unused
6250
+ */
6251
+ URL_RETRIEVAL_STATUS_UNSPECIFIED = "URL_RETRIEVAL_STATUS_UNSPECIFIED",
6252
+ /**
6253
+ * Url retrieval is successful.
6254
+ */
6255
+ URL_RETRIEVAL_STATUS_SUCCESS = "URL_RETRIEVAL_STATUS_SUCCESS",
6256
+ /**
6257
+ * Url retrieval is failed due to error.
6258
+ */
6259
+ URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR"
6260
+ }
6261
+
5229
6262
  /** Usage metadata about response(s). */
5230
6263
  export declare interface UsageMetadata {
5231
6264
  /** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */
@@ -5293,8 +6326,11 @@ export declare interface Video {
5293
6326
  mimeType?: string;
5294
6327
  }
5295
6328
 
5296
- /** Metadata describes the input video content. */
6329
+ /** Describes how the video in the Part should be used by the model. */
5297
6330
  export declare interface VideoMetadata {
6331
+ /** The frame rate of the video sent to the model. If not specified, the
6332
+ default value will be 1.0. The fps range is (0.0, 24.0]. */
6333
+ fps?: number;
5298
6334
  /** Optional. The end offset of the video. */
5299
6335
  endOffset?: string;
5300
6336
  /** Optional. The start offset of the video. */
@@ -5342,4 +6378,17 @@ declare interface WebSocketFactory {
5342
6378
  create(url: string, headers: Record<string, string>, callbacks: WebSocketCallbacks): WebSocket_2;
5343
6379
  }
5344
6380
 
6381
+ /** Maps a prompt to a relative weight to steer music generation. */
6382
+ export declare interface WeightedPrompt {
6383
+ /** Text prompt. */
6384
+ text?: string;
6385
+ /** Weight of the prompt. The weight is used to control the relative
6386
+ importance of the prompt. Higher weights are more important than lower
6387
+ weights.
6388
+
6389
+ Weight must not be 0. Weights of all weighted_prompts in this
6390
+ LiveMusicClientContent message will be normalized. */
6391
+ weight?: number;
6392
+ }
6393
+
5345
6394
  export { }