@google/genai 2.6.0 → 2.7.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 +200 -27
- package/dist/index.cjs +138 -83
- package/dist/index.mjs +138 -83
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +138 -83
- package/dist/node/index.mjs +138 -83
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +200 -27
- package/dist/tokenizer/node.cjs +28 -24
- package/dist/tokenizer/node.d.ts +2 -3
- package/dist/tokenizer/node.mjs +28 -24
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +29 -25
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +85 -24
- package/dist/vertex_internal/index.js +29 -25
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +138 -83
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +200 -27
- package/package.json +1 -1
package/dist/node/node.d.ts
CHANGED
|
@@ -875,6 +875,32 @@ export declare interface AutomaticFunctionCallingConfig {
|
|
|
875
875
|
ignoreCallHistory?: boolean;
|
|
876
876
|
}
|
|
877
877
|
|
|
878
|
+
/** Autorater config used for evaluation. */
|
|
879
|
+
export declare interface AutoraterConfig {
|
|
880
|
+
/** Number of samples for each instance in the dataset.
|
|
881
|
+
If not specified, the default is 4. Minimum value is 1, maximum value
|
|
882
|
+
is 32. */
|
|
883
|
+
samplingCount?: number;
|
|
884
|
+
/** Optional. Default is true. Whether to flip the candidate and baseline
|
|
885
|
+
responses. This is only applicable to the pairwise metric. If enabled, also
|
|
886
|
+
provide PairwiseMetricSpec.candidate_response_field_name and
|
|
887
|
+
PairwiseMetricSpec.baseline_response_field_name. When rendering
|
|
888
|
+
PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
|
|
889
|
+
fields will be flipped for half of the samples to reduce bias. */
|
|
890
|
+
flipEnabled?: boolean;
|
|
891
|
+
/** The fully qualified name of the publisher model or tuned autorater
|
|
892
|
+
endpoint to use.
|
|
893
|
+
|
|
894
|
+
Publisher model format:
|
|
895
|
+
`projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
|
|
896
|
+
|
|
897
|
+
Tuned model endpoint format:
|
|
898
|
+
`projects/{project}/locations/{location}/endpoints/{endpoint}` */
|
|
899
|
+
autoraterModel?: string;
|
|
900
|
+
/** Configuration options for model generation and outputs. */
|
|
901
|
+
generationConfig?: GenerationConfig;
|
|
902
|
+
}
|
|
903
|
+
|
|
878
904
|
/** Configures the avatar to be used in the session. */
|
|
879
905
|
export declare interface AvatarConfig {
|
|
880
906
|
/** Pre-built avatar id. */
|
|
@@ -2124,6 +2150,18 @@ export declare interface CompletionStats {
|
|
|
2124
2150
|
successfulForecastPointCount?: string;
|
|
2125
2151
|
}
|
|
2126
2152
|
|
|
2153
|
+
/** Composite reinforcement tuning reward config. */
|
|
2154
|
+
export declare interface CompositeReinforcementTuningRewardConfig {
|
|
2155
|
+
weightedRewardConfigs?: CompositeReinforcementTuningRewardConfigWeightedRewardConfig[];
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
/** Composite reinforcement tuning reward config weighted reward config. */
|
|
2159
|
+
export declare interface CompositeReinforcementTuningRewardConfigWeightedRewardConfig {
|
|
2160
|
+
rewardConfig?: SingleReinforcementTuningRewardConfig;
|
|
2161
|
+
/** How much this single reward contributes to the total overall reward. */
|
|
2162
|
+
weight?: number;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2127
2165
|
/** Tool to support computer use. */
|
|
2128
2166
|
export declare interface ComputerUse {
|
|
2129
2167
|
/** Required. The environment being operated. */
|
|
@@ -2672,7 +2710,7 @@ export declare interface CreateTuningJobConfig {
|
|
|
2672
2710
|
be charged usage for any applicable operations.
|
|
2673
2711
|
*/
|
|
2674
2712
|
abortSignal?: AbortSignal;
|
|
2675
|
-
/** The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING or DISTILLATION). If not set, the default method (SFT) will be used. */
|
|
2713
|
+
/** The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING or DISTILLATION or REINFORCEMENT_TUNING). If not set, the default method (SFT) will be used. */
|
|
2676
2714
|
method?: TuningMethod;
|
|
2677
2715
|
/** Validation dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
2678
2716
|
validationDataset?: TuningValidationDataset;
|
|
@@ -2712,6 +2750,18 @@ export declare interface CreateTuningJobConfig {
|
|
|
2712
2750
|
outputUri?: string;
|
|
2713
2751
|
/** The encryption spec of the tuning job. Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with provided encryption key. */
|
|
2714
2752
|
encryptionSpec?: EncryptionSpec;
|
|
2753
|
+
/** Reward function configuration for reinforcement tuning. Reinforcement tuning only. */
|
|
2754
|
+
rewardConfig?: SingleReinforcementTuningRewardConfig;
|
|
2755
|
+
/** Composite reward function configuration for reinforcement tuning. Reinforcement tuning only. */
|
|
2756
|
+
compositeRewardConfig?: CompositeReinforcementTuningRewardConfig;
|
|
2757
|
+
/** Number of different responses to generate per prompt during tuning. Reinforcement tuning only. */
|
|
2758
|
+
samplesPerPrompt?: number;
|
|
2759
|
+
/** How often at steps to evaluate the tuning job during training. Reinforcement tuning only. */
|
|
2760
|
+
evaluateInterval?: number;
|
|
2761
|
+
/** How often at steps to save checkpoints during training. Reinforcement tuning only. */
|
|
2762
|
+
checkpointInterval?: number;
|
|
2763
|
+
/** The maximum number of tokens to generate per prompt. Reinforcement tuning only. */
|
|
2764
|
+
maxOutputTokens?: number;
|
|
2715
2765
|
}
|
|
2716
2766
|
|
|
2717
2767
|
/** Fine-tuning job creation parameters - optional fields. */
|
|
@@ -2840,6 +2890,10 @@ declare interface DeepResearchAgentConfig {
|
|
|
2840
2890
|
* will then proceed only if the user confirms the plan in the next turn.
|
|
2841
2891
|
*/
|
|
2842
2892
|
collaborative_planning?: boolean;
|
|
2893
|
+
/**
|
|
2894
|
+
* Enables bigquery tool for the Deep Research agent.
|
|
2895
|
+
*/
|
|
2896
|
+
enable_bigquery_tool?: boolean;
|
|
2843
2897
|
/**
|
|
2844
2898
|
* Whether to include thought summaries in the response.
|
|
2845
2899
|
*/
|
|
@@ -3119,7 +3173,7 @@ declare interface DocumentContent {
|
|
|
3119
3173
|
/**
|
|
3120
3174
|
* The mime type of the document.
|
|
3121
3175
|
*/
|
|
3122
|
-
mime_type?: 'application/pdf';
|
|
3176
|
+
mime_type?: 'application/pdf' | 'text/csv';
|
|
3123
3177
|
/**
|
|
3124
3178
|
* The URI of the document.
|
|
3125
3179
|
*/
|
|
@@ -3621,6 +3675,10 @@ declare interface ErrorEvent_2 {
|
|
|
3621
3675
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
3622
3676
|
*/
|
|
3623
3677
|
event_id?: string;
|
|
3678
|
+
/**
|
|
3679
|
+
* Optional metadata accompanying ANY streamed event.
|
|
3680
|
+
*/
|
|
3681
|
+
metadata?: ErrorEvent_2.Metadata;
|
|
3624
3682
|
}
|
|
3625
3683
|
|
|
3626
3684
|
declare namespace ErrorEvent_2 {
|
|
@@ -3637,6 +3695,15 @@ declare namespace ErrorEvent_2 {
|
|
|
3637
3695
|
*/
|
|
3638
3696
|
message?: string;
|
|
3639
3697
|
}
|
|
3698
|
+
/**
|
|
3699
|
+
* Optional metadata accompanying ANY streamed event.
|
|
3700
|
+
*/
|
|
3701
|
+
interface Metadata {
|
|
3702
|
+
/**
|
|
3703
|
+
* Statistics on the interaction request's token usage.
|
|
3704
|
+
*/
|
|
3705
|
+
usage?: InteractionsAPI.Usage;
|
|
3706
|
+
}
|
|
3640
3707
|
}
|
|
3641
3708
|
|
|
3642
3709
|
declare namespace Errors {
|
|
@@ -4293,10 +4360,9 @@ declare interface Function_2 {
|
|
|
4293
4360
|
parameters?: unknown;
|
|
4294
4361
|
}
|
|
4295
4362
|
|
|
4296
|
-
/** A
|
|
4363
|
+
/** A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. */
|
|
4297
4364
|
export declare interface FunctionCall {
|
|
4298
|
-
/** The unique id of the function call. If populated, the client to execute the
|
|
4299
|
-
`function_call` and return the response with the matching `id`. */
|
|
4365
|
+
/** Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`. */
|
|
4300
4366
|
id?: string;
|
|
4301
4367
|
/** Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details. */
|
|
4302
4368
|
args?: Record<string, unknown>;
|
|
@@ -6725,6 +6791,22 @@ declare interface InteractionCompletedEvent {
|
|
|
6725
6791
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
6726
6792
|
*/
|
|
6727
6793
|
event_id?: string;
|
|
6794
|
+
/**
|
|
6795
|
+
* Optional metadata accompanying ANY streamed event.
|
|
6796
|
+
*/
|
|
6797
|
+
metadata?: InteractionCompletedEvent.Metadata;
|
|
6798
|
+
}
|
|
6799
|
+
|
|
6800
|
+
declare namespace InteractionCompletedEvent {
|
|
6801
|
+
/**
|
|
6802
|
+
* Optional metadata accompanying ANY streamed event.
|
|
6803
|
+
*/
|
|
6804
|
+
interface Metadata {
|
|
6805
|
+
/**
|
|
6806
|
+
* Statistics on the interaction request's token usage.
|
|
6807
|
+
*/
|
|
6808
|
+
usage?: InteractionsAPI.Usage;
|
|
6809
|
+
}
|
|
6728
6810
|
}
|
|
6729
6811
|
|
|
6730
6812
|
declare interface InteractionCreatedEvent {
|
|
@@ -6737,6 +6819,22 @@ declare interface InteractionCreatedEvent {
|
|
|
6737
6819
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
6738
6820
|
*/
|
|
6739
6821
|
event_id?: string;
|
|
6822
|
+
/**
|
|
6823
|
+
* Optional metadata accompanying ANY streamed event.
|
|
6824
|
+
*/
|
|
6825
|
+
metadata?: InteractionCreatedEvent.Metadata;
|
|
6826
|
+
}
|
|
6827
|
+
|
|
6828
|
+
declare namespace InteractionCreatedEvent {
|
|
6829
|
+
/**
|
|
6830
|
+
* Optional metadata accompanying ANY streamed event.
|
|
6831
|
+
*/
|
|
6832
|
+
interface Metadata {
|
|
6833
|
+
/**
|
|
6834
|
+
* Statistics on the interaction request's token usage.
|
|
6835
|
+
*/
|
|
6836
|
+
usage?: InteractionsAPI.Usage;
|
|
6837
|
+
}
|
|
6740
6838
|
}
|
|
6741
6839
|
|
|
6742
6840
|
declare type InteractionCreateParams = CreateModelInteractionParamsNonStreaming | CreateModelInteractionParamsStreaming | CreateAgentInteractionParamsNonStreaming | CreateAgentInteractionParamsStreaming;
|
|
@@ -6895,6 +6993,22 @@ declare interface InteractionStatusUpdate {
|
|
|
6895
6993
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
6896
6994
|
*/
|
|
6897
6995
|
event_id?: string;
|
|
6996
|
+
/**
|
|
6997
|
+
* Optional metadata accompanying ANY streamed event.
|
|
6998
|
+
*/
|
|
6999
|
+
metadata?: InteractionStatusUpdate.Metadata;
|
|
7000
|
+
}
|
|
7001
|
+
|
|
7002
|
+
declare namespace InteractionStatusUpdate {
|
|
7003
|
+
/**
|
|
7004
|
+
* Optional metadata accompanying ANY streamed event.
|
|
7005
|
+
*/
|
|
7006
|
+
interface Metadata {
|
|
7007
|
+
/**
|
|
7008
|
+
* Statistics on the interaction request's token usage.
|
|
7009
|
+
*/
|
|
7010
|
+
usage?: InteractionsAPI.Usage;
|
|
7011
|
+
}
|
|
6898
7012
|
}
|
|
6899
7013
|
|
|
6900
7014
|
/** Parameters for the private _Register method. */
|
|
@@ -6990,16 +7104,11 @@ export declare enum Language {
|
|
|
6990
7104
|
PYTHON = "PYTHON"
|
|
6991
7105
|
}
|
|
6992
7106
|
|
|
6993
|
-
/** An object that represents a latitude/longitude pair.
|
|
6994
|
-
|
|
6995
|
-
This is expressed as a pair of doubles to represent degrees latitude and
|
|
6996
|
-
degrees longitude. Unless specified otherwise, this object must conform to the
|
|
6997
|
-
<a href="https://en.wikipedia.org/wiki/World_Geodetic_System#1984_version">
|
|
6998
|
-
WGS84 standard</a>. Values must be within normalized ranges. */
|
|
7107
|
+
/** An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. */
|
|
6999
7108
|
export declare interface LatLng {
|
|
7000
7109
|
/** The latitude in degrees. It must be in the range [-90.0, +90.0]. */
|
|
7001
7110
|
latitude?: number;
|
|
7002
|
-
/** The longitude in degrees. It must be in the range [-180.0, +180.0] */
|
|
7111
|
+
/** The longitude in degrees. It must be in the range [-180.0, +180.0]. */
|
|
7003
7112
|
longitude?: number;
|
|
7004
7113
|
}
|
|
7005
7114
|
|
|
@@ -8926,7 +9035,8 @@ export declare enum PagedItem {
|
|
|
8926
9035
|
PAGED_ITEM_FILES = "files",
|
|
8927
9036
|
PAGED_ITEM_CACHED_CONTENTS = "cachedContents",
|
|
8928
9037
|
PAGED_ITEM_FILE_SEARCH_STORES = "fileSearchStores",
|
|
8929
|
-
PAGED_ITEM_DOCUMENTS = "documents"
|
|
9038
|
+
PAGED_ITEM_DOCUMENTS = "documents",
|
|
9039
|
+
PAGED_ITEM_SKILLS = "skills"
|
|
8930
9040
|
}
|
|
8931
9041
|
|
|
8932
9042
|
declare interface PagedItemConfig {
|
|
@@ -8947,6 +9057,7 @@ declare interface PagedItemResponse<T> {
|
|
|
8947
9057
|
cachedContents?: T[];
|
|
8948
9058
|
fileSearchStores?: T[];
|
|
8949
9059
|
documents?: T[];
|
|
9060
|
+
skills?: T[];
|
|
8950
9061
|
}
|
|
8951
9062
|
|
|
8952
9063
|
/**
|
|
@@ -9628,6 +9739,12 @@ export declare class RegisterFilesResponse {
|
|
|
9628
9739
|
files?: File_2[];
|
|
9629
9740
|
}
|
|
9630
9741
|
|
|
9742
|
+
/** Reinforcement tuning autorater scorer. */
|
|
9743
|
+
export declare interface ReinforcementTuningAutoraterScorer {
|
|
9744
|
+
/** Autorater config for evaluation. */
|
|
9745
|
+
autoraterConfig?: AutoraterConfig;
|
|
9746
|
+
}
|
|
9747
|
+
|
|
9631
9748
|
/** Represents a recorded session. */
|
|
9632
9749
|
export declare interface ReplayFile {
|
|
9633
9750
|
replayId?: string;
|
|
@@ -9769,10 +9886,9 @@ export declare interface Retrieval {
|
|
|
9769
9886
|
vertexRagStore?: VertexRagStore;
|
|
9770
9887
|
}
|
|
9771
9888
|
|
|
9772
|
-
/** Retrieval config.
|
|
9773
|
-
*/
|
|
9889
|
+
/** Retrieval config. */
|
|
9774
9890
|
export declare interface RetrievalConfig {
|
|
9775
|
-
/**
|
|
9891
|
+
/** The location of the user. */
|
|
9776
9892
|
latLng?: LatLng;
|
|
9777
9893
|
/** The language code of the user. */
|
|
9778
9894
|
languageCode?: string;
|
|
@@ -10288,6 +10404,11 @@ export declare class SingleEmbedContentResponse {
|
|
|
10288
10404
|
tokenCount?: string;
|
|
10289
10405
|
}
|
|
10290
10406
|
|
|
10407
|
+
/** Single reinforcement tuning reward config. */
|
|
10408
|
+
export declare interface SingleReinforcementTuningRewardConfig {
|
|
10409
|
+
autoraterScorer?: ReinforcementTuningAutoraterScorer;
|
|
10410
|
+
}
|
|
10411
|
+
|
|
10291
10412
|
/** Context window will be truncated by keeping only suffix of it.
|
|
10292
10413
|
|
|
10293
10414
|
Context window will always be cut at start of USER role turn. System
|
|
@@ -10366,6 +10487,10 @@ declare interface StepDelta {
|
|
|
10366
10487
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
10367
10488
|
*/
|
|
10368
10489
|
event_id?: string;
|
|
10490
|
+
/**
|
|
10491
|
+
* Optional metadata accompanying ANY streamed event.
|
|
10492
|
+
*/
|
|
10493
|
+
metadata?: StepDelta.Metadata;
|
|
10369
10494
|
}
|
|
10370
10495
|
|
|
10371
10496
|
declare namespace StepDelta {
|
|
@@ -10404,7 +10529,7 @@ declare namespace StepDelta {
|
|
|
10404
10529
|
interface Document {
|
|
10405
10530
|
type: 'document';
|
|
10406
10531
|
data?: string;
|
|
10407
|
-
mime_type?: 'application/pdf';
|
|
10532
|
+
mime_type?: 'application/pdf' | 'text/csv';
|
|
10408
10533
|
uri?: string;
|
|
10409
10534
|
}
|
|
10410
10535
|
interface Video {
|
|
@@ -10571,6 +10696,15 @@ declare namespace StepDelta {
|
|
|
10571
10696
|
is_error?: boolean;
|
|
10572
10697
|
name?: string;
|
|
10573
10698
|
}
|
|
10699
|
+
/**
|
|
10700
|
+
* Optional metadata accompanying ANY streamed event.
|
|
10701
|
+
*/
|
|
10702
|
+
interface Metadata {
|
|
10703
|
+
/**
|
|
10704
|
+
* Statistics on the interaction request's token usage.
|
|
10705
|
+
*/
|
|
10706
|
+
usage?: InteractionsAPI.Usage;
|
|
10707
|
+
}
|
|
10574
10708
|
}
|
|
10575
10709
|
|
|
10576
10710
|
declare interface StepStart {
|
|
@@ -10584,6 +10718,22 @@ declare interface StepStart {
|
|
|
10584
10718
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
10585
10719
|
*/
|
|
10586
10720
|
event_id?: string;
|
|
10721
|
+
/**
|
|
10722
|
+
* Optional metadata accompanying ANY streamed event.
|
|
10723
|
+
*/
|
|
10724
|
+
metadata?: StepStart.Metadata;
|
|
10725
|
+
}
|
|
10726
|
+
|
|
10727
|
+
declare namespace StepStart {
|
|
10728
|
+
/**
|
|
10729
|
+
* Optional metadata accompanying ANY streamed event.
|
|
10730
|
+
*/
|
|
10731
|
+
interface Metadata {
|
|
10732
|
+
/**
|
|
10733
|
+
* Statistics on the interaction request's token usage.
|
|
10734
|
+
*/
|
|
10735
|
+
usage?: InteractionsAPI.Usage;
|
|
10736
|
+
}
|
|
10587
10737
|
}
|
|
10588
10738
|
|
|
10589
10739
|
declare interface StepStop {
|
|
@@ -10593,6 +10743,22 @@ declare interface StepStop {
|
|
|
10593
10743
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
10594
10744
|
*/
|
|
10595
10745
|
event_id?: string;
|
|
10746
|
+
/**
|
|
10747
|
+
* Optional metadata accompanying ANY streamed event.
|
|
10748
|
+
*/
|
|
10749
|
+
metadata?: StepStop.Metadata;
|
|
10750
|
+
}
|
|
10751
|
+
|
|
10752
|
+
declare namespace StepStop {
|
|
10753
|
+
/**
|
|
10754
|
+
* Optional metadata accompanying ANY streamed event.
|
|
10755
|
+
*/
|
|
10756
|
+
interface Metadata {
|
|
10757
|
+
/**
|
|
10758
|
+
* Statistics on the interaction request's token usage.
|
|
10759
|
+
*/
|
|
10760
|
+
usage?: InteractionsAPI.Usage;
|
|
10761
|
+
}
|
|
10596
10762
|
}
|
|
10597
10763
|
|
|
10598
10764
|
declare class Stream<Item> implements AsyncIterable<Item> {
|
|
@@ -11208,15 +11374,13 @@ declare type ToolChoiceType = 'auto' | 'any' | 'none' | 'validated';
|
|
|
11208
11374
|
export declare interface ToolCodeExecution {
|
|
11209
11375
|
}
|
|
11210
11376
|
|
|
11211
|
-
/** Tool config.
|
|
11212
|
-
|
|
11213
|
-
This config is shared for all tools provided in the request. */
|
|
11377
|
+
/** Tool config. This config is shared for all tools provided in the request. */
|
|
11214
11378
|
export declare interface ToolConfig {
|
|
11215
11379
|
/** Optional. Retrieval config. */
|
|
11216
11380
|
retrievalConfig?: RetrievalConfig;
|
|
11217
11381
|
/** Optional. Function calling config. */
|
|
11218
11382
|
functionCallingConfig?: FunctionCallingConfig;
|
|
11219
|
-
/** If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool
|
|
11383
|
+
/** Optional. If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool interactions. This field is not supported in Vertex AI. */
|
|
11220
11384
|
includeServerSideToolInvocations?: boolean;
|
|
11221
11385
|
}
|
|
11222
11386
|
|
|
@@ -11497,7 +11661,11 @@ export declare enum TuningMethod {
|
|
|
11497
11661
|
/**
|
|
11498
11662
|
* Distillation tuning.
|
|
11499
11663
|
*/
|
|
11500
|
-
DISTILLATION = "DISTILLATION"
|
|
11664
|
+
DISTILLATION = "DISTILLATION",
|
|
11665
|
+
/**
|
|
11666
|
+
* Reinforcement tuning.
|
|
11667
|
+
*/
|
|
11668
|
+
REINFORCEMENT_TUNING = "REINFORCEMENT_TUNING"
|
|
11501
11669
|
}
|
|
11502
11670
|
|
|
11503
11671
|
/** Tuning mode. This enum is not supported in Gemini API. */
|
|
@@ -11825,13 +11993,13 @@ declare namespace types {
|
|
|
11825
11993
|
PhishBlockThreshold,
|
|
11826
11994
|
Behavior,
|
|
11827
11995
|
DynamicRetrievalConfigMode,
|
|
11828
|
-
FunctionCallingConfigMode,
|
|
11829
11996
|
ThinkingLevel,
|
|
11830
11997
|
PersonGeneration,
|
|
11831
11998
|
ProminentPeople,
|
|
11832
11999
|
HarmCategory,
|
|
11833
12000
|
HarmBlockMethod,
|
|
11834
12001
|
HarmBlockThreshold,
|
|
12002
|
+
FunctionCallingConfigMode,
|
|
11835
12003
|
FinishReason,
|
|
11836
12004
|
HarmProbability,
|
|
11837
12005
|
HarmSeverity,
|
|
@@ -11942,10 +12110,6 @@ declare namespace types {
|
|
|
11942
12110
|
StreamableHttpTransport,
|
|
11943
12111
|
McpServer,
|
|
11944
12112
|
Tool,
|
|
11945
|
-
LatLng,
|
|
11946
|
-
RetrievalConfig,
|
|
11947
|
-
FunctionCallingConfig,
|
|
11948
|
-
ToolConfig,
|
|
11949
12113
|
ReplicatedVoiceConfig,
|
|
11950
12114
|
PrebuiltVoiceConfig,
|
|
11951
12115
|
VoiceConfig,
|
|
@@ -11960,6 +12124,10 @@ declare namespace types {
|
|
|
11960
12124
|
GenerationConfigRoutingConfigManualRoutingMode,
|
|
11961
12125
|
GenerationConfigRoutingConfig,
|
|
11962
12126
|
SafetySetting,
|
|
12127
|
+
LatLng,
|
|
12128
|
+
RetrievalConfig,
|
|
12129
|
+
FunctionCallingConfig,
|
|
12130
|
+
ToolConfig,
|
|
11963
12131
|
ModelArmorConfig,
|
|
11964
12132
|
GenerateContentConfig,
|
|
11965
12133
|
GenerateContentParameters,
|
|
@@ -12122,6 +12290,11 @@ declare namespace types {
|
|
|
12122
12290
|
TuningExample,
|
|
12123
12291
|
TuningDataset,
|
|
12124
12292
|
TuningValidationDataset,
|
|
12293
|
+
AutoraterConfig,
|
|
12294
|
+
ReinforcementTuningAutoraterScorer,
|
|
12295
|
+
SingleReinforcementTuningRewardConfig,
|
|
12296
|
+
CompositeReinforcementTuningRewardConfigWeightedRewardConfig,
|
|
12297
|
+
CompositeReinforcementTuningRewardConfig,
|
|
12125
12298
|
CreateTuningJobConfig,
|
|
12126
12299
|
CreateTuningJobParametersPrivate,
|
|
12127
12300
|
TuningOperation,
|
package/dist/tokenizer/node.cjs
CHANGED
|
@@ -271,30 +271,6 @@ var DynamicRetrievalConfigMode;
|
|
|
271
271
|
*/
|
|
272
272
|
DynamicRetrievalConfigMode["MODE_DYNAMIC"] = "MODE_DYNAMIC";
|
|
273
273
|
})(DynamicRetrievalConfigMode || (DynamicRetrievalConfigMode = {}));
|
|
274
|
-
/** Function calling mode. */
|
|
275
|
-
var FunctionCallingConfigMode;
|
|
276
|
-
(function (FunctionCallingConfigMode) {
|
|
277
|
-
/**
|
|
278
|
-
* Unspecified function calling mode. This value should not be used.
|
|
279
|
-
*/
|
|
280
|
-
FunctionCallingConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
|
|
281
|
-
/**
|
|
282
|
-
* Default model behavior, model decides to predict either function calls or natural language response.
|
|
283
|
-
*/
|
|
284
|
-
FunctionCallingConfigMode["AUTO"] = "AUTO";
|
|
285
|
-
/**
|
|
286
|
-
* 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".
|
|
287
|
-
*/
|
|
288
|
-
FunctionCallingConfigMode["ANY"] = "ANY";
|
|
289
|
-
/**
|
|
290
|
-
* Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
|
|
291
|
-
*/
|
|
292
|
-
FunctionCallingConfigMode["NONE"] = "NONE";
|
|
293
|
-
/**
|
|
294
|
-
* Model is constrained to predict either function calls or natural language response. 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".
|
|
295
|
-
*/
|
|
296
|
-
FunctionCallingConfigMode["VALIDATED"] = "VALIDATED";
|
|
297
|
-
})(FunctionCallingConfigMode || (FunctionCallingConfigMode = {}));
|
|
298
274
|
/** The number of thoughts tokens that the model should generate. */
|
|
299
275
|
var ThinkingLevel;
|
|
300
276
|
(function (ThinkingLevel) {
|
|
@@ -443,6 +419,30 @@ var HarmBlockThreshold;
|
|
|
443
419
|
*/
|
|
444
420
|
HarmBlockThreshold["OFF"] = "OFF";
|
|
445
421
|
})(HarmBlockThreshold || (HarmBlockThreshold = {}));
|
|
422
|
+
/** Function calling mode. */
|
|
423
|
+
var FunctionCallingConfigMode;
|
|
424
|
+
(function (FunctionCallingConfigMode) {
|
|
425
|
+
/**
|
|
426
|
+
* Unspecified function calling mode. This value should not be used.
|
|
427
|
+
*/
|
|
428
|
+
FunctionCallingConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
|
|
429
|
+
/**
|
|
430
|
+
* Default model behavior, model decides to predict either function calls or natural language response.
|
|
431
|
+
*/
|
|
432
|
+
FunctionCallingConfigMode["AUTO"] = "AUTO";
|
|
433
|
+
/**
|
|
434
|
+
* 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".
|
|
435
|
+
*/
|
|
436
|
+
FunctionCallingConfigMode["ANY"] = "ANY";
|
|
437
|
+
/**
|
|
438
|
+
* Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
|
|
439
|
+
*/
|
|
440
|
+
FunctionCallingConfigMode["NONE"] = "NONE";
|
|
441
|
+
/**
|
|
442
|
+
* Model is constrained to predict either function calls or natural language response. 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".
|
|
443
|
+
*/
|
|
444
|
+
FunctionCallingConfigMode["VALIDATED"] = "VALIDATED";
|
|
445
|
+
})(FunctionCallingConfigMode || (FunctionCallingConfigMode = {}));
|
|
446
446
|
/** Output only. The reason why the model stopped generating tokens.
|
|
447
447
|
|
|
448
448
|
If empty, the model has not stopped generating the tokens. */
|
|
@@ -1276,6 +1276,10 @@ var TuningMethod;
|
|
|
1276
1276
|
* Distillation tuning.
|
|
1277
1277
|
*/
|
|
1278
1278
|
TuningMethod["DISTILLATION"] = "DISTILLATION";
|
|
1279
|
+
/**
|
|
1280
|
+
* Reinforcement tuning.
|
|
1281
|
+
*/
|
|
1282
|
+
TuningMethod["REINFORCEMENT_TUNING"] = "REINFORCEMENT_TUNING";
|
|
1279
1283
|
})(TuningMethod || (TuningMethod = {}));
|
|
1280
1284
|
/** State for the lifecycle of a File. */
|
|
1281
1285
|
var FileState;
|
package/dist/tokenizer/node.d.ts
CHANGED
|
@@ -332,10 +332,9 @@ declare interface FileSearch {
|
|
|
332
332
|
metadataFilter?: string;
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
/** A
|
|
335
|
+
/** A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. */
|
|
336
336
|
declare interface FunctionCall {
|
|
337
|
-
/** The unique id of the function call. If populated, the client to execute the
|
|
338
|
-
`function_call` and return the response with the matching `id`. */
|
|
337
|
+
/** Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`. */
|
|
339
338
|
id?: string;
|
|
340
339
|
/** Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details. */
|
|
341
340
|
args?: Record<string, unknown>;
|
package/dist/tokenizer/node.mjs
CHANGED
|
@@ -247,30 +247,6 @@ var DynamicRetrievalConfigMode;
|
|
|
247
247
|
*/
|
|
248
248
|
DynamicRetrievalConfigMode["MODE_DYNAMIC"] = "MODE_DYNAMIC";
|
|
249
249
|
})(DynamicRetrievalConfigMode || (DynamicRetrievalConfigMode = {}));
|
|
250
|
-
/** Function calling mode. */
|
|
251
|
-
var FunctionCallingConfigMode;
|
|
252
|
-
(function (FunctionCallingConfigMode) {
|
|
253
|
-
/**
|
|
254
|
-
* Unspecified function calling mode. This value should not be used.
|
|
255
|
-
*/
|
|
256
|
-
FunctionCallingConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
|
|
257
|
-
/**
|
|
258
|
-
* Default model behavior, model decides to predict either function calls or natural language response.
|
|
259
|
-
*/
|
|
260
|
-
FunctionCallingConfigMode["AUTO"] = "AUTO";
|
|
261
|
-
/**
|
|
262
|
-
* 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".
|
|
263
|
-
*/
|
|
264
|
-
FunctionCallingConfigMode["ANY"] = "ANY";
|
|
265
|
-
/**
|
|
266
|
-
* Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
|
|
267
|
-
*/
|
|
268
|
-
FunctionCallingConfigMode["NONE"] = "NONE";
|
|
269
|
-
/**
|
|
270
|
-
* Model is constrained to predict either function calls or natural language response. 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".
|
|
271
|
-
*/
|
|
272
|
-
FunctionCallingConfigMode["VALIDATED"] = "VALIDATED";
|
|
273
|
-
})(FunctionCallingConfigMode || (FunctionCallingConfigMode = {}));
|
|
274
250
|
/** The number of thoughts tokens that the model should generate. */
|
|
275
251
|
var ThinkingLevel;
|
|
276
252
|
(function (ThinkingLevel) {
|
|
@@ -419,6 +395,30 @@ var HarmBlockThreshold;
|
|
|
419
395
|
*/
|
|
420
396
|
HarmBlockThreshold["OFF"] = "OFF";
|
|
421
397
|
})(HarmBlockThreshold || (HarmBlockThreshold = {}));
|
|
398
|
+
/** Function calling mode. */
|
|
399
|
+
var FunctionCallingConfigMode;
|
|
400
|
+
(function (FunctionCallingConfigMode) {
|
|
401
|
+
/**
|
|
402
|
+
* Unspecified function calling mode. This value should not be used.
|
|
403
|
+
*/
|
|
404
|
+
FunctionCallingConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
|
|
405
|
+
/**
|
|
406
|
+
* Default model behavior, model decides to predict either function calls or natural language response.
|
|
407
|
+
*/
|
|
408
|
+
FunctionCallingConfigMode["AUTO"] = "AUTO";
|
|
409
|
+
/**
|
|
410
|
+
* 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".
|
|
411
|
+
*/
|
|
412
|
+
FunctionCallingConfigMode["ANY"] = "ANY";
|
|
413
|
+
/**
|
|
414
|
+
* Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
|
|
415
|
+
*/
|
|
416
|
+
FunctionCallingConfigMode["NONE"] = "NONE";
|
|
417
|
+
/**
|
|
418
|
+
* Model is constrained to predict either function calls or natural language response. 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".
|
|
419
|
+
*/
|
|
420
|
+
FunctionCallingConfigMode["VALIDATED"] = "VALIDATED";
|
|
421
|
+
})(FunctionCallingConfigMode || (FunctionCallingConfigMode = {}));
|
|
422
422
|
/** Output only. The reason why the model stopped generating tokens.
|
|
423
423
|
|
|
424
424
|
If empty, the model has not stopped generating the tokens. */
|
|
@@ -1252,6 +1252,10 @@ var TuningMethod;
|
|
|
1252
1252
|
* Distillation tuning.
|
|
1253
1253
|
*/
|
|
1254
1254
|
TuningMethod["DISTILLATION"] = "DISTILLATION";
|
|
1255
|
+
/**
|
|
1256
|
+
* Reinforcement tuning.
|
|
1257
|
+
*/
|
|
1258
|
+
TuningMethod["REINFORCEMENT_TUNING"] = "REINFORCEMENT_TUNING";
|
|
1255
1259
|
})(TuningMethod || (TuningMethod = {}));
|
|
1256
1260
|
/** State for the lifecycle of a File. */
|
|
1257
1261
|
var FileState;
|