Skip to content

Commit 7c4f837

Browse files
committed
Add doc comments on InferenceModes
1 parent 8c9c1c2 commit 7c4f837

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/ai/src/types/enums.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,26 @@ export type ResponseModality =
350350
* @public
351351
*/
352352
export const InferenceMode = {
353+
/**
354+
* Attempt to make inference calls on-device. If on-device
355+
* inference is not available, it will fall back to cloud.
356+
*/
353357
'PREFER_ON_DEVICE': 'prefer_on_device',
358+
/**
359+
* Only attempt to make inference calls on-device. It will not
360+
* fall back to cloud. If on-device inference is not available,
361+
* inference methods will throw.
362+
*/
354363
'ONLY_ON_DEVICE': 'only_on_device',
364+
/**
365+
* Only attempt to make inference calls to the cloud. It will not
366+
* fall back to on-device.
367+
*/
355368
'ONLY_IN_CLOUD': 'only_in_cloud',
369+
/**
370+
* Attempt to make inference calls to the cloud. If not available,
371+
* it will fall back to on-device.
372+
*/
356373
'PREFER_IN_CLOUD': 'prefer_in_cloud'
357374
} as const;
358375

0 commit comments

Comments
 (0)