Skip to content

Commit ad5d194

Browse files
authored
fix(genai): resolve module path and naming issues in count-tokens samples (#4321)
* fix(genai): resolve module path and naming issues in count-tokens samples * style: ensure consistent .js extension in require statements
1 parent 93f3522 commit ad5d194

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

genai/count-tokens/test/counttoken-localtokenizer-compute-with-txt.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ const {assert} = require('chai');
1818
const {describe, it} = require('mocha');
1919

2020
const projectId = process.env.CAIP_PROJECT_ID;
21-
const sample = require('../counttoken-localtokenizer-compute-with-txt.js');
21+
const sample = require('../counttoken-compute-with-txt.js');
2222
const {delay} = require('../../test/util');
2323

2424
describe('counttoken-localtokenizer-compute-with-txt', () => {
2525
it('should return tokensInfo from text prompt', async function () {
2626
this.timeout(18000);
2727
this.retries(4);
2828
await delay(this.test);
29-
const output = await sample.countTokenLocalTokenizerCompute(projectId);
29+
const output = await sample.countTokens(projectId);
3030
assert(output.length > 0);
3131
});
3232
});

genai/count-tokens/test/counttoken-localtokenizer-with-txt.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ const {assert} = require('chai');
1818
const {describe, it} = require('mocha');
1919

2020
const projectId = process.env.CAIP_PROJECT_ID;
21-
const sample = require('../counttoken-localtokenizer-with-txt.js');
21+
const sample = require('../counttoken-with-txt.js');
2222
const {delay} = require('../../test/util');
2323

2424
describe('counttoken-localtokenizer-with-txt', () => {
2525
it('should return totalTokens from text prompt', async function () {
2626
this.timeout(18000);
2727
this.retries(4);
2828
await delay(this.test);
29-
const output = await sample.countTokenLocalTokenizer(projectId);
29+
const output = await sample.countTokens(projectId);
3030
assert(output > 0);
3131
});
3232
});

0 commit comments

Comments
 (0)