We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65de23c commit 205a25bCopy full SHA for 205a25b
packages/ai/src/methods/chrome-adapter.ts
@@ -68,7 +68,13 @@ export class ChromeAdapter {
68
* separation of concerns.</p>
69
*/
70
async isAvailable(request: GenerateContentRequest): Promise<boolean> {
71
- if (!this.mode || this.mode === 'only_in_cloud') {
+ if (!this.mode) {
72
+ logger.debug(
73
+ `On-device inference unavailable because mode is undefined.`
74
+ );
75
+ return false;
76
+ }
77
+ if (this.mode === 'only_in_cloud') {
78
logger.debug(
79
`On-device inference unavailable because mode is "only_in_cloud".`
80
);
0 commit comments