Skip to content

Commit 78b803d

Browse files
committed
fix: use extensions in models.ts
fixes #65
1 parent f2f2663 commit 78b803d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.config/beemo/typescript.ts

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ const config: TypeScriptConfig & {
66
compilerOptions: {
77
allowJs: true,
88
verbatimModuleSyntax: true,
9+
module: 'nodenext',
10+
moduleResolution: 'nodenext',
911
},
1012
include: ['src'],
1113
}

src/codegen/generateJsBpe.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ await processFilesInDirectory(
119119
await fs.writeFile(
120120
path.join(__dirname, `../bpeRanks/${modelName}.js`),
121121
`/* eslint-disable */\n// @ts-nocheck\n// prettier-ignore
122-
/** @type {(string | number[])[]} */
123122
${jsCodeConstsForEachChunk.join('\n')}
123+
/** @type {(string | number[])[]} */
124124
const bpe = ${jsCodeBpeArray};
125125
${jsCodeToResetHelperArrays.join('\n')}
126126
export default bpe;`,

src/models.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { EncodingName } from './mapping'
1+
import type { EncodingName } from './mapping.js'
22

33
// this data is compiled from:
44
// - https://platform.openai.com/docs/models/

0 commit comments

Comments
 (0)