-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f818eb
commit f3683f7
Showing
1 changed file
with
6 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import { countTokens } from '#llm/tokens'; | ||
|
||
// node_modules is read-only for the sophia user in prod, so download in the docker build | ||
countTokens('hi').catch((err) => { | ||
console.error('Failed to download tiktoken model'); | ||
console.error(err); | ||
}).finally(() => console.log('Done')); | ||
countTokens('hi') | ||
.catch((err) => { | ||
console.error('Failed to download tiktoken model'); | ||
console.error(err); | ||
}) | ||
.finally(() => console.log('Done')); |