Skip to content

Commit d4e843e

Browse files
committed
Move InferenceMode doc comment to be on top of type
1 parent 7fd62c4 commit d4e843e

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

docs-devsite/ai.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,8 @@ export type ImagenSafetyFilterLevel = (typeof ImagenSafetyFilterLevel)[keyof typ
863863

864864
<b>(EXPERIMENTAL)</b> Determines whether inference happens on-device or in-cloud.
865865

866+
<b>PREFER\_ON\_DEVICE:</b> Attempt to make inference calls on-device. If on-device inference is not available, it will fall back to cloud. <br/> <b>ONLY\_ON\_DEVICE:</b> Only attempt to make inference calls on-device. It will not fall back to cloud. If on-device inference is not available, inference methods will throw. <br/> <b>ONLY\_IN\_CLOUD:</b> Only attempt to make inference calls to the cloud. It will not fall back to on-device. <br/> <b>PREFER\_IN\_CLOUD:</b> Attempt to make inference calls to the cloud. If not available, it will fall back to on-device.
867+
866868
<b>Signature:</b>
867869

868870
```typescript

packages/ai/src/types/enums.ts

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -350,32 +350,29 @@ 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-
*/
357353
'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-
*/
363354
'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-
*/
368355
'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-
*/
373356
'PREFER_IN_CLOUD': 'prefer_in_cloud'
374357
} as const;
375358

376359
/**
377360
* <b>(EXPERIMENTAL)</b>
378361
* Determines whether inference happens on-device or in-cloud.
362+
* @remarks
363+
* <b>PREFER_ON_DEVICE:</b> Attempt to make inference calls on-device.
364+
* If on-device inference is not available, it will fall back to cloud.
365+
* <br/>
366+
* <b>ONLY_ON_DEVICE:</b> Only attempt to make inference calls on-device.
367+
* It will not fall back to cloud. If on-device inference is not available,
368+
* inference methods will throw.
369+
* <br/>
370+
* <b>ONLY_IN_CLOUD:</b> Only attempt to make inference calls to the cloud.
371+
* It will not fall back to on-device.
372+
* <br/>
373+
* <b>PREFER_IN_CLOUD:</b> Attempt to make inference calls to the cloud.
374+
* If not available, it will fall back to on-device.
375+
*
379376
* @public
380377
*/
381378
export type InferenceMode = (typeof InferenceMode)[keyof typeof InferenceMode];

0 commit comments

Comments
 (0)