@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/genai.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. */
@@ -2449,6 +2732,10 @@ export declare interface GoogleRpcStatus {
2449
2732
 
2450
2733
  /** Tool to support Google Search in Model. Powered by Google. */
2451
2734
  export declare interface GoogleSearch {
2735
+ /** Optional. Filter search results to a specific time range.
2736
+ If customers set a start time, they must set an end time (and vice versa).
2737
+ */
2738
+ timeRangeFilter?: Interval;
2452
2739
  }
2453
2740
 
2454
2741
  /** Tool to retrieve public web data for grounding, powered by Google. */
@@ -2523,46 +2810,121 @@ export declare interface GroundingSupport {
2523
2810
 
2524
2811
  /** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */
2525
2812
  export declare enum HarmBlockMethod {
2813
+ /**
2814
+ * The harm block method is unspecified.
2815
+ */
2526
2816
  HARM_BLOCK_METHOD_UNSPECIFIED = "HARM_BLOCK_METHOD_UNSPECIFIED",
2817
+ /**
2818
+ * The harm block method uses both probability and severity scores.
2819
+ */
2527
2820
  SEVERITY = "SEVERITY",
2821
+ /**
2822
+ * The harm block method uses the probability score.
2823
+ */
2528
2824
  PROBABILITY = "PROBABILITY"
2529
2825
  }
2530
2826
 
2531
2827
  /** Required. The harm block threshold. */
2532
2828
  export declare enum HarmBlockThreshold {
2829
+ /**
2830
+ * Unspecified harm block threshold.
2831
+ */
2533
2832
  HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
2833
+ /**
2834
+ * Block low threshold and above (i.e. block more).
2835
+ */
2534
2836
  BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
2837
+ /**
2838
+ * Block medium threshold and above.
2839
+ */
2535
2840
  BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
2841
+ /**
2842
+ * Block only high threshold (i.e. block less).
2843
+ */
2536
2844
  BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
2845
+ /**
2846
+ * Block none.
2847
+ */
2537
2848
  BLOCK_NONE = "BLOCK_NONE",
2849
+ /**
2850
+ * Turn off the safety filter.
2851
+ */
2538
2852
  OFF = "OFF"
2539
2853
  }
2540
2854
 
2541
2855
  /** Required. Harm category. */
2542
2856
  export declare enum HarmCategory {
2857
+ /**
2858
+ * The harm category is unspecified.
2859
+ */
2543
2860
  HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED",
2861
+ /**
2862
+ * The harm category is hate speech.
2863
+ */
2544
2864
  HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
2865
+ /**
2866
+ * The harm category is dangerous content.
2867
+ */
2545
2868
  HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
2869
+ /**
2870
+ * The harm category is harassment.
2871
+ */
2546
2872
  HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT",
2873
+ /**
2874
+ * The harm category is sexually explicit content.
2875
+ */
2547
2876
  HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT",
2877
+ /**
2878
+ * The harm category is civic integrity.
2879
+ */
2548
2880
  HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY"
2549
2881
  }
2550
2882
 
2551
2883
  /** Output only. Harm probability levels in the content. */
2552
2884
  export declare enum HarmProbability {
2885
+ /**
2886
+ * Harm probability unspecified.
2887
+ */
2553
2888
  HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED",
2889
+ /**
2890
+ * Negligible level of harm.
2891
+ */
2554
2892
  NEGLIGIBLE = "NEGLIGIBLE",
2893
+ /**
2894
+ * Low level of harm.
2895
+ */
2555
2896
  LOW = "LOW",
2897
+ /**
2898
+ * Medium level of harm.
2899
+ */
2556
2900
  MEDIUM = "MEDIUM",
2901
+ /**
2902
+ * High level of harm.
2903
+ */
2557
2904
  HIGH = "HIGH"
2558
2905
  }
2559
2906
 
2560
2907
  /** Output only. Harm severity levels in the content. */
2561
2908
  export declare enum HarmSeverity {
2909
+ /**
2910
+ * Harm severity unspecified.
2911
+ */
2562
2912
  HARM_SEVERITY_UNSPECIFIED = "HARM_SEVERITY_UNSPECIFIED",
2913
+ /**
2914
+ * Negligible level of harm severity.
2915
+ */
2563
2916
  HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE",
2917
+ /**
2918
+ * Low level of harm severity.
2919
+ */
2564
2920
  HARM_SEVERITY_LOW = "HARM_SEVERITY_LOW",
2921
+ /**
2922
+ * Medium level of harm severity.
2923
+ */
2565
2924
  HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM",
2925
+ /**
2926
+ * High level of harm severity.
2927
+ */
2566
2928
  HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH"
2567
2929
  }
2568
2930
 
@@ -2663,25 +3025,81 @@ export declare enum ImagePromptLanguage {
2663
3025
  hi = "hi"
2664
3026
  }
2665
3027
 
3028
+ /** Represents a time interval, encoded as a start time (inclusive) and an end time (exclusive).
3029
+
3030
+ The start time must be less than or equal to the end time.
3031
+ When the start equals the end time, the interval is an empty interval.
3032
+ (matches no time)
3033
+ When both start and end are unspecified, the interval matches any time.
3034
+ */
3035
+ export declare interface Interval {
3036
+ /** The start time of the interval. */
3037
+ startTime?: string;
3038
+ /** The end time of the interval. */
3039
+ endTime?: string;
3040
+ }
3041
+
2666
3042
  /** Output only. The detailed state of the job. */
2667
3043
  export declare enum JobState {
3044
+ /**
3045
+ * The job state is unspecified.
3046
+ */
2668
3047
  JOB_STATE_UNSPECIFIED = "JOB_STATE_UNSPECIFIED",
3048
+ /**
3049
+ * The job has been just created or resumed and processing has not yet begun.
3050
+ */
2669
3051
  JOB_STATE_QUEUED = "JOB_STATE_QUEUED",
3052
+ /**
3053
+ * The service is preparing to run the job.
3054
+ */
2670
3055
  JOB_STATE_PENDING = "JOB_STATE_PENDING",
3056
+ /**
3057
+ * The job is in progress.
3058
+ */
2671
3059
  JOB_STATE_RUNNING = "JOB_STATE_RUNNING",
3060
+ /**
3061
+ * The job completed successfully.
3062
+ */
2672
3063
  JOB_STATE_SUCCEEDED = "JOB_STATE_SUCCEEDED",
3064
+ /**
3065
+ * The job failed.
3066
+ */
2673
3067
  JOB_STATE_FAILED = "JOB_STATE_FAILED",
3068
+ /**
3069
+ * 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`.
3070
+ */
2674
3071
  JOB_STATE_CANCELLING = "JOB_STATE_CANCELLING",
3072
+ /**
3073
+ * The job has been cancelled.
3074
+ */
2675
3075
  JOB_STATE_CANCELLED = "JOB_STATE_CANCELLED",
3076
+ /**
3077
+ * The job has been stopped, and can be resumed.
3078
+ */
2676
3079
  JOB_STATE_PAUSED = "JOB_STATE_PAUSED",
3080
+ /**
3081
+ * The job has expired.
3082
+ */
2677
3083
  JOB_STATE_EXPIRED = "JOB_STATE_EXPIRED",
3084
+ /**
3085
+ * The job is being updated. Only jobs in the `RUNNING` state can be updated. After updating, the job goes back to the `RUNNING` state.
3086
+ */
2678
3087
  JOB_STATE_UPDATING = "JOB_STATE_UPDATING",
3088
+ /**
3089
+ * The job is partially succeeded, some results may be missing due to errors.
3090
+ */
2679
3091
  JOB_STATE_PARTIALLY_SUCCEEDED = "JOB_STATE_PARTIALLY_SUCCEEDED"
2680
3092
  }
2681
3093
 
2682
3094
  /** Required. Programming language of the `code`. */
2683
3095
  export declare enum Language {
3096
+ /**
3097
+ * Unspecified language. This value should not be used.
3098
+ */
2684
3099
  LANGUAGE_UNSPECIFIED = "LANGUAGE_UNSPECIFIED",
3100
+ /**
3101
+ * Python >= 3.10, with numpy and simpy available.
3102
+ */
2685
3103
  PYTHON = "PYTHON"
2686
3104
  }
2687
3105
 
@@ -2822,12 +3240,14 @@ export declare class Live {
2822
3240
  private readonly apiClient;
2823
3241
  private readonly auth;
2824
3242
  private readonly webSocketFactory;
3243
+ readonly music: LiveMusic;
2825
3244
  constructor(apiClient: ApiClient, auth: Auth, webSocketFactory: WebSocketFactory);
2826
3245
  /**
2827
3246
  Establishes a connection to the specified model with the given
2828
3247
  configuration and returns a Session object representing that connection.
2829
3248
 
2830
- @experimental
3249
+ @experimental Built-in MCP support is an experimental feature, may change in
3250
+ future versions.
2831
3251
 
2832
3252
  @remarks
2833
3253
 
@@ -2865,6 +3285,7 @@ export declare class Live {
2865
3285
  ```
2866
3286
  */
2867
3287
  connect(params: types.LiveConnectParameters): Promise<Session>;
3288
+ private isCallableTool;
2868
3289
  }
2869
3290
 
2870
3291
  /** Callbacks for the live API. */
@@ -2998,6 +3419,9 @@ export declare interface LiveClientSetup {
2998
3419
  specified for the output audio.
2999
3420
  */
3000
3421
  outputAudioTranscription?: AudioTranscriptionConfig;
3422
+ /** Configures the proactivity of the model. This allows the model to respond proactively to
3423
+ the input and to ignore irrelevant input. */
3424
+ proactivity?: ProactivityConfig;
3001
3425
  }
3002
3426
 
3003
3427
  /** Client generated response to a `ToolCall` received from the server.
@@ -3017,6 +3441,15 @@ export declare class LiveClientToolResponse {
3017
3441
 
3018
3442
  /** Session config for the API connection. */
3019
3443
  export declare interface LiveConnectConfig {
3444
+ /** Used to override HTTP request options. */
3445
+ httpOptions?: HttpOptions;
3446
+ /** Abort signal which can be used to cancel the request.
3447
+
3448
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
3449
+ operation will not cancel the request in the service. You will still
3450
+ be charged usage for any applicable operations.
3451
+ */
3452
+ abortSignal?: AbortSignal;
3020
3453
  /** The generation configuration for the session. */
3021
3454
  generationConfig?: GenerationConfig;
3022
3455
  /** The requested modalities of the response. Represents the set of
@@ -3055,6 +3488,8 @@ export declare interface LiveConnectConfig {
3055
3488
  /** The speech generation configuration.
3056
3489
  */
3057
3490
  speechConfig?: SpeechConfig;
3491
+ /** If enabled, the model will detect emotions and adapt its responses accordingly. */
3492
+ enableAffectiveDialog?: boolean;
3058
3493
  /** The user provided system instructions for the model.
3059
3494
  Note: only text should be used in parts and content in each part will be
3060
3495
  in a separate paragraph. */
@@ -3082,6 +3517,9 @@ export declare interface LiveConnectConfig {
3082
3517
 
3083
3518
  If included, server will compress context window to fit into given length. */
3084
3519
  contextWindowCompression?: ContextWindowCompressionConfig;
3520
+ /** Configures the proactivity of the model. This allows the model to respond proactively to
3521
+ the input and to ignore irrelevant input. */
3522
+ proactivity?: ProactivityConfig;
3085
3523
  }
3086
3524
 
3087
3525
  /** Parameters for connecting to the live API. */
@@ -3096,23 +3534,315 @@ export declare interface LiveConnectParameters {
3096
3534
  config?: LiveConnectConfig;
3097
3535
  }
3098
3536
 
3099
- /** Parameters for sending client content to the live API. */
3100
- export declare interface LiveSendClientContentParameters {
3101
- /** Client content to send to the session. */
3102
- turns?: ContentListUnion;
3103
- /** If true, indicates that the server content generation should start with
3104
- the currently accumulated prompt. Otherwise, the server will await
3105
- additional messages before starting generation. */
3106
- turnComplete?: boolean;
3537
+ /** Config for LiveEphemeralParameters for Auth Token creation. */
3538
+ export declare interface LiveEphemeralParameters {
3539
+ /** ID of the model to configure in the ephemeral token for Live API.
3540
+ For a list of models, see `Gemini models
3541
+ <https://ai.google.dev/gemini-api/docs/models>`. */
3542
+ model?: string;
3543
+ /** Configuration specific to Live API connections created using this token. */
3544
+ config?: LiveConnectConfig;
3107
3545
  }
3108
3546
 
3109
- /** Parameters for sending realtime input to the live API. */
3110
- export declare interface LiveSendRealtimeInputParameters {
3111
- /** Realtime input to send to the session. */
3112
- media?: BlobImageUnion;
3113
- /** The realtime audio input stream. */
3114
- audio?: Blob_2;
3115
- /**
3547
+ /**
3548
+ LiveMusic class encapsulates the configuration for live music
3549
+ generation via Lyria Live models.
3550
+
3551
+ @experimental
3552
+ */
3553
+ declare class LiveMusic {
3554
+ private readonly apiClient;
3555
+ private readonly auth;
3556
+ private readonly webSocketFactory;
3557
+ constructor(apiClient: ApiClient, auth: Auth, webSocketFactory: WebSocketFactory);
3558
+ /**
3559
+ Establishes a connection to the specified model and returns a
3560
+ LiveMusicSession object representing that connection.
3561
+
3562
+ @experimental
3563
+
3564
+ @remarks
3565
+
3566
+ @param params - The parameters for establishing a connection to the model.
3567
+ @return A live session.
3568
+
3569
+ @example
3570
+ ```ts
3571
+ let model = 'models/lyria-realtime-exp';
3572
+ const session = await ai.live.music.connect({
3573
+ model: model,
3574
+ callbacks: {
3575
+ onmessage: (e: MessageEvent) => {
3576
+ console.log('Received message from the server: %s\n', debug(e.data));
3577
+ },
3578
+ onerror: (e: ErrorEvent) => {
3579
+ console.log('Error occurred: %s\n', debug(e.error));
3580
+ },
3581
+ onclose: (e: CloseEvent) => {
3582
+ console.log('Connection closed.');
3583
+ },
3584
+ },
3585
+ });
3586
+ ```
3587
+ */
3588
+ connect(params: types.LiveMusicConnectParameters): Promise<LiveMusicSession>;
3589
+ }
3590
+
3591
+ /** Callbacks for the realtime music API. */
3592
+ export declare interface LiveMusicCallbacks {
3593
+ /**
3594
+ * Called when a message is received from the server.
3595
+ */
3596
+ onmessage: (e: LiveMusicServerMessage) => void;
3597
+ /**
3598
+ * Called when an error occurs.
3599
+ */
3600
+ onerror?: ((e: ErrorEvent) => void) | null;
3601
+ /**
3602
+ * Called when the websocket connection is closed.
3603
+ */
3604
+ onclose?: ((e: CloseEvent) => void) | null;
3605
+ }
3606
+
3607
+ /** User input to start or steer the music. */
3608
+ export declare interface LiveMusicClientContent {
3609
+ /** Weighted prompts as the model input. */
3610
+ weightedPrompts?: WeightedPrompt[];
3611
+ }
3612
+
3613
+ /** Messages sent by the client in the LiveMusicClientMessage call. */
3614
+ export declare interface LiveMusicClientMessage {
3615
+ /** Message to be sent in the first (and only in the first) `LiveMusicClientMessage`.
3616
+ Clients should wait for a `LiveMusicSetupComplete` message before
3617
+ sending any additional messages. */
3618
+ setup?: LiveMusicClientSetup;
3619
+ /** User input to influence music generation. */
3620
+ clientContent?: LiveMusicClientContent;
3621
+ /** Configuration for music generation. */
3622
+ musicGenerationConfig?: LiveMusicGenerationConfig;
3623
+ /** Playback control signal for the music generation. */
3624
+ playbackControl?: LiveMusicPlaybackControl;
3625
+ }
3626
+
3627
+ /** Message to be sent by the system when connecting to the API. */
3628
+ export declare interface LiveMusicClientSetup {
3629
+ /** The model's resource name. Format: `models/{model}`. */
3630
+ model?: string;
3631
+ }
3632
+
3633
+ /** Parameters for connecting to the live API. */
3634
+ export declare interface LiveMusicConnectParameters {
3635
+ /** The model's resource name. */
3636
+ model: string;
3637
+ /** Callbacks invoked on server events. */
3638
+ callbacks: LiveMusicCallbacks;
3639
+ }
3640
+
3641
+ /** A prompt that was filtered with the reason. */
3642
+ export declare interface LiveMusicFilteredPrompt {
3643
+ /** The text prompt that was filtered. */
3644
+ text?: string;
3645
+ /** The reason the prompt was filtered. */
3646
+ filteredReason?: string;
3647
+ }
3648
+
3649
+ /** Configuration for music generation. */
3650
+ export declare interface LiveMusicGenerationConfig {
3651
+ /** Controls the variance in audio generation. Higher values produce
3652
+ higher variance. Range is [0.0, 3.0]. */
3653
+ temperature?: number;
3654
+ /** Controls how the model selects tokens for output. Samples the topK
3655
+ tokens with the highest probabilities. Range is [1, 1000]. */
3656
+ topK?: number;
3657
+ /** Seeds audio generation. If not set, the request uses a randomly
3658
+ generated seed. */
3659
+ seed?: number;
3660
+ /** Controls how closely the model follows prompts.
3661
+ Higher guidance follows more closely, but will make transitions more
3662
+ abrupt. Range is [0.0, 6.0]. */
3663
+ guidance?: number;
3664
+ /** Beats per minute. Range is [60, 200]. */
3665
+ bpm?: number;
3666
+ /** Density of sounds. Range is [0.0, 1.0]. */
3667
+ density?: number;
3668
+ /** Brightness of the music. Range is [0.0, 1.0]. */
3669
+ brightness?: number;
3670
+ /** Scale of the generated music. */
3671
+ scale?: Scale;
3672
+ /** Whether the audio output should contain bass. */
3673
+ muteBass?: boolean;
3674
+ /** Whether the audio output should contain drums. */
3675
+ muteDrums?: boolean;
3676
+ /** Whether the audio output should contain only bass and drums. */
3677
+ onlyBassAndDrums?: boolean;
3678
+ /** The mode of music generation. Default mode is QUALITY. */
3679
+ musicGenerationMode?: MusicGenerationMode;
3680
+ }
3681
+
3682
+ /** The playback control signal to apply to the music generation. */
3683
+ export declare enum LiveMusicPlaybackControl {
3684
+ /**
3685
+ * This value is unused.
3686
+ */
3687
+ PLAYBACK_CONTROL_UNSPECIFIED = "PLAYBACK_CONTROL_UNSPECIFIED",
3688
+ /**
3689
+ * Start generating the music.
3690
+ */
3691
+ PLAY = "PLAY",
3692
+ /**
3693
+ * Hold the music generation. Use PLAY to resume from the current position.
3694
+ */
3695
+ PAUSE = "PAUSE",
3696
+ /**
3697
+ * Stop the music generation and reset the context (prompts retained).
3698
+ Use PLAY to restart the music generation.
3699
+ */
3700
+ STOP = "STOP",
3701
+ /**
3702
+ * Reset the context of the music generation without stopping it.
3703
+ Retains the current prompts and config.
3704
+ */
3705
+ RESET_CONTEXT = "RESET_CONTEXT"
3706
+ }
3707
+
3708
+ /** Server update generated by the model in response to client messages.
3709
+
3710
+ Content is generated as quickly as possible, and not in real time.
3711
+ Clients may choose to buffer and play it out in real time.
3712
+ */
3713
+ export declare interface LiveMusicServerContent {
3714
+ /** The audio chunks that the model has generated. */
3715
+ audioChunks?: AudioChunk[];
3716
+ }
3717
+
3718
+ /** Response message for the LiveMusicClientMessage call. */
3719
+ export declare class LiveMusicServerMessage {
3720
+ /** Message sent in response to a `LiveMusicClientSetup` message from the client.
3721
+ Clients should wait for this message before sending any additional messages. */
3722
+ setupComplete?: LiveMusicServerSetupComplete;
3723
+ /** Content generated by the model in response to client messages. */
3724
+ serverContent?: LiveMusicServerContent;
3725
+ /** A prompt that was filtered with the reason. */
3726
+ filteredPrompt?: LiveMusicFilteredPrompt;
3727
+ /**
3728
+ * Returns the first audio chunk from the server content, if present.
3729
+ *
3730
+ * @remarks
3731
+ * If there are no audio chunks in the response, undefined will be returned.
3732
+ */
3733
+ get audioChunk(): AudioChunk | undefined;
3734
+ }
3735
+
3736
+ /** Sent in response to a `LiveMusicClientSetup` message from the client. */
3737
+ export declare interface LiveMusicServerSetupComplete {
3738
+ }
3739
+
3740
+ /**
3741
+ Represents a connection to the API.
3742
+
3743
+ @experimental
3744
+ */
3745
+ export declare class LiveMusicSession {
3746
+ readonly conn: WebSocket_2;
3747
+ private readonly apiClient;
3748
+ constructor(conn: WebSocket_2, apiClient: ApiClient);
3749
+ /**
3750
+ Sets inputs to steer music generation. Updates the session's current
3751
+ weighted prompts.
3752
+
3753
+ @param params - Contains one property, `weightedPrompts`.
3754
+
3755
+ - `weightedPrompts` to send to the model; weights are normalized to
3756
+ sum to 1.0.
3757
+
3758
+ @experimental
3759
+ */
3760
+ setWeightedPrompts(params: types.LiveMusicSetWeightedPromptsParameters): Promise<void>;
3761
+ /**
3762
+ Sets a configuration to the model. Updates the session's current
3763
+ music generation config.
3764
+
3765
+ @param params - Contains one property, `musicGenerationConfig`.
3766
+
3767
+ - `musicGenerationConfig` to set in the model. Passing an empty or
3768
+ undefined config to the model will reset the config to defaults.
3769
+
3770
+ @experimental
3771
+ */
3772
+ setMusicGenerationConfig(params: types.LiveMusicSetConfigParameters): Promise<void>;
3773
+ private sendPlaybackControl;
3774
+ /**
3775
+ * Start the music stream.
3776
+ *
3777
+ * @experimental
3778
+ */
3779
+ play(): void;
3780
+ /**
3781
+ * Temporarily halt the music stream. Use `play` to resume from the current
3782
+ * position.
3783
+ *
3784
+ * @experimental
3785
+ */
3786
+ pause(): void;
3787
+ /**
3788
+ * Stop the music stream and reset the state. Retains the current prompts
3789
+ * and config.
3790
+ *
3791
+ * @experimental
3792
+ */
3793
+ stop(): void;
3794
+ /**
3795
+ * Resets the context of the music generation without stopping it.
3796
+ * Retains the current prompts and config.
3797
+ *
3798
+ * @experimental
3799
+ */
3800
+ resetContext(): void;
3801
+ /**
3802
+ Terminates the WebSocket connection.
3803
+
3804
+ @experimental
3805
+ */
3806
+ close(): void;
3807
+ }
3808
+
3809
+ /** Parameters for setting config for the live music API. */
3810
+ export declare interface LiveMusicSetConfigParameters {
3811
+ /** Configuration for music generation. */
3812
+ musicGenerationConfig: LiveMusicGenerationConfig;
3813
+ }
3814
+
3815
+ /** Parameters for setting weighted prompts for the live music API. */
3816
+ export declare interface LiveMusicSetWeightedPromptsParameters {
3817
+ /** A map of text prompts to weights to use for the generation request. */
3818
+ weightedPrompts: WeightedPrompt[];
3819
+ }
3820
+
3821
+ /** Prompts and config used for generating this audio chunk. */
3822
+ export declare interface LiveMusicSourceMetadata {
3823
+ /** Weighted prompts for generating this audio chunk. */
3824
+ clientContent?: LiveMusicClientContent;
3825
+ /** Music generation config for generating this audio chunk. */
3826
+ musicGenerationConfig?: LiveMusicGenerationConfig;
3827
+ }
3828
+
3829
+ /** Parameters for sending client content to the live API. */
3830
+ export declare interface LiveSendClientContentParameters {
3831
+ /** Client content to send to the session. */
3832
+ turns?: ContentListUnion;
3833
+ /** If true, indicates that the server content generation should start with
3834
+ the currently accumulated prompt. Otherwise, the server will await
3835
+ additional messages before starting generation. */
3836
+ turnComplete?: boolean;
3837
+ }
3838
+
3839
+ /** Parameters for sending realtime input to the live API. */
3840
+ export declare interface LiveSendRealtimeInputParameters {
3841
+ /** Realtime input to send to the session. */
3842
+ media?: BlobImageUnion;
3843
+ /** The realtime audio input stream. */
3844
+ audio?: Blob_2;
3845
+ /**
3116
3846
  Indicates that the audio stream has ended, e.g. because the microphone was
3117
3847
  turned off.
3118
3848
 
@@ -3170,6 +3900,8 @@ export declare interface LiveServerContent {
3170
3900
  model turn.
3171
3901
  */
3172
3902
  outputTranscription?: Transcription;
3903
+ /** Metadata related to url context retrieval tool. */
3904
+ urlContextMetadata?: UrlContextMetadata;
3173
3905
  }
3174
3906
 
3175
3907
  /** Server will not be able to service client soon. */
@@ -3319,29 +4051,83 @@ export declare enum MaskReferenceMode {
3319
4051
  MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
3320
4052
  }
3321
4053
 
4054
+ /**
4055
+ * Creates a McpCallableTool from MCP clients and an optional config.
4056
+ *
4057
+ * The callable tool can invoke the MCP clients with given function call
4058
+ * arguments. (often for automatic function calling).
4059
+ * Use the config to modify tool parameters such as behavior.
4060
+ *
4061
+ * @experimental Built-in MCP support is an experimental feature, may change in future
4062
+ * versions.
4063
+ */
4064
+ export declare function mcpToTool(...args: [...Client[], CallableToolConfig | Client]): CallableTool;
4065
+
3322
4066
  /** Server content modalities. */
3323
4067
  export declare enum MediaModality {
4068
+ /**
4069
+ * The modality is unspecified.
4070
+ */
3324
4071
  MODALITY_UNSPECIFIED = "MODALITY_UNSPECIFIED",
4072
+ /**
4073
+ * Plain text.
4074
+ */
3325
4075
  TEXT = "TEXT",
4076
+ /**
4077
+ * Images.
4078
+ */
3326
4079
  IMAGE = "IMAGE",
4080
+ /**
4081
+ * Video.
4082
+ */
3327
4083
  VIDEO = "VIDEO",
4084
+ /**
4085
+ * Audio.
4086
+ */
3328
4087
  AUDIO = "AUDIO",
4088
+ /**
4089
+ * Document, e.g. PDF.
4090
+ */
3329
4091
  DOCUMENT = "DOCUMENT"
3330
4092
  }
3331
4093
 
3332
4094
  /** The media resolution to use. */
3333
4095
  export declare enum MediaResolution {
4096
+ /**
4097
+ * Media resolution has not been set
4098
+ */
3334
4099
  MEDIA_RESOLUTION_UNSPECIFIED = "MEDIA_RESOLUTION_UNSPECIFIED",
4100
+ /**
4101
+ * Media resolution set to low (64 tokens).
4102
+ */
3335
4103
  MEDIA_RESOLUTION_LOW = "MEDIA_RESOLUTION_LOW",
4104
+ /**
4105
+ * Media resolution set to medium (256 tokens).
4106
+ */
3336
4107
  MEDIA_RESOLUTION_MEDIUM = "MEDIA_RESOLUTION_MEDIUM",
4108
+ /**
4109
+ * Media resolution set to high (zoomed reframing with 256 tokens).
4110
+ */
3337
4111
  MEDIA_RESOLUTION_HIGH = "MEDIA_RESOLUTION_HIGH"
3338
4112
  }
3339
4113
 
3340
4114
  /** Server content modalities. */
3341
4115
  export declare enum Modality {
4116
+ /**
4117
+ * The modality is unspecified.
4118
+ */
3342
4119
  MODALITY_UNSPECIFIED = "MODALITY_UNSPECIFIED",
4120
+ /**
4121
+ * Indicates the model should return text
4122
+ */
3343
4123
  TEXT = "TEXT",
4124
+ /**
4125
+ * Indicates the model should return images.
4126
+ */
3344
4127
  IMAGE = "IMAGE",
4128
+ /**
4129
+ * Indicates the model should return images.
4130
+ */
3345
4131
  AUDIO = "AUDIO"
3346
4132
  }
3347
4133
 
@@ -3355,7 +4141,13 @@ export declare interface ModalityTokenCount {
3355
4141
 
3356
4142
  /** The mode of the predictor to be used in dynamic retrieval. */
3357
4143
  export declare enum Mode {
4144
+ /**
4145
+ * Always trigger retrieval.
4146
+ */
3358
4147
  MODE_UNSPECIFIED = "MODE_UNSPECIFIED",
4148
+ /**
4149
+ * Run retrieval only when system decides it is necessary.
4150
+ */
3359
4151
  MODE_DYNAMIC = "MODE_DYNAMIC"
3360
4152
  }
3361
4153
 
@@ -3476,6 +4268,15 @@ export declare class Models extends BaseModule {
3476
4268
  * ```
3477
4269
  */
3478
4270
  generateContentStream: (params: types.GenerateContentParameters) => Promise<AsyncGenerator<types.GenerateContentResponse>>;
4271
+ /**
4272
+ * Transforms the CallableTools in the parameters to be simply Tools, it
4273
+ * copies the params into a new object and replaces the tools, it does not
4274
+ * modify the original params. Also sets the MCP usage header if there are
4275
+ * MCP tools in the parameters.
4276
+ */
4277
+ private processParamsForMcpUsage;
4278
+ private initAfcToolsMap;
4279
+ private processAfcStream;
3479
4280
  /**
3480
4281
  * Generates an image based on a text description and configuration.
3481
4282
  *
@@ -3693,6 +4494,30 @@ export declare interface ModelSelectionConfig {
3693
4494
  featureSelectionPreference?: FeatureSelectionPreference;
3694
4495
  }
3695
4496
 
4497
+ /** The configuration for the multi-speaker setup. */
4498
+ export declare interface MultiSpeakerVoiceConfig {
4499
+ /** The configuration for the speaker to use. */
4500
+ speakerVoiceConfigs?: SpeakerVoiceConfig[];
4501
+ }
4502
+
4503
+ /** The mode of music generation. */
4504
+ export declare enum MusicGenerationMode {
4505
+ /**
4506
+ * This value is unused.
4507
+ */
4508
+ MUSIC_GENERATION_MODE_UNSPECIFIED = "MUSIC_GENERATION_MODE_UNSPECIFIED",
4509
+ /**
4510
+ * Steer text prompts to regions of latent space with higher quality
4511
+ music.
4512
+ */
4513
+ QUALITY = "QUALITY",
4514
+ /**
4515
+ * Steer text prompts to regions of latent space with a larger diversity
4516
+ of music.
4517
+ */
4518
+ DIVERSITY = "DIVERSITY"
4519
+ }
4520
+
3696
4521
  /** A long-running operation. */
3697
4522
  export declare interface Operation {
3698
4523
  /** 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}`. */
@@ -3734,9 +4559,21 @@ export declare class Operations extends BaseModule {
3734
4559
  */
3735
4560
  /** Required. Outcome of the code execution. */
3736
4561
  export declare enum Outcome {
4562
+ /**
4563
+ * Unspecified status. This value should not be used.
4564
+ */
3737
4565
  OUTCOME_UNSPECIFIED = "OUTCOME_UNSPECIFIED",
4566
+ /**
4567
+ * Code execution completed successfully.
4568
+ */
3738
4569
  OUTCOME_OK = "OUTCOME_OK",
4570
+ /**
4571
+ * Code execution finished but with a failure. `stderr` should contain the reason.
4572
+ */
3739
4573
  OUTCOME_FAILED = "OUTCOME_FAILED",
4574
+ /**
4575
+ * Code execution ran for too long, and was cancelled. There may or may not be a partial output present.
4576
+ */
3740
4577
  OUTCOME_DEADLINE_EXCEEDED = "OUTCOME_DEADLINE_EXCEEDED"
3741
4578
  }
3742
4579
 
@@ -3917,11 +4754,18 @@ export declare enum PersonGeneration {
3917
4754
 
3918
4755
  /** The configuration for the prebuilt speaker to use. */
3919
4756
  export declare interface PrebuiltVoiceConfig {
3920
- /** The name of the prebuilt voice to use.
3921
- */
4757
+ /** The name of the prebuilt voice to use. */
3922
4758
  voiceName?: string;
3923
4759
  }
3924
4760
 
4761
+ /** Config for proactivity features. */
4762
+ export declare interface ProactivityConfig {
4763
+ /** If enabled, the model can reject responding to the last prompt. For
4764
+ example, this allows the model to ignore out of context speech or to stay
4765
+ silent if the user did not make a request, yet. */
4766
+ proactiveAudio?: boolean;
4767
+ }
4768
+
3925
4769
  /** Specifies the context retrieval config. */
3926
4770
  export declare interface RagRetrievalConfig {
3927
4771
  /** Optional. Config for filters. */
@@ -4102,6 +4946,62 @@ export declare interface SafetySetting {
4102
4946
  threshold?: HarmBlockThreshold;
4103
4947
  }
4104
4948
 
4949
+ /** Scale of the generated music. */
4950
+ export declare enum Scale {
4951
+ /**
4952
+ * Default value. This value is unused.
4953
+ */
4954
+ SCALE_UNSPECIFIED = "SCALE_UNSPECIFIED",
4955
+ /**
4956
+ * C major or A minor.
4957
+ */
4958
+ C_MAJOR_A_MINOR = "C_MAJOR_A_MINOR",
4959
+ /**
4960
+ * Db major or Bb minor.
4961
+ */
4962
+ D_FLAT_MAJOR_B_FLAT_MINOR = "D_FLAT_MAJOR_B_FLAT_MINOR",
4963
+ /**
4964
+ * D major or B minor.
4965
+ */
4966
+ D_MAJOR_B_MINOR = "D_MAJOR_B_MINOR",
4967
+ /**
4968
+ * Eb major or C minor
4969
+ */
4970
+ E_FLAT_MAJOR_C_MINOR = "E_FLAT_MAJOR_C_MINOR",
4971
+ /**
4972
+ * E major or Db minor.
4973
+ */
4974
+ E_MAJOR_D_FLAT_MINOR = "E_MAJOR_D_FLAT_MINOR",
4975
+ /**
4976
+ * F major or D minor.
4977
+ */
4978
+ F_MAJOR_D_MINOR = "F_MAJOR_D_MINOR",
4979
+ /**
4980
+ * Gb major or Eb minor.
4981
+ */
4982
+ G_FLAT_MAJOR_E_FLAT_MINOR = "G_FLAT_MAJOR_E_FLAT_MINOR",
4983
+ /**
4984
+ * G major or E minor.
4985
+ */
4986
+ G_MAJOR_E_MINOR = "G_MAJOR_E_MINOR",
4987
+ /**
4988
+ * Ab major or F minor.
4989
+ */
4990
+ A_FLAT_MAJOR_F_MINOR = "A_FLAT_MAJOR_F_MINOR",
4991
+ /**
4992
+ * A major or Gb minor.
4993
+ */
4994
+ A_MAJOR_G_FLAT_MINOR = "A_MAJOR_G_FLAT_MINOR",
4995
+ /**
4996
+ * Bb major or G minor.
4997
+ */
4998
+ B_FLAT_MAJOR_G_MINOR = "B_FLAT_MAJOR_G_MINOR",
4999
+ /**
5000
+ * B major or Ab minor.
5001
+ */
5002
+ B_MAJOR_A_FLAT_MINOR = "B_MAJOR_A_FLAT_MINOR"
5003
+ }
5004
+
4105
5005
  /** 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. */
4106
5006
  export declare interface Schema {
4107
5007
  /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */
@@ -4150,7 +5050,7 @@ export declare interface Schema {
4150
5050
  type?: Type;
4151
5051
  }
4152
5052
 
4153
- export declare type SchemaUnion = Schema;
5053
+ export declare type SchemaUnion = Schema | unknown;
4154
5054
 
4155
5055
  /** Google search entry point. */
4156
5056
  export declare interface SearchEntryPoint {
@@ -4366,11 +5266,24 @@ export declare interface SlidingWindow {
4366
5266
  targetTokens?: string;
4367
5267
  }
4368
5268
 
5269
+ /** The configuration for the speaker to use. */
5270
+ export declare interface SpeakerVoiceConfig {
5271
+ /** The name of the speaker to use. Should be the same as in the
5272
+ prompt. */
5273
+ speaker?: string;
5274
+ /** The configuration for the voice to use. */
5275
+ voiceConfig?: VoiceConfig;
5276
+ }
5277
+
4369
5278
  /** The speech generation configuration. */
4370
5279
  export declare interface SpeechConfig {
4371
5280
  /** The configuration for the speaker to use.
4372
5281
  */
4373
5282
  voiceConfig?: VoiceConfig;
5283
+ /** The configuration for the multi-speaker setup.
5284
+ It is mutually exclusive with the voice_config field.
5285
+ */
5286
+ multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
4374
5287
  /** Language code (ISO 639. e.g. en-US) for the speech synthesization.
4375
5288
  Only available for Live API.
4376
5289
  */
@@ -4381,8 +5294,17 @@ export declare type SpeechConfigUnion = SpeechConfig | string;
4381
5294
 
4382
5295
  /** Start of speech sensitivity. */
4383
5296
  export declare enum StartSensitivity {
5297
+ /**
5298
+ * The default is START_SENSITIVITY_LOW.
5299
+ */
4384
5300
  START_SENSITIVITY_UNSPECIFIED = "START_SENSITIVITY_UNSPECIFIED",
5301
+ /**
5302
+ * Automatic detection will detect the start of speech more often.
5303
+ */
4385
5304
  START_SENSITIVITY_HIGH = "START_SENSITIVITY_HIGH",
5305
+ /**
5306
+ * Automatic detection will detect the start of speech less often.
5307
+ */
4386
5308
  START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW"
4387
5309
  }
4388
5310
 
@@ -4577,6 +5499,8 @@ export declare interface TokensInfo {
4577
5499
 
4578
5500
  /** Tool details of a tool that the model may use to generate a response. */
4579
5501
  export declare interface Tool {
5502
+ /** List of function declarations that the tool supports. */
5503
+ functionDeclarations?: FunctionDeclaration[];
4580
5504
  /** 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. */
4581
5505
  retrieval?: Retrieval;
4582
5506
  /** Optional. Google Search tool type. Specialized retrieval tool
@@ -4590,10 +5514,10 @@ export declare interface Tool {
4590
5514
  /** Optional. Google Maps tool type. Specialized retrieval tool
4591
5515
  that is powered by Google Maps. */
4592
5516
  googleMaps?: GoogleMaps;
5517
+ /** Optional. Tool to support URL context retrieval. */
5518
+ urlContext?: UrlContext;
4593
5519
  /** 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. */
4594
5520
  codeExecution?: ToolCodeExecution;
4595
- /** 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. */
4596
- functionDeclarations?: FunctionDeclaration[];
4597
5521
  }
4598
5522
 
4599
5523
  /** 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. */
@@ -4611,12 +5535,23 @@ export declare interface ToolConfig {
4611
5535
  retrievalConfig?: RetrievalConfig;
4612
5536
  }
4613
5537
 
4614
- export declare type ToolListUnion = Tool[];
5538
+ export declare type ToolListUnion = ToolUnion[];
5539
+
5540
+ export declare type ToolUnion = Tool | CallableTool;
4615
5541
 
4616
5542
  /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */
4617
5543
  export declare enum TrafficType {
5544
+ /**
5545
+ * Unspecified request traffic type.
5546
+ */
4618
5547
  TRAFFIC_TYPE_UNSPECIFIED = "TRAFFIC_TYPE_UNSPECIFIED",
5548
+ /**
5549
+ * Type for Pay-As-You-Go traffic.
5550
+ */
4619
5551
  ON_DEMAND = "ON_DEMAND",
5552
+ /**
5553
+ * Type for Provisioned Throughput traffic.
5554
+ */
4620
5555
  PROVISIONED_THROUGHPUT = "PROVISIONED_THROUGHPUT"
4621
5556
  }
4622
5557
 
@@ -4779,19 +5714,49 @@ export declare interface TuningValidationDataset {
4779
5714
 
4780
5715
  /** Options about which input is included in the user's turn. */
4781
5716
  export declare enum TurnCoverage {
5717
+ /**
5718
+ * If unspecified, the default behavior is `TURN_INCLUDES_ONLY_ACTIVITY`.
5719
+ */
4782
5720
  TURN_COVERAGE_UNSPECIFIED = "TURN_COVERAGE_UNSPECIFIED",
5721
+ /**
5722
+ * The users turn only includes activity since the last turn, excluding inactivity (e.g. silence on the audio stream). This is the default behavior.
5723
+ */
4783
5724
  TURN_INCLUDES_ONLY_ACTIVITY = "TURN_INCLUDES_ONLY_ACTIVITY",
5725
+ /**
5726
+ * The users turn includes all realtime input since the last turn, including inactivity (e.g. silence on the audio stream).
5727
+ */
4784
5728
  TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT"
4785
5729
  }
4786
5730
 
4787
5731
  /** Optional. The type of the data. */
4788
5732
  export declare enum Type {
5733
+ /**
5734
+ * Not specified, should not be used.
5735
+ */
4789
5736
  TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
5737
+ /**
5738
+ * OpenAPI string type
5739
+ */
4790
5740
  STRING = "STRING",
5741
+ /**
5742
+ * OpenAPI number type
5743
+ */
4791
5744
  NUMBER = "NUMBER",
5745
+ /**
5746
+ * OpenAPI integer type
5747
+ */
4792
5748
  INTEGER = "INTEGER",
5749
+ /**
5750
+ * OpenAPI boolean type
5751
+ */
4793
5752
  BOOLEAN = "BOOLEAN",
5753
+ /**
5754
+ * OpenAPI array type
5755
+ */
4794
5756
  ARRAY = "ARRAY",
5757
+ /**
5758
+ * OpenAPI object type
5759
+ */
4795
5760
  OBJECT = "OBJECT"
4796
5761
  }
4797
5762
 
@@ -4811,9 +5776,9 @@ declare namespace types {
4811
5776
  HarmCategory,
4812
5777
  HarmBlockMethod,
4813
5778
  HarmBlockThreshold,
5779
+ Type,
4814
5780
  Mode,
4815
5781
  AuthType,
4816
- Type,
4817
5782
  FinishReason,
4818
5783
  HarmProbability,
4819
5784
  HarmSeverity,
@@ -4824,8 +5789,10 @@ declare namespace types {
4824
5789
  JobState,
4825
5790
  AdapterSize,
4826
5791
  FeatureSelectionPreference,
5792
+ Behavior,
4827
5793
  DynamicRetrievalConfigMode,
4828
5794
  FunctionCallingConfigMode,
5795
+ UrlRetrievalStatus,
4829
5796
  SafetyFilterLevel,
4830
5797
  PersonGeneration,
4831
5798
  ImagePromptLanguage,
@@ -4840,8 +5807,12 @@ declare namespace types {
4840
5807
  EndSensitivity,
4841
5808
  ActivityHandling,
4842
5809
  TurnCoverage,
4843
- Blob_2 as Blob,
5810
+ FunctionResponseScheduling,
5811
+ Scale,
5812
+ MusicGenerationMode,
5813
+ LiveMusicPlaybackControl,
4844
5814
  VideoMetadata,
5815
+ Blob_2 as Blob,
4845
5816
  CodeExecutionResult,
4846
5817
  ExecutableCode,
4847
5818
  FileData,
@@ -4852,6 +5823,9 @@ declare namespace types {
4852
5823
  HttpOptions,
4853
5824
  ModelSelectionConfig,
4854
5825
  SafetySetting,
5826
+ Schema,
5827
+ FunctionDeclaration,
5828
+ Interval,
4855
5829
  GoogleSearch,
4856
5830
  DynamicRetrievalConfig,
4857
5831
  GoogleSearchRetrieval,
@@ -4863,6 +5837,7 @@ declare namespace types {
4863
5837
  AuthConfigOidcConfig,
4864
5838
  AuthConfig,
4865
5839
  GoogleMaps,
5840
+ UrlContext,
4866
5841
  VertexAISearch,
4867
5842
  VertexRagStoreRagResource,
4868
5843
  RagRetrievalConfigFilter,
@@ -4874,8 +5849,6 @@ declare namespace types {
4874
5849
  VertexRagStore,
4875
5850
  Retrieval,
4876
5851
  ToolCodeExecution,
4877
- Schema,
4878
- FunctionDeclaration,
4879
5852
  Tool,
4880
5853
  FunctionCallingConfig,
4881
5854
  LatLng,
@@ -4883,7 +5856,10 @@ declare namespace types {
4883
5856
  ToolConfig,
4884
5857
  PrebuiltVoiceConfig,
4885
5858
  VoiceConfig,
5859
+ SpeakerVoiceConfig,
5860
+ MultiSpeakerVoiceConfig,
4886
5861
  SpeechConfig,
5862
+ AutomaticFunctionCallingConfig,
4887
5863
  ThinkingConfig,
4888
5864
  GenerationConfigRoutingConfigAutoRoutingMode,
4889
5865
  GenerationConfigRoutingConfigManualRoutingMode,
@@ -4893,6 +5869,8 @@ declare namespace types {
4893
5869
  GoogleTypeDate,
4894
5870
  Citation,
4895
5871
  CitationMetadata,
5872
+ UrlMetadata,
5873
+ UrlContextMetadata,
4896
5874
  GroundingChunkRetrievedContext,
4897
5875
  GroundingChunkWeb,
4898
5876
  GroundingChunk,
@@ -5011,7 +5989,6 @@ declare namespace types {
5011
5989
  CreateFileParameters,
5012
5990
  HttpResponse,
5013
5991
  LiveCallbacks,
5014
- UploadFileParameters,
5015
5992
  CreateFileResponse,
5016
5993
  GetFileConfig,
5017
5994
  GetFileParameters,
@@ -5053,6 +6030,7 @@ declare namespace types {
5053
6030
  SlidingWindow,
5054
6031
  ContextWindowCompressionConfig,
5055
6032
  AudioTranscriptionConfig,
6033
+ ProactivityConfig,
5056
6034
  LiveClientSetup,
5057
6035
  LiveClientContent,
5058
6036
  ActivityStart,
@@ -5067,6 +6045,26 @@ declare namespace types {
5067
6045
  SendMessageParameters,
5068
6046
  LiveSendClientContentParameters,
5069
6047
  LiveSendToolResponseParameters,
6048
+ LiveMusicClientSetup,
6049
+ WeightedPrompt,
6050
+ LiveMusicClientContent,
6051
+ LiveMusicGenerationConfig,
6052
+ LiveMusicClientMessage,
6053
+ LiveMusicServerSetupComplete,
6054
+ LiveMusicSourceMetadata,
6055
+ AudioChunk,
6056
+ LiveMusicServerContent,
6057
+ LiveMusicFilteredPrompt,
6058
+ LiveMusicServerMessage,
6059
+ LiveMusicCallbacks,
6060
+ UploadFileParameters,
6061
+ CallableTool,
6062
+ CallableToolConfig,
6063
+ LiveMusicConnectParameters,
6064
+ LiveMusicSetConfigParameters,
6065
+ LiveMusicSetWeightedPromptsParameters,
6066
+ LiveEphemeralParameters,
6067
+ CreateAuthTokenConfig,
5070
6068
  OperationGetParameters,
5071
6069
  BlobImageUnion,
5072
6070
  PartUnion,
@@ -5075,6 +6073,7 @@ declare namespace types {
5075
6073
  ContentListUnion,
5076
6074
  SchemaUnion,
5077
6075
  SpeechConfigUnion,
6076
+ ToolUnion,
5078
6077
  ToolListUnion,
5079
6078
  DownloadableFileUnion
5080
6079
  }
@@ -5221,6 +6220,40 @@ export declare class UpscaleImageResponse {
5221
6220
  generatedImages?: GeneratedImage[];
5222
6221
  }
5223
6222
 
6223
+ /** Tool to support URL context retrieval. */
6224
+ export declare interface UrlContext {
6225
+ }
6226
+
6227
+ /** Metadata related to url context retrieval tool. */
6228
+ export declare interface UrlContextMetadata {
6229
+ /** List of url context. */
6230
+ urlMetadata?: UrlMetadata[];
6231
+ }
6232
+
6233
+ /** Context for a single url retrieval. */
6234
+ export declare interface UrlMetadata {
6235
+ /** The URL retrieved by the tool. */
6236
+ retrievedUrl?: string;
6237
+ /** Status of the url retrieval. */
6238
+ urlRetrievalStatus?: UrlRetrievalStatus;
6239
+ }
6240
+
6241
+ /** Status of the url retrieval. */
6242
+ export declare enum UrlRetrievalStatus {
6243
+ /**
6244
+ * Default value. This value is unused
6245
+ */
6246
+ URL_RETRIEVAL_STATUS_UNSPECIFIED = "URL_RETRIEVAL_STATUS_UNSPECIFIED",
6247
+ /**
6248
+ * Url retrieval is successful.
6249
+ */
6250
+ URL_RETRIEVAL_STATUS_SUCCESS = "URL_RETRIEVAL_STATUS_SUCCESS",
6251
+ /**
6252
+ * Url retrieval is failed due to error.
6253
+ */
6254
+ URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR"
6255
+ }
6256
+
5224
6257
  /** Usage metadata about response(s). */
5225
6258
  export declare interface UsageMetadata {
5226
6259
  /** 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. */
@@ -5288,8 +6321,11 @@ export declare interface Video {
5288
6321
  mimeType?: string;
5289
6322
  }
5290
6323
 
5291
- /** Metadata describes the input video content. */
6324
+ /** Describes how the video in the Part should be used by the model. */
5292
6325
  export declare interface VideoMetadata {
6326
+ /** The frame rate of the video sent to the model. If not specified, the
6327
+ default value will be 1.0. The fps range is (0.0, 24.0]. */
6328
+ fps?: number;
5293
6329
  /** Optional. The end offset of the video. */
5294
6330
  endOffset?: string;
5295
6331
  /** Optional. The start offset of the video. */
@@ -5337,4 +6373,17 @@ declare interface WebSocketFactory {
5337
6373
  create(url: string, headers: Record<string, string>, callbacks: WebSocketCallbacks): WebSocket_2;
5338
6374
  }
5339
6375
 
6376
+ /** Maps a prompt to a relative weight to steer music generation. */
6377
+ export declare interface WeightedPrompt {
6378
+ /** Text prompt. */
6379
+ text?: string;
6380
+ /** Weight of the prompt. The weight is used to control the relative
6381
+ importance of the prompt. Higher weights are more important than lower
6382
+ weights.
6383
+
6384
+ Weight must not be 0. Weights of all weighted_prompts in this
6385
+ LiveMusicClientContent message will be normalized. */
6386
+ weight?: number;
6387
+ }
6388
+
5340
6389
  export { }