Skip to content

Commit cb88d70

Browse files
committed
Document HybridParams and InferenceMode
1 parent 10f99a7 commit cb88d70

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

common/api-review/vertexai.api.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -502,13 +502,9 @@ export interface ImagenSafetySettings {
502502

503503
// @public
504504
export interface HybridParams {
505-
// (undocumented)
506505
mode?: InferenceMode;
507-
// (undocumented)
508506
onCloudParams?: ModelParams;
509507
// Warning: (ae-forgotten-export) The symbol "AILanguageModelCreateOptionsWithSystemPrompt" needs to be exported by the entry point index.d.ts
510-
//
511-
// (undocumented)
512508
onDeviceParams?: AILanguageModelCreateOptionsWithSystemPrompt;
513509
}
514510

packages/vertexai/src/types/enums.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,10 @@ export enum Modality {
246246
* @public
247247
*/
248248
export enum InferenceMode {
249+
// Specifies the SDK should use on-device if possible, or fall back to on-cloud.
249250
PREFER_ON_DEVICE = 'PREFER_ON_DEVICE',
251+
// Specifies the SDK must use on-device or throw.
250252
ONLY_ON_DEVICE = 'ONLY_ON_DEVICE',
253+
// Specifies the SDK must use on-cloud.
251254
ONLY_ON_CLOUD = 'ONLY_ON_CLOUD'
252255
}

packages/vertexai/src/types/requests.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,16 @@ export interface FunctionCallingConfig {
221221
* @public
222222
*/
223223
export interface HybridParams {
224+
/**
225+
* Optional. Specifies on-device or on-cloud inference. Defaults to prefer on-device.
226+
*/
224227
mode?: InferenceMode;
228+
/**
229+
* Optional. Specifies advanced params for on-device inference
230+
*/
225231
onDeviceParams?: AILanguageModelCreateOptionsWithSystemPrompt;
232+
/**
233+
* Optional. Specifies advanced params for on-cloud inference.
234+
*/
226235
onCloudParams?: ModelParams;
227236
}

0 commit comments

Comments
 (0)