@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/node/node.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. */
|
|
@@ -3454,8 +3464,7 @@ export declare interface GoogleSearch {
|
|
|
3454
3464
|
If customers set a start time, they must set an end time (and vice versa).
|
|
3455
3465
|
*/
|
|
3456
3466
|
timeRangeFilter?: Interval;
|
|
3457
|
-
/** Optional. List of domains to be excluded from the search results.
|
|
3458
|
-
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"]. */
|
|
3459
3468
|
excludeDomains?: string[];
|
|
3460
3469
|
}
|
|
3461
3470
|
|
|
@@ -3647,22 +3656,22 @@ export declare enum HarmCategory {
|
|
|
3647
3656
|
* The harm category is unspecified.
|
|
3648
3657
|
*/
|
|
3649
3658
|
HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED",
|
|
3650
|
-
/**
|
|
3651
|
-
* The harm category is hate speech.
|
|
3652
|
-
*/
|
|
3653
|
-
HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
|
|
3654
|
-
/**
|
|
3655
|
-
* The harm category is dangerous content.
|
|
3656
|
-
*/
|
|
3657
|
-
HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
|
|
3658
3659
|
/**
|
|
3659
3660
|
* The harm category is harassment.
|
|
3660
3661
|
*/
|
|
3661
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",
|
|
3662
3667
|
/**
|
|
3663
3668
|
* The harm category is sexually explicit content.
|
|
3664
3669
|
*/
|
|
3665
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",
|
|
3666
3675
|
/**
|
|
3667
3676
|
* Deprecated: Election filter is not longer supported. The harm category is civic integrity.
|
|
3668
3677
|
*/
|
|
@@ -3682,7 +3691,11 @@ export declare enum HarmCategory {
|
|
|
3682
3691
|
/**
|
|
3683
3692
|
* The harm category is image sexually explicit content.
|
|
3684
3693
|
*/
|
|
3685
|
-
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"
|
|
3686
3699
|
}
|
|
3687
3700
|
|
|
3688
3701
|
/** Output only. Harm probability levels in the content. */
|
|
@@ -4088,9 +4101,9 @@ export declare interface ListFilesParameters {
|
|
|
4088
4101
|
export declare class ListFilesResponse {
|
|
4089
4102
|
/** Used to retain the full HTTP response. */
|
|
4090
4103
|
sdkHttpResponse?: HttpResponse;
|
|
4091
|
-
/** A token
|
|
4104
|
+
/** A token that can be sent as a `page_token` into a subsequent `ListFiles` call. */
|
|
4092
4105
|
nextPageToken?: string;
|
|
4093
|
-
/** The list of
|
|
4106
|
+
/** The list of `File`s. */
|
|
4094
4107
|
files?: File_2[];
|
|
4095
4108
|
}
|
|
4096
4109
|
|
|
@@ -6917,10 +6930,18 @@ export declare interface Transcription {
|
|
|
6917
6930
|
finished?: boolean;
|
|
6918
6931
|
}
|
|
6919
6932
|
|
|
6933
|
+
/** TunedModel for the Tuned Model of a Tuning Job. */
|
|
6920
6934
|
export declare interface TunedModel {
|
|
6921
|
-
/** Output only. The resource name of the TunedModel.
|
|
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
|
+
*/
|
|
6922
6941
|
model?: string;
|
|
6923
|
-
/** Output only. A resource name of an Endpoint.
|
|
6942
|
+
/** Output only. A resource name of an Endpoint.
|
|
6943
|
+
Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
|
|
6944
|
+
*/
|
|
6924
6945
|
endpoint?: string;
|
|
6925
6946
|
/** The checkpoints associated with this TunedModel.
|
|
6926
6947
|
This field is only populated for tuning jobs that enable intermediate
|
|
@@ -6975,11 +6996,12 @@ export declare interface TuningDataStats {
|
|
|
6975
6996
|
supervisedTuningDataStats?: SupervisedTuningDataStats;
|
|
6976
6997
|
}
|
|
6977
6998
|
|
|
6999
|
+
/** A single example for tuning. */
|
|
6978
7000
|
export declare interface TuningExample {
|
|
6979
|
-
/**
|
|
6980
|
-
textInput?: string;
|
|
6981
|
-
/** The expected model output. */
|
|
7001
|
+
/** Required. The expected model output. */
|
|
6982
7002
|
output?: string;
|
|
7003
|
+
/** Optional. Text model input. */
|
|
7004
|
+
textInput?: string;
|
|
6983
7005
|
}
|
|
6984
7006
|
|
|
6985
7007
|
/** A tuning job. */
|
|
@@ -7225,6 +7247,7 @@ declare namespace types {
|
|
|
7225
7247
|
createModelContent,
|
|
7226
7248
|
Outcome,
|
|
7227
7249
|
Language,
|
|
7250
|
+
FunctionResponseScheduling,
|
|
7228
7251
|
Type,
|
|
7229
7252
|
HarmCategory,
|
|
7230
7253
|
HarmBlockMethod,
|
|
@@ -7268,7 +7291,6 @@ declare namespace types {
|
|
|
7268
7291
|
EndSensitivity,
|
|
7269
7292
|
ActivityHandling,
|
|
7270
7293
|
TurnCoverage,
|
|
7271
|
-
FunctionResponseScheduling,
|
|
7272
7294
|
Scale,
|
|
7273
7295
|
MusicGenerationMode,
|
|
7274
7296
|
LiveMusicPlaybackControl,
|
|
@@ -7416,7 +7438,6 @@ declare namespace types {
|
|
|
7416
7438
|
DeleteModelConfig,
|
|
7417
7439
|
DeleteModelParameters,
|
|
7418
7440
|
DeleteModelResponse,
|
|
7419
|
-
GenerationConfigThinkingConfig,
|
|
7420
7441
|
GenerationConfig,
|
|
7421
7442
|
CountTokensConfig,
|
|
7422
7443
|
CountTokensParameters,
|
|
@@ -7552,6 +7573,7 @@ declare namespace types {
|
|
|
7552
7573
|
LiveServerSessionResumptionUpdate,
|
|
7553
7574
|
LiveServerMessage,
|
|
7554
7575
|
OperationFromAPIResponseParameters,
|
|
7576
|
+
GenerationConfigThinkingConfig,
|
|
7555
7577
|
AutomaticActivityDetection,
|
|
7556
7578
|
RealtimeInputConfig,
|
|
7557
7579
|
SessionResumptionConfig,
|
package/dist/web/index.mjs
CHANGED
|
@@ -532,6 +532,26 @@ var Language;
|
|
|
532
532
|
*/
|
|
533
533
|
Language["PYTHON"] = "PYTHON";
|
|
534
534
|
})(Language || (Language = {}));
|
|
535
|
+
/** Specifies how the response should be scheduled in the conversation. */
|
|
536
|
+
var FunctionResponseScheduling;
|
|
537
|
+
(function (FunctionResponseScheduling) {
|
|
538
|
+
/**
|
|
539
|
+
* This value is unused.
|
|
540
|
+
*/
|
|
541
|
+
FunctionResponseScheduling["SCHEDULING_UNSPECIFIED"] = "SCHEDULING_UNSPECIFIED";
|
|
542
|
+
/**
|
|
543
|
+
* Only add the result to the conversation context, do not interrupt or trigger generation.
|
|
544
|
+
*/
|
|
545
|
+
FunctionResponseScheduling["SILENT"] = "SILENT";
|
|
546
|
+
/**
|
|
547
|
+
* Add the result to the conversation context, and prompt to generate output without interrupting ongoing generation.
|
|
548
|
+
*/
|
|
549
|
+
FunctionResponseScheduling["WHEN_IDLE"] = "WHEN_IDLE";
|
|
550
|
+
/**
|
|
551
|
+
* Add the result to the conversation context, interrupt ongoing generation and prompt to generate output.
|
|
552
|
+
*/
|
|
553
|
+
FunctionResponseScheduling["INTERRUPT"] = "INTERRUPT";
|
|
554
|
+
})(FunctionResponseScheduling || (FunctionResponseScheduling = {}));
|
|
535
555
|
/** Optional. The type of the data. */
|
|
536
556
|
var Type;
|
|
537
557
|
(function (Type) {
|
|
@@ -575,22 +595,22 @@ var HarmCategory;
|
|
|
575
595
|
* The harm category is unspecified.
|
|
576
596
|
*/
|
|
577
597
|
HarmCategory["HARM_CATEGORY_UNSPECIFIED"] = "HARM_CATEGORY_UNSPECIFIED";
|
|
578
|
-
/**
|
|
579
|
-
* The harm category is hate speech.
|
|
580
|
-
*/
|
|
581
|
-
HarmCategory["HARM_CATEGORY_HATE_SPEECH"] = "HARM_CATEGORY_HATE_SPEECH";
|
|
582
|
-
/**
|
|
583
|
-
* The harm category is dangerous content.
|
|
584
|
-
*/
|
|
585
|
-
HarmCategory["HARM_CATEGORY_DANGEROUS_CONTENT"] = "HARM_CATEGORY_DANGEROUS_CONTENT";
|
|
586
598
|
/**
|
|
587
599
|
* The harm category is harassment.
|
|
588
600
|
*/
|
|
589
601
|
HarmCategory["HARM_CATEGORY_HARASSMENT"] = "HARM_CATEGORY_HARASSMENT";
|
|
602
|
+
/**
|
|
603
|
+
* The harm category is hate speech.
|
|
604
|
+
*/
|
|
605
|
+
HarmCategory["HARM_CATEGORY_HATE_SPEECH"] = "HARM_CATEGORY_HATE_SPEECH";
|
|
590
606
|
/**
|
|
591
607
|
* The harm category is sexually explicit content.
|
|
592
608
|
*/
|
|
593
609
|
HarmCategory["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
|
|
610
|
+
/**
|
|
611
|
+
* The harm category is dangerous content.
|
|
612
|
+
*/
|
|
613
|
+
HarmCategory["HARM_CATEGORY_DANGEROUS_CONTENT"] = "HARM_CATEGORY_DANGEROUS_CONTENT";
|
|
594
614
|
/**
|
|
595
615
|
* Deprecated: Election filter is not longer supported. The harm category is civic integrity.
|
|
596
616
|
*/
|
|
@@ -611,6 +631,10 @@ var HarmCategory;
|
|
|
611
631
|
* The harm category is image sexually explicit content.
|
|
612
632
|
*/
|
|
613
633
|
HarmCategory["HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT";
|
|
634
|
+
/**
|
|
635
|
+
* The harm category is for jailbreak prompts.
|
|
636
|
+
*/
|
|
637
|
+
HarmCategory["HARM_CATEGORY_JAILBREAK"] = "HARM_CATEGORY_JAILBREAK";
|
|
614
638
|
})(HarmCategory || (HarmCategory = {}));
|
|
615
639
|
/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */
|
|
616
640
|
var HarmBlockMethod;
|
|
@@ -851,33 +875,41 @@ var HarmSeverity;
|
|
|
851
875
|
*/
|
|
852
876
|
HarmSeverity["HARM_SEVERITY_HIGH"] = "HARM_SEVERITY_HIGH";
|
|
853
877
|
})(HarmSeverity || (HarmSeverity = {}));
|
|
854
|
-
/** Output only.
|
|
878
|
+
/** Output only. The reason why the prompt was blocked. */
|
|
855
879
|
var BlockedReason;
|
|
856
880
|
(function (BlockedReason) {
|
|
857
881
|
/**
|
|
858
|
-
*
|
|
882
|
+
* The blocked reason is unspecified.
|
|
859
883
|
*/
|
|
860
884
|
BlockedReason["BLOCKED_REASON_UNSPECIFIED"] = "BLOCKED_REASON_UNSPECIFIED";
|
|
861
885
|
/**
|
|
862
|
-
*
|
|
886
|
+
* The prompt was blocked for safety reasons.
|
|
863
887
|
*/
|
|
864
888
|
BlockedReason["SAFETY"] = "SAFETY";
|
|
865
889
|
/**
|
|
866
|
-
*
|
|
890
|
+
* 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.
|
|
867
891
|
*/
|
|
868
892
|
BlockedReason["OTHER"] = "OTHER";
|
|
869
893
|
/**
|
|
870
|
-
*
|
|
894
|
+
* The prompt was blocked because it contains a term from the terminology blocklist.
|
|
871
895
|
*/
|
|
872
896
|
BlockedReason["BLOCKLIST"] = "BLOCKLIST";
|
|
873
897
|
/**
|
|
874
|
-
*
|
|
898
|
+
* The prompt was blocked because it contains prohibited content.
|
|
875
899
|
*/
|
|
876
900
|
BlockedReason["PROHIBITED_CONTENT"] = "PROHIBITED_CONTENT";
|
|
877
901
|
/**
|
|
878
|
-
*
|
|
902
|
+
* The prompt was blocked because it contains content that is unsafe for image generation.
|
|
879
903
|
*/
|
|
880
904
|
BlockedReason["IMAGE_SAFETY"] = "IMAGE_SAFETY";
|
|
905
|
+
/**
|
|
906
|
+
* The prompt was blocked by Model Armor.
|
|
907
|
+
*/
|
|
908
|
+
BlockedReason["MODEL_ARMOR"] = "MODEL_ARMOR";
|
|
909
|
+
/**
|
|
910
|
+
* The prompt was blocked as a jailbreak attempt.
|
|
911
|
+
*/
|
|
912
|
+
BlockedReason["JAILBREAK"] = "JAILBREAK";
|
|
881
913
|
})(BlockedReason || (BlockedReason = {}));
|
|
882
914
|
/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */
|
|
883
915
|
var TrafficType;
|
|
@@ -1412,26 +1444,6 @@ var TurnCoverage;
|
|
|
1412
1444
|
*/
|
|
1413
1445
|
TurnCoverage["TURN_INCLUDES_ALL_INPUT"] = "TURN_INCLUDES_ALL_INPUT";
|
|
1414
1446
|
})(TurnCoverage || (TurnCoverage = {}));
|
|
1415
|
-
/** Specifies how the response should be scheduled in the conversation. */
|
|
1416
|
-
var FunctionResponseScheduling;
|
|
1417
|
-
(function (FunctionResponseScheduling) {
|
|
1418
|
-
/**
|
|
1419
|
-
* This value is unused.
|
|
1420
|
-
*/
|
|
1421
|
-
FunctionResponseScheduling["SCHEDULING_UNSPECIFIED"] = "SCHEDULING_UNSPECIFIED";
|
|
1422
|
-
/**
|
|
1423
|
-
* Only add the result to the conversation context, do not interrupt or trigger generation.
|
|
1424
|
-
*/
|
|
1425
|
-
FunctionResponseScheduling["SILENT"] = "SILENT";
|
|
1426
|
-
/**
|
|
1427
|
-
* Add the result to the conversation context, and prompt to generate output without interrupting ongoing generation.
|
|
1428
|
-
*/
|
|
1429
|
-
FunctionResponseScheduling["WHEN_IDLE"] = "WHEN_IDLE";
|
|
1430
|
-
/**
|
|
1431
|
-
* Add the result to the conversation context, interrupt ongoing generation and prompt to generate output.
|
|
1432
|
-
*/
|
|
1433
|
-
FunctionResponseScheduling["INTERRUPT"] = "INTERRUPT";
|
|
1434
|
-
})(FunctionResponseScheduling || (FunctionResponseScheduling = {}));
|
|
1435
1447
|
/** Scale of the generated music. */
|
|
1436
1448
|
var Scale;
|
|
1437
1449
|
(function (Scale) {
|
|
@@ -1729,7 +1741,7 @@ class HttpResponse {
|
|
|
1729
1741
|
return this.responseInternal.json();
|
|
1730
1742
|
}
|
|
1731
1743
|
}
|
|
1732
|
-
/** Content filter results for a prompt sent in the request. */
|
|
1744
|
+
/** 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. */
|
|
1733
1745
|
class GenerateContentResponsePromptFeedback {
|
|
1734
1746
|
}
|
|
1735
1747
|
/** Usage metadata about response(s). */
|
|
@@ -6784,6 +6796,10 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
6784
6796
|
if (fromTopP != null) {
|
|
6785
6797
|
setValueByPath(toObject, ['topP'], fromTopP);
|
|
6786
6798
|
}
|
|
6799
|
+
if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
|
|
6800
|
+
undefined) {
|
|
6801
|
+
throw new Error('enableEnhancedCivicAnswers parameter is not supported in Vertex AI.');
|
|
6802
|
+
}
|
|
6787
6803
|
return toObject;
|
|
6788
6804
|
}
|
|
6789
6805
|
function googleMapsToMldev$2(fromObject) {
|
|
@@ -9443,6 +9459,10 @@ function generationConfigToVertex(fromObject) {
|
|
|
9443
9459
|
if (fromTopP != null) {
|
|
9444
9460
|
setValueByPath(toObject, ['topP'], fromTopP);
|
|
9445
9461
|
}
|
|
9462
|
+
if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
|
|
9463
|
+
undefined) {
|
|
9464
|
+
throw new Error('enableEnhancedCivicAnswers parameter is not supported in Vertex AI.');
|
|
9465
|
+
}
|
|
9446
9466
|
return toObject;
|
|
9447
9467
|
}
|
|
9448
9468
|
function getModelParametersToMldev(apiClient, fromObject) {
|
|
@@ -10567,7 +10587,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
10567
10587
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
10568
10588
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
10569
10589
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
10570
|
-
const SDK_VERSION = '1.
|
|
10590
|
+
const SDK_VERSION = '1.26.0'; // x-release-please-version
|
|
10571
10591
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
10572
10592
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
10573
10593
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -14705,46 +14725,6 @@ function tuningJobFromMldev(fromObject) {
|
|
|
14705
14725
|
if (fromTunedModel != null) {
|
|
14706
14726
|
setValueByPath(toObject, ['tunedModel'], tunedModelFromMldev(fromTunedModel));
|
|
14707
14727
|
}
|
|
14708
|
-
const fromCustomBaseModel = getValueByPath(fromObject, [
|
|
14709
|
-
'customBaseModel',
|
|
14710
|
-
]);
|
|
14711
|
-
if (fromCustomBaseModel != null) {
|
|
14712
|
-
setValueByPath(toObject, ['customBaseModel'], fromCustomBaseModel);
|
|
14713
|
-
}
|
|
14714
|
-
const fromExperiment = getValueByPath(fromObject, ['experiment']);
|
|
14715
|
-
if (fromExperiment != null) {
|
|
14716
|
-
setValueByPath(toObject, ['experiment'], fromExperiment);
|
|
14717
|
-
}
|
|
14718
|
-
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
14719
|
-
if (fromLabels != null) {
|
|
14720
|
-
setValueByPath(toObject, ['labels'], fromLabels);
|
|
14721
|
-
}
|
|
14722
|
-
const fromOutputUri = getValueByPath(fromObject, ['outputUri']);
|
|
14723
|
-
if (fromOutputUri != null) {
|
|
14724
|
-
setValueByPath(toObject, ['outputUri'], fromOutputUri);
|
|
14725
|
-
}
|
|
14726
|
-
const fromPipelineJob = getValueByPath(fromObject, ['pipelineJob']);
|
|
14727
|
-
if (fromPipelineJob != null) {
|
|
14728
|
-
setValueByPath(toObject, ['pipelineJob'], fromPipelineJob);
|
|
14729
|
-
}
|
|
14730
|
-
const fromServiceAccount = getValueByPath(fromObject, [
|
|
14731
|
-
'serviceAccount',
|
|
14732
|
-
]);
|
|
14733
|
-
if (fromServiceAccount != null) {
|
|
14734
|
-
setValueByPath(toObject, ['serviceAccount'], fromServiceAccount);
|
|
14735
|
-
}
|
|
14736
|
-
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
14737
|
-
'tunedModelDisplayName',
|
|
14738
|
-
]);
|
|
14739
|
-
if (fromTunedModelDisplayName != null) {
|
|
14740
|
-
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
14741
|
-
}
|
|
14742
|
-
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
14743
|
-
'veoTuningSpec',
|
|
14744
|
-
]);
|
|
14745
|
-
if (fromVeoTuningSpec != null) {
|
|
14746
|
-
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
14747
|
-
}
|
|
14748
14728
|
return toObject;
|
|
14749
14729
|
}
|
|
14750
14730
|
function tuningJobFromVertex(fromObject) {
|