Skip to content

Commit 0aadd2e

Browse files
committed
format
1 parent 36deac4 commit 0aadd2e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

packages/ai/src/methods/count-tokens.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ export async function countTokens(
6161
chromeAdapter?: ChromeAdapter,
6262
requestOptions?: RequestOptions
6363
): Promise<CountTokensResponse> {
64-
if ((chromeAdapter as ChromeAdapterImpl)?.mode === InferenceMode.ONLY_ON_DEVICE) {
64+
if (
65+
(chromeAdapter as ChromeAdapterImpl)?.mode === InferenceMode.ONLY_ON_DEVICE
66+
) {
6567
throw new AIError(
6668
AIErrorCode.UNSUPPORTED,
6769
'countTokens() is not supported for on-device models.'

packages/ai/src/methods/helpers.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818
import { use, expect } from 'chai';
1919
import { SinonStub, SinonStubbedInstance, restore, stub } from 'sinon';
2020
import { callCloudOrDevice } from './helpers';
21-
import {
22-
GenerateContentRequest,
23-
InferenceMode,
24-
AIErrorCode
25-
} from '../types';
21+
import { GenerateContentRequest, InferenceMode, AIErrorCode } from '../types';
2622
import { AIError } from '../errors';
2723
import sinonChai from 'sinon-chai';
2824
import chaiAsPromised from 'chai-as-promised';

0 commit comments

Comments
 (0)