@google/genai 1.24.0 → 1.26.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.
@@ -467,7 +467,6 @@ export declare class Batches extends BaseModule {
467
467
  */
468
468
  list: (params?: types.ListBatchJobsParameters) => Promise<Pager<types.BatchJob>>;
469
469
  private createInlinedGenerateContentRequest;
470
- private createInlinedEmbedContentRequest;
471
470
  private getGcsUri;
472
471
  private getBigqueryUri;
473
472
  private formatDestination;
@@ -647,32 +646,40 @@ export { Blob_2 as Blob }
647
646
 
648
647
  export declare type BlobImageUnion = Blob_2;
649
648
 
650
- /** Output only. Blocked reason. */
649
+ /** Output only. The reason why the prompt was blocked. */
651
650
  export declare enum BlockedReason {
652
651
  /**
653
- * Unspecified blocked reason.
652
+ * The blocked reason is unspecified.
654
653
  */
655
654
  BLOCKED_REASON_UNSPECIFIED = "BLOCKED_REASON_UNSPECIFIED",
656
655
  /**
657
- * Candidates blocked due to safety.
656
+ * The prompt was blocked for safety reasons.
658
657
  */
659
658
  SAFETY = "SAFETY",
660
659
  /**
661
- * Candidates blocked due to other reason.
660
+ * The prompt was blocked for other reasons. For example, it may be due to the prompt's language, or because it contains other harmful content.
662
661
  */
663
662
  OTHER = "OTHER",
664
663
  /**
665
- * Candidates blocked due to the terms which are included from the terminology blocklist.
664
+ * The prompt was blocked because it contains a term from the terminology blocklist.
666
665
  */
667
666
  BLOCKLIST = "BLOCKLIST",
668
667
  /**
669
- * Candidates blocked due to prohibited content.
668
+ * The prompt was blocked because it contains prohibited content.
670
669
  */
671
670
  PROHIBITED_CONTENT = "PROHIBITED_CONTENT",
672
671
  /**
673
- * Candidates blocked due to unsafe image generation content.
672
+ * The prompt was blocked because it contains content that is unsafe for image generation.
674
673
  */
675
- IMAGE_SAFETY = "IMAGE_SAFETY"
674
+ IMAGE_SAFETY = "IMAGE_SAFETY",
675
+ /**
676
+ * The prompt was blocked by Model Armor.
677
+ */
678
+ MODEL_ARMOR = "MODEL_ARMOR",
679
+ /**
680
+ * The prompt was blocked as a jailbreak attempt.
681
+ */
682
+ JAILBREAK = "JAILBREAK"
676
683
  }
677
684
 
678
685
  /** A resource used in LLM queries for users to explicitly specify what to cache. */
@@ -2840,13 +2847,13 @@ export declare class GenerateContentResponse {
2840
2847
  get codeExecutionResult(): string | undefined;
2841
2848
  }
2842
2849
 
2843
- /** Content filter results for a prompt sent in the request. */
2850
+ /** Content filter results for a prompt sent in the request. Note: This is sent only in the first stream chunk and only if no candidates were generated due to content violations. */
2844
2851
  export declare class GenerateContentResponsePromptFeedback {
2845
- /** Output only. Blocked reason. */
2852
+ /** Output only. The reason why the prompt was blocked. */
2846
2853
  blockReason?: BlockedReason;
2847
- /** Output only. A readable block reason message. */
2854
+ /** Output only. A readable message that explains the reason why the prompt was blocked. */
2848
2855
  blockReasonMessage?: string;
2849
- /** Output only. Safety ratings. */
2856
+ /** Output only. A list of safety ratings for the prompt. There is one rating per category. */
2850
2857
  safetyRatings?: SafetyRating[];
2851
2858
  }
2852
2859
 
@@ -3147,11 +3154,13 @@ export declare interface GenerationConfig {
3147
3154
  /** Optional. Controls the randomness of predictions. */
3148
3155
  temperature?: number;
3149
3156
  /** Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking. */
3150
- thinkingConfig?: GenerationConfigThinkingConfig;
3157
+ thinkingConfig?: ThinkingConfig;
3151
3158
  /** Optional. If specified, top-k sampling will be used. */
3152
3159
  topK?: number;
3153
3160
  /** Optional. If specified, nucleus sampling will be used. */
3154
3161
  topP?: number;
3162
+ /** Optional. Enables enhanced civic answers. It may not be available for all models. */
3163
+ enableEnhancedCivicAnswers?: boolean;
3155
3164
  }
3156
3165
 
3157
3166
  /** The configuration for routing the request to a specific model. */
@@ -3174,12 +3183,12 @@ export declare interface GenerationConfigRoutingConfigManualRoutingMode {
3174
3183
  modelName?: string;
3175
3184
  }
3176
3185
 
3177
- /** Config for thinking features. */
3178
- export declare interface GenerationConfigThinkingConfig {
3179
- /** Optional. Indicates whether to include thoughts in the response. If true, thoughts are returned only when available. */
3180
- includeThoughts?: boolean;
3181
- /** Optional. Indicates the thinking budget in tokens. */
3182
- thinkingBudget?: number;
3186
+ /**
3187
+ * Config for thinking feature.
3188
+ *
3189
+ * @deprecated This interface will be deprecated. Please use `ThinkingConfig` instead.
3190
+ */
3191
+ export declare interface GenerationConfigThinkingConfig extends ThinkingConfig {
3183
3192
  }
3184
3193
 
3185
3194
  /** Optional parameters. */
@@ -3455,8 +3464,7 @@ export declare interface GoogleSearch {
3455
3464
  If customers set a start time, they must set an end time (and vice versa).
3456
3465
  */
3457
3466
  timeRangeFilter?: Interval;
3458
- /** Optional. List of domains to be excluded from the search results.
3459
- The default limit is 2000 domains. */
3467
+ /** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: ["amazon.com", "facebook.com"]. */
3460
3468
  excludeDomains?: string[];
3461
3469
  }
3462
3470
 
@@ -3648,22 +3656,22 @@ export declare enum HarmCategory {
3648
3656
  * The harm category is unspecified.
3649
3657
  */
3650
3658
  HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED",
3651
- /**
3652
- * The harm category is hate speech.
3653
- */
3654
- HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
3655
- /**
3656
- * The harm category is dangerous content.
3657
- */
3658
- HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
3659
3659
  /**
3660
3660
  * The harm category is harassment.
3661
3661
  */
3662
3662
  HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT",
3663
+ /**
3664
+ * The harm category is hate speech.
3665
+ */
3666
+ HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
3663
3667
  /**
3664
3668
  * The harm category is sexually explicit content.
3665
3669
  */
3666
3670
  HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT",
3671
+ /**
3672
+ * The harm category is dangerous content.
3673
+ */
3674
+ HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
3667
3675
  /**
3668
3676
  * Deprecated: Election filter is not longer supported. The harm category is civic integrity.
3669
3677
  */
@@ -3683,7 +3691,11 @@ export declare enum HarmCategory {
3683
3691
  /**
3684
3692
  * The harm category is image sexually explicit content.
3685
3693
  */
3686
- HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"
3694
+ HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT",
3695
+ /**
3696
+ * The harm category is for jailbreak prompts.
3697
+ */
3698
+ HARM_CATEGORY_JAILBREAK = "HARM_CATEGORY_JAILBREAK"
3687
3699
  }
3688
3700
 
3689
3701
  /** Output only. Harm probability levels in the content. */
@@ -4089,9 +4101,9 @@ export declare interface ListFilesParameters {
4089
4101
  export declare class ListFilesResponse {
4090
4102
  /** Used to retain the full HTTP response. */
4091
4103
  sdkHttpResponse?: HttpResponse;
4092
- /** A token to retrieve next page of results. */
4104
+ /** A token that can be sent as a `page_token` into a subsequent `ListFiles` call. */
4093
4105
  nextPageToken?: string;
4094
- /** The list of files. */
4106
+ /** The list of `File`s. */
4095
4107
  files?: File_2[];
4096
4108
  }
4097
4109
 
@@ -6918,10 +6930,18 @@ export declare interface Transcription {
6918
6930
  finished?: boolean;
6919
6931
  }
6920
6932
 
6933
+ /** TunedModel for the Tuned Model of a Tuning Job. */
6921
6934
  export declare interface TunedModel {
6922
- /** Output only. The resource name of the TunedModel. Format: `projects/{project}/locations/{location}/models/{model}@{version_id}` When tuning from a base model, the version_id will be 1. For continuous tuning, the version id will be incremented by 1 from the last version id in the parent model. E.g., `projects/{project}/locations/{location}/models/{model}@{last_version_id + 1}` */
6935
+ /** Output only. The resource name of the TunedModel.
6936
+ Format: `projects/{project}/locations/{location}/models/{model}@{version_id}`
6937
+ When tuning from a base model, the version_id will be 1.
6938
+ For continuous tuning, the version id will be incremented by 1 from the
6939
+ last version id in the parent model. E.g., `projects/{project}/locations/{location}/models/{model}@{last_version_id + 1}`
6940
+ */
6923
6941
  model?: string;
6924
- /** Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. */
6942
+ /** Output only. A resource name of an Endpoint.
6943
+ Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
6944
+ */
6925
6945
  endpoint?: string;
6926
6946
  /** The checkpoints associated with this TunedModel.
6927
6947
  This field is only populated for tuning jobs that enable intermediate
@@ -6976,11 +6996,12 @@ export declare interface TuningDataStats {
6976
6996
  supervisedTuningDataStats?: SupervisedTuningDataStats;
6977
6997
  }
6978
6998
 
6999
+ /** A single example for tuning. */
6979
7000
  export declare interface TuningExample {
6980
- /** Text model input. */
6981
- textInput?: string;
6982
- /** The expected model output. */
7001
+ /** Required. The expected model output. */
6983
7002
  output?: string;
7003
+ /** Optional. Text model input. */
7004
+ textInput?: string;
6984
7005
  }
6985
7006
 
6986
7007
  /** A tuning job. */
@@ -7226,6 +7247,7 @@ declare namespace types {
7226
7247
  createModelContent,
7227
7248
  Outcome,
7228
7249
  Language,
7250
+ FunctionResponseScheduling,
7229
7251
  Type,
7230
7252
  HarmCategory,
7231
7253
  HarmBlockMethod,
@@ -7269,7 +7291,6 @@ declare namespace types {
7269
7291
  EndSensitivity,
7270
7292
  ActivityHandling,
7271
7293
  TurnCoverage,
7272
- FunctionResponseScheduling,
7273
7294
  Scale,
7274
7295
  MusicGenerationMode,
7275
7296
  LiveMusicPlaybackControl,
@@ -7417,7 +7438,6 @@ declare namespace types {
7417
7438
  DeleteModelConfig,
7418
7439
  DeleteModelParameters,
7419
7440
  DeleteModelResponse,
7420
- GenerationConfigThinkingConfig,
7421
7441
  GenerationConfig,
7422
7442
  CountTokensConfig,
7423
7443
  CountTokensParameters,
@@ -7553,6 +7573,7 @@ declare namespace types {
7553
7573
  LiveServerSessionResumptionUpdate,
7554
7574
  LiveServerMessage,
7555
7575
  OperationFromAPIResponseParameters,
7576
+ GenerationConfigThinkingConfig,
7556
7577
  AutomaticActivityDetection,
7557
7578
  RealtimeInputConfig,
7558
7579
  SessionResumptionConfig,