@google/genai 1.25.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.
- package/dist/genai.d.ts +61 -39
- package/dist/index.cjs +57 -77
- package/dist/index.mjs +57 -77
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +59 -79
- package/dist/node/index.mjs +59 -79
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +61 -39
- package/dist/web/index.mjs +57 -77
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +61 -39
- package/package.json +8 -3
package/dist/genai.d.ts
CHANGED
|
@@ -646,32 +646,40 @@ export { Blob_2 as Blob }
|
|
|
646
646
|
|
|
647
647
|
export declare type BlobImageUnion = Blob_2;
|
|
648
648
|
|
|
649
|
-
/** Output only.
|
|
649
|
+
/** Output only. The reason why the prompt was blocked. */
|
|
650
650
|
export declare enum BlockedReason {
|
|
651
651
|
/**
|
|
652
|
-
*
|
|
652
|
+
* The blocked reason is unspecified.
|
|
653
653
|
*/
|
|
654
654
|
BLOCKED_REASON_UNSPECIFIED = "BLOCKED_REASON_UNSPECIFIED",
|
|
655
655
|
/**
|
|
656
|
-
*
|
|
656
|
+
* The prompt was blocked for safety reasons.
|
|
657
657
|
*/
|
|
658
658
|
SAFETY = "SAFETY",
|
|
659
659
|
/**
|
|
660
|
-
*
|
|
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.
|
|
661
661
|
*/
|
|
662
662
|
OTHER = "OTHER",
|
|
663
663
|
/**
|
|
664
|
-
*
|
|
664
|
+
* The prompt was blocked because it contains a term from the terminology blocklist.
|
|
665
665
|
*/
|
|
666
666
|
BLOCKLIST = "BLOCKLIST",
|
|
667
667
|
/**
|
|
668
|
-
*
|
|
668
|
+
* The prompt was blocked because it contains prohibited content.
|
|
669
669
|
*/
|
|
670
670
|
PROHIBITED_CONTENT = "PROHIBITED_CONTENT",
|
|
671
671
|
/**
|
|
672
|
-
*
|
|
672
|
+
* The prompt was blocked because it contains content that is unsafe for image generation.
|
|
673
673
|
*/
|
|
674
|
-
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"
|
|
675
683
|
}
|
|
676
684
|
|
|
677
685
|
/** A resource used in LLM queries for users to explicitly specify what to cache. */
|
|
@@ -2839,13 +2847,13 @@ export declare class GenerateContentResponse {
|
|
|
2839
2847
|
get codeExecutionResult(): string | undefined;
|
|
2840
2848
|
}
|
|
2841
2849
|
|
|
2842
|
-
/** 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. */
|
|
2843
2851
|
export declare class GenerateContentResponsePromptFeedback {
|
|
2844
|
-
/** Output only.
|
|
2852
|
+
/** Output only. The reason why the prompt was blocked. */
|
|
2845
2853
|
blockReason?: BlockedReason;
|
|
2846
|
-
/** Output only. A readable
|
|
2854
|
+
/** Output only. A readable message that explains the reason why the prompt was blocked. */
|
|
2847
2855
|
blockReasonMessage?: string;
|
|
2848
|
-
/** Output only.
|
|
2856
|
+
/** Output only. A list of safety ratings for the prompt. There is one rating per category. */
|
|
2849
2857
|
safetyRatings?: SafetyRating[];
|
|
2850
2858
|
}
|
|
2851
2859
|
|
|
@@ -3146,11 +3154,13 @@ export declare interface GenerationConfig {
|
|
|
3146
3154
|
/** Optional. Controls the randomness of predictions. */
|
|
3147
3155
|
temperature?: number;
|
|
3148
3156
|
/** Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking. */
|
|
3149
|
-
thinkingConfig?:
|
|
3157
|
+
thinkingConfig?: ThinkingConfig;
|
|
3150
3158
|
/** Optional. If specified, top-k sampling will be used. */
|
|
3151
3159
|
topK?: number;
|
|
3152
3160
|
/** Optional. If specified, nucleus sampling will be used. */
|
|
3153
3161
|
topP?: number;
|
|
3162
|
+
/** Optional. Enables enhanced civic answers. It may not be available for all models. */
|
|
3163
|
+
enableEnhancedCivicAnswers?: boolean;
|
|
3154
3164
|
}
|
|
3155
3165
|
|
|
3156
3166
|
/** The configuration for routing the request to a specific model. */
|
|
@@ -3173,12 +3183,12 @@ export declare interface GenerationConfigRoutingConfigManualRoutingMode {
|
|
|
3173
3183
|
modelName?: string;
|
|
3174
3184
|
}
|
|
3175
3185
|
|
|
3176
|
-
/**
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
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 {
|
|
3182
3192
|
}
|
|
3183
3193
|
|
|
3184
3194
|
/** Optional parameters. */
|
|
@@ -3442,8 +3452,7 @@ export declare interface GoogleSearch {
|
|
|
3442
3452
|
If customers set a start time, they must set an end time (and vice versa).
|
|
3443
3453
|
*/
|
|
3444
3454
|
timeRangeFilter?: Interval;
|
|
3445
|
-
/** Optional. List of domains to be excluded from the search results.
|
|
3446
|
-
The default limit is 2000 domains. */
|
|
3455
|
+
/** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: ["amazon.com", "facebook.com"]. */
|
|
3447
3456
|
excludeDomains?: string[];
|
|
3448
3457
|
}
|
|
3449
3458
|
|
|
@@ -3635,22 +3644,22 @@ export declare enum HarmCategory {
|
|
|
3635
3644
|
* The harm category is unspecified.
|
|
3636
3645
|
*/
|
|
3637
3646
|
HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED",
|
|
3638
|
-
/**
|
|
3639
|
-
* The harm category is hate speech.
|
|
3640
|
-
*/
|
|
3641
|
-
HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
|
|
3642
|
-
/**
|
|
3643
|
-
* The harm category is dangerous content.
|
|
3644
|
-
*/
|
|
3645
|
-
HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
|
|
3646
3647
|
/**
|
|
3647
3648
|
* The harm category is harassment.
|
|
3648
3649
|
*/
|
|
3649
3650
|
HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT",
|
|
3651
|
+
/**
|
|
3652
|
+
* The harm category is hate speech.
|
|
3653
|
+
*/
|
|
3654
|
+
HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
|
|
3650
3655
|
/**
|
|
3651
3656
|
* The harm category is sexually explicit content.
|
|
3652
3657
|
*/
|
|
3653
3658
|
HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
|
3659
|
+
/**
|
|
3660
|
+
* The harm category is dangerous content.
|
|
3661
|
+
*/
|
|
3662
|
+
HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
|
|
3654
3663
|
/**
|
|
3655
3664
|
* Deprecated: Election filter is not longer supported. The harm category is civic integrity.
|
|
3656
3665
|
*/
|
|
@@ -3670,7 +3679,11 @@ export declare enum HarmCategory {
|
|
|
3670
3679
|
/**
|
|
3671
3680
|
* The harm category is image sexually explicit content.
|
|
3672
3681
|
*/
|
|
3673
|
-
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"
|
|
3682
|
+
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT",
|
|
3683
|
+
/**
|
|
3684
|
+
* The harm category is for jailbreak prompts.
|
|
3685
|
+
*/
|
|
3686
|
+
HARM_CATEGORY_JAILBREAK = "HARM_CATEGORY_JAILBREAK"
|
|
3674
3687
|
}
|
|
3675
3688
|
|
|
3676
3689
|
/** Output only. Harm probability levels in the content. */
|
|
@@ -4076,9 +4089,9 @@ export declare interface ListFilesParameters {
|
|
|
4076
4089
|
export declare class ListFilesResponse {
|
|
4077
4090
|
/** Used to retain the full HTTP response. */
|
|
4078
4091
|
sdkHttpResponse?: HttpResponse;
|
|
4079
|
-
/** A token
|
|
4092
|
+
/** A token that can be sent as a `page_token` into a subsequent `ListFiles` call. */
|
|
4080
4093
|
nextPageToken?: string;
|
|
4081
|
-
/** The list of
|
|
4094
|
+
/** The list of `File`s. */
|
|
4082
4095
|
files?: File_2[];
|
|
4083
4096
|
}
|
|
4084
4097
|
|
|
@@ -6905,10 +6918,18 @@ export declare interface Transcription {
|
|
|
6905
6918
|
finished?: boolean;
|
|
6906
6919
|
}
|
|
6907
6920
|
|
|
6921
|
+
/** TunedModel for the Tuned Model of a Tuning Job. */
|
|
6908
6922
|
export declare interface TunedModel {
|
|
6909
|
-
/** Output only. The resource name of the TunedModel.
|
|
6923
|
+
/** Output only. The resource name of the TunedModel.
|
|
6924
|
+
Format: `projects/{project}/locations/{location}/models/{model}@{version_id}`
|
|
6925
|
+
When tuning from a base model, the version_id will be 1.
|
|
6926
|
+
For continuous tuning, the version id will be incremented by 1 from the
|
|
6927
|
+
last version id in the parent model. E.g., `projects/{project}/locations/{location}/models/{model}@{last_version_id + 1}`
|
|
6928
|
+
*/
|
|
6910
6929
|
model?: string;
|
|
6911
|
-
/** Output only. A resource name of an Endpoint.
|
|
6930
|
+
/** Output only. A resource name of an Endpoint.
|
|
6931
|
+
Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
|
|
6932
|
+
*/
|
|
6912
6933
|
endpoint?: string;
|
|
6913
6934
|
/** The checkpoints associated with this TunedModel.
|
|
6914
6935
|
This field is only populated for tuning jobs that enable intermediate
|
|
@@ -6963,11 +6984,12 @@ export declare interface TuningDataStats {
|
|
|
6963
6984
|
supervisedTuningDataStats?: SupervisedTuningDataStats;
|
|
6964
6985
|
}
|
|
6965
6986
|
|
|
6987
|
+
/** A single example for tuning. */
|
|
6966
6988
|
export declare interface TuningExample {
|
|
6967
|
-
/**
|
|
6968
|
-
textInput?: string;
|
|
6969
|
-
/** The expected model output. */
|
|
6989
|
+
/** Required. The expected model output. */
|
|
6970
6990
|
output?: string;
|
|
6991
|
+
/** Optional. Text model input. */
|
|
6992
|
+
textInput?: string;
|
|
6971
6993
|
}
|
|
6972
6994
|
|
|
6973
6995
|
/** A tuning job. */
|
|
@@ -7213,6 +7235,7 @@ declare namespace types {
|
|
|
7213
7235
|
createModelContent,
|
|
7214
7236
|
Outcome,
|
|
7215
7237
|
Language,
|
|
7238
|
+
FunctionResponseScheduling,
|
|
7216
7239
|
Type,
|
|
7217
7240
|
HarmCategory,
|
|
7218
7241
|
HarmBlockMethod,
|
|
@@ -7256,7 +7279,6 @@ declare namespace types {
|
|
|
7256
7279
|
EndSensitivity,
|
|
7257
7280
|
ActivityHandling,
|
|
7258
7281
|
TurnCoverage,
|
|
7259
|
-
FunctionResponseScheduling,
|
|
7260
7282
|
Scale,
|
|
7261
7283
|
MusicGenerationMode,
|
|
7262
7284
|
LiveMusicPlaybackControl,
|
|
@@ -7404,7 +7426,6 @@ declare namespace types {
|
|
|
7404
7426
|
DeleteModelConfig,
|
|
7405
7427
|
DeleteModelParameters,
|
|
7406
7428
|
DeleteModelResponse,
|
|
7407
|
-
GenerationConfigThinkingConfig,
|
|
7408
7429
|
GenerationConfig,
|
|
7409
7430
|
CountTokensConfig,
|
|
7410
7431
|
CountTokensParameters,
|
|
@@ -7540,6 +7561,7 @@ declare namespace types {
|
|
|
7540
7561
|
LiveServerSessionResumptionUpdate,
|
|
7541
7562
|
LiveServerMessage,
|
|
7542
7563
|
OperationFromAPIResponseParameters,
|
|
7564
|
+
GenerationConfigThinkingConfig,
|
|
7543
7565
|
AutomaticActivityDetection,
|
|
7544
7566
|
RealtimeInputConfig,
|
|
7545
7567
|
SessionResumptionConfig,
|
package/dist/index.cjs
CHANGED
|
@@ -504,6 +504,26 @@ exports.Language = void 0;
|
|
|
504
504
|
*/
|
|
505
505
|
Language["PYTHON"] = "PYTHON";
|
|
506
506
|
})(exports.Language || (exports.Language = {}));
|
|
507
|
+
/** Specifies how the response should be scheduled in the conversation. */
|
|
508
|
+
exports.FunctionResponseScheduling = void 0;
|
|
509
|
+
(function (FunctionResponseScheduling) {
|
|
510
|
+
/**
|
|
511
|
+
* This value is unused.
|
|
512
|
+
*/
|
|
513
|
+
FunctionResponseScheduling["SCHEDULING_UNSPECIFIED"] = "SCHEDULING_UNSPECIFIED";
|
|
514
|
+
/**
|
|
515
|
+
* Only add the result to the conversation context, do not interrupt or trigger generation.
|
|
516
|
+
*/
|
|
517
|
+
FunctionResponseScheduling["SILENT"] = "SILENT";
|
|
518
|
+
/**
|
|
519
|
+
* Add the result to the conversation context, and prompt to generate output without interrupting ongoing generation.
|
|
520
|
+
*/
|
|
521
|
+
FunctionResponseScheduling["WHEN_IDLE"] = "WHEN_IDLE";
|
|
522
|
+
/**
|
|
523
|
+
* Add the result to the conversation context, interrupt ongoing generation and prompt to generate output.
|
|
524
|
+
*/
|
|
525
|
+
FunctionResponseScheduling["INTERRUPT"] = "INTERRUPT";
|
|
526
|
+
})(exports.FunctionResponseScheduling || (exports.FunctionResponseScheduling = {}));
|
|
507
527
|
/** Optional. The type of the data. */
|
|
508
528
|
exports.Type = void 0;
|
|
509
529
|
(function (Type) {
|
|
@@ -547,22 +567,22 @@ exports.HarmCategory = void 0;
|
|
|
547
567
|
* The harm category is unspecified.
|
|
548
568
|
*/
|
|
549
569
|
HarmCategory["HARM_CATEGORY_UNSPECIFIED"] = "HARM_CATEGORY_UNSPECIFIED";
|
|
550
|
-
/**
|
|
551
|
-
* The harm category is hate speech.
|
|
552
|
-
*/
|
|
553
|
-
HarmCategory["HARM_CATEGORY_HATE_SPEECH"] = "HARM_CATEGORY_HATE_SPEECH";
|
|
554
|
-
/**
|
|
555
|
-
* The harm category is dangerous content.
|
|
556
|
-
*/
|
|
557
|
-
HarmCategory["HARM_CATEGORY_DANGEROUS_CONTENT"] = "HARM_CATEGORY_DANGEROUS_CONTENT";
|
|
558
570
|
/**
|
|
559
571
|
* The harm category is harassment.
|
|
560
572
|
*/
|
|
561
573
|
HarmCategory["HARM_CATEGORY_HARASSMENT"] = "HARM_CATEGORY_HARASSMENT";
|
|
574
|
+
/**
|
|
575
|
+
* The harm category is hate speech.
|
|
576
|
+
*/
|
|
577
|
+
HarmCategory["HARM_CATEGORY_HATE_SPEECH"] = "HARM_CATEGORY_HATE_SPEECH";
|
|
562
578
|
/**
|
|
563
579
|
* The harm category is sexually explicit content.
|
|
564
580
|
*/
|
|
565
581
|
HarmCategory["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
|
|
582
|
+
/**
|
|
583
|
+
* The harm category is dangerous content.
|
|
584
|
+
*/
|
|
585
|
+
HarmCategory["HARM_CATEGORY_DANGEROUS_CONTENT"] = "HARM_CATEGORY_DANGEROUS_CONTENT";
|
|
566
586
|
/**
|
|
567
587
|
* Deprecated: Election filter is not longer supported. The harm category is civic integrity.
|
|
568
588
|
*/
|
|
@@ -583,6 +603,10 @@ exports.HarmCategory = void 0;
|
|
|
583
603
|
* The harm category is image sexually explicit content.
|
|
584
604
|
*/
|
|
585
605
|
HarmCategory["HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT";
|
|
606
|
+
/**
|
|
607
|
+
* The harm category is for jailbreak prompts.
|
|
608
|
+
*/
|
|
609
|
+
HarmCategory["HARM_CATEGORY_JAILBREAK"] = "HARM_CATEGORY_JAILBREAK";
|
|
586
610
|
})(exports.HarmCategory || (exports.HarmCategory = {}));
|
|
587
611
|
/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */
|
|
588
612
|
exports.HarmBlockMethod = void 0;
|
|
@@ -823,33 +847,41 @@ exports.HarmSeverity = void 0;
|
|
|
823
847
|
*/
|
|
824
848
|
HarmSeverity["HARM_SEVERITY_HIGH"] = "HARM_SEVERITY_HIGH";
|
|
825
849
|
})(exports.HarmSeverity || (exports.HarmSeverity = {}));
|
|
826
|
-
/** Output only.
|
|
850
|
+
/** Output only. The reason why the prompt was blocked. */
|
|
827
851
|
exports.BlockedReason = void 0;
|
|
828
852
|
(function (BlockedReason) {
|
|
829
853
|
/**
|
|
830
|
-
*
|
|
854
|
+
* The blocked reason is unspecified.
|
|
831
855
|
*/
|
|
832
856
|
BlockedReason["BLOCKED_REASON_UNSPECIFIED"] = "BLOCKED_REASON_UNSPECIFIED";
|
|
833
857
|
/**
|
|
834
|
-
*
|
|
858
|
+
* The prompt was blocked for safety reasons.
|
|
835
859
|
*/
|
|
836
860
|
BlockedReason["SAFETY"] = "SAFETY";
|
|
837
861
|
/**
|
|
838
|
-
*
|
|
862
|
+
* 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.
|
|
839
863
|
*/
|
|
840
864
|
BlockedReason["OTHER"] = "OTHER";
|
|
841
865
|
/**
|
|
842
|
-
*
|
|
866
|
+
* The prompt was blocked because it contains a term from the terminology blocklist.
|
|
843
867
|
*/
|
|
844
868
|
BlockedReason["BLOCKLIST"] = "BLOCKLIST";
|
|
845
869
|
/**
|
|
846
|
-
*
|
|
870
|
+
* The prompt was blocked because it contains prohibited content.
|
|
847
871
|
*/
|
|
848
872
|
BlockedReason["PROHIBITED_CONTENT"] = "PROHIBITED_CONTENT";
|
|
849
873
|
/**
|
|
850
|
-
*
|
|
874
|
+
* The prompt was blocked because it contains content that is unsafe for image generation.
|
|
851
875
|
*/
|
|
852
876
|
BlockedReason["IMAGE_SAFETY"] = "IMAGE_SAFETY";
|
|
877
|
+
/**
|
|
878
|
+
* The prompt was blocked by Model Armor.
|
|
879
|
+
*/
|
|
880
|
+
BlockedReason["MODEL_ARMOR"] = "MODEL_ARMOR";
|
|
881
|
+
/**
|
|
882
|
+
* The prompt was blocked as a jailbreak attempt.
|
|
883
|
+
*/
|
|
884
|
+
BlockedReason["JAILBREAK"] = "JAILBREAK";
|
|
853
885
|
})(exports.BlockedReason || (exports.BlockedReason = {}));
|
|
854
886
|
/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */
|
|
855
887
|
exports.TrafficType = void 0;
|
|
@@ -1384,26 +1416,6 @@ exports.TurnCoverage = void 0;
|
|
|
1384
1416
|
*/
|
|
1385
1417
|
TurnCoverage["TURN_INCLUDES_ALL_INPUT"] = "TURN_INCLUDES_ALL_INPUT";
|
|
1386
1418
|
})(exports.TurnCoverage || (exports.TurnCoverage = {}));
|
|
1387
|
-
/** Specifies how the response should be scheduled in the conversation. */
|
|
1388
|
-
exports.FunctionResponseScheduling = void 0;
|
|
1389
|
-
(function (FunctionResponseScheduling) {
|
|
1390
|
-
/**
|
|
1391
|
-
* This value is unused.
|
|
1392
|
-
*/
|
|
1393
|
-
FunctionResponseScheduling["SCHEDULING_UNSPECIFIED"] = "SCHEDULING_UNSPECIFIED";
|
|
1394
|
-
/**
|
|
1395
|
-
* Only add the result to the conversation context, do not interrupt or trigger generation.
|
|
1396
|
-
*/
|
|
1397
|
-
FunctionResponseScheduling["SILENT"] = "SILENT";
|
|
1398
|
-
/**
|
|
1399
|
-
* Add the result to the conversation context, and prompt to generate output without interrupting ongoing generation.
|
|
1400
|
-
*/
|
|
1401
|
-
FunctionResponseScheduling["WHEN_IDLE"] = "WHEN_IDLE";
|
|
1402
|
-
/**
|
|
1403
|
-
* Add the result to the conversation context, interrupt ongoing generation and prompt to generate output.
|
|
1404
|
-
*/
|
|
1405
|
-
FunctionResponseScheduling["INTERRUPT"] = "INTERRUPT";
|
|
1406
|
-
})(exports.FunctionResponseScheduling || (exports.FunctionResponseScheduling = {}));
|
|
1407
1419
|
/** Scale of the generated music. */
|
|
1408
1420
|
exports.Scale = void 0;
|
|
1409
1421
|
(function (Scale) {
|
|
@@ -1701,7 +1713,7 @@ class HttpResponse {
|
|
|
1701
1713
|
return this.responseInternal.json();
|
|
1702
1714
|
}
|
|
1703
1715
|
}
|
|
1704
|
-
/** Content filter results for a prompt sent in the request. */
|
|
1716
|
+
/** 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. */
|
|
1705
1717
|
class GenerateContentResponsePromptFeedback {
|
|
1706
1718
|
}
|
|
1707
1719
|
/** Usage metadata about response(s). */
|
|
@@ -6181,7 +6193,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
6181
6193
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
6182
6194
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
6183
6195
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
6184
|
-
const SDK_VERSION = '1.
|
|
6196
|
+
const SDK_VERSION = '1.26.0'; // x-release-please-version
|
|
6185
6197
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
6186
6198
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
6187
6199
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -7453,6 +7465,10 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
7453
7465
|
if (fromTopP != null) {
|
|
7454
7466
|
setValueByPath(toObject, ['topP'], fromTopP);
|
|
7455
7467
|
}
|
|
7468
|
+
if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
|
|
7469
|
+
undefined) {
|
|
7470
|
+
throw new Error('enableEnhancedCivicAnswers parameter is not supported in Vertex AI.');
|
|
7471
|
+
}
|
|
7456
7472
|
return toObject;
|
|
7457
7473
|
}
|
|
7458
7474
|
function googleMapsToMldev$2(fromObject) {
|
|
@@ -10112,6 +10128,10 @@ function generationConfigToVertex(fromObject) {
|
|
|
10112
10128
|
if (fromTopP != null) {
|
|
10113
10129
|
setValueByPath(toObject, ['topP'], fromTopP);
|
|
10114
10130
|
}
|
|
10131
|
+
if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
|
|
10132
|
+
undefined) {
|
|
10133
|
+
throw new Error('enableEnhancedCivicAnswers parameter is not supported in Vertex AI.');
|
|
10134
|
+
}
|
|
10115
10135
|
return toObject;
|
|
10116
10136
|
}
|
|
10117
10137
|
function getModelParametersToMldev(apiClient, fromObject) {
|
|
@@ -14800,46 +14820,6 @@ function tuningJobFromMldev(fromObject) {
|
|
|
14800
14820
|
if (fromTunedModel != null) {
|
|
14801
14821
|
setValueByPath(toObject, ['tunedModel'], tunedModelFromMldev(fromTunedModel));
|
|
14802
14822
|
}
|
|
14803
|
-
const fromCustomBaseModel = getValueByPath(fromObject, [
|
|
14804
|
-
'customBaseModel',
|
|
14805
|
-
]);
|
|
14806
|
-
if (fromCustomBaseModel != null) {
|
|
14807
|
-
setValueByPath(toObject, ['customBaseModel'], fromCustomBaseModel);
|
|
14808
|
-
}
|
|
14809
|
-
const fromExperiment = getValueByPath(fromObject, ['experiment']);
|
|
14810
|
-
if (fromExperiment != null) {
|
|
14811
|
-
setValueByPath(toObject, ['experiment'], fromExperiment);
|
|
14812
|
-
}
|
|
14813
|
-
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
14814
|
-
if (fromLabels != null) {
|
|
14815
|
-
setValueByPath(toObject, ['labels'], fromLabels);
|
|
14816
|
-
}
|
|
14817
|
-
const fromOutputUri = getValueByPath(fromObject, ['outputUri']);
|
|
14818
|
-
if (fromOutputUri != null) {
|
|
14819
|
-
setValueByPath(toObject, ['outputUri'], fromOutputUri);
|
|
14820
|
-
}
|
|
14821
|
-
const fromPipelineJob = getValueByPath(fromObject, ['pipelineJob']);
|
|
14822
|
-
if (fromPipelineJob != null) {
|
|
14823
|
-
setValueByPath(toObject, ['pipelineJob'], fromPipelineJob);
|
|
14824
|
-
}
|
|
14825
|
-
const fromServiceAccount = getValueByPath(fromObject, [
|
|
14826
|
-
'serviceAccount',
|
|
14827
|
-
]);
|
|
14828
|
-
if (fromServiceAccount != null) {
|
|
14829
|
-
setValueByPath(toObject, ['serviceAccount'], fromServiceAccount);
|
|
14830
|
-
}
|
|
14831
|
-
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
14832
|
-
'tunedModelDisplayName',
|
|
14833
|
-
]);
|
|
14834
|
-
if (fromTunedModelDisplayName != null) {
|
|
14835
|
-
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
14836
|
-
}
|
|
14837
|
-
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
14838
|
-
'veoTuningSpec',
|
|
14839
|
-
]);
|
|
14840
|
-
if (fromVeoTuningSpec != null) {
|
|
14841
|
-
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
14842
|
-
}
|
|
14843
14823
|
return toObject;
|
|
14844
14824
|
}
|
|
14845
14825
|
function tuningJobFromVertex(fromObject) {
|