Spaces:
Running
Running
File size: 555 Bytes
b39afbe |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
/**
* Copyright (c) 2023 MERCENARIES.AI PTE. LTD.
* All rights reserved.
*/
//@ts-check
class Tokenizer {
// @ts-ignore
constructor(params = null) {}
// @ts-ignore
encodeText(text) {
throw new Error('You have to implement the method: encode');
}
// @ts-ignore
textIsWithinTokenLimit(text, token_limit) {
throw new Error('You have to implement the method: isWithinTokenLimit');
}
// @ts-ignore
countTextTokens(text) {
throw new Error('You have to implement the method: countTextTokens');
}
}
export { Tokenizer };
|