-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: update to reflect new behavior (renderer no longer accounts for…
… base tokens per completions) (#56)
- Loading branch information
Showing
6 changed files
with
51 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation and GitHub. All rights reserved. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import * as fs from 'fs'; | ||
import * as path from 'path'; | ||
|
||
const REPO_ROOT = path.join(__dirname, '..'); | ||
|
||
export async function copyStaticAssets(srcpaths: string[], dst: string): Promise<void> { | ||
await Promise.all(srcpaths.map(async srcpath => { | ||
const src = path.join(REPO_ROOT, srcpath); | ||
const dest = path.join(REPO_ROOT, dst, path.basename(srcpath)); | ||
await fs.promises.mkdir(path.dirname(dest), { recursive: true }); | ||
await fs.promises.copyFile(src, dest); | ||
})); | ||
} | ||
|
||
async function main() { | ||
// Ship the tiktoken file in the dist bundle | ||
await copyStaticAssets([ | ||
'src/base/tokenizer/cl100k_base.tiktoken', | ||
], 'dist/base/tokenizer'); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters