Skip to content

Commit

Permalink
Merge pull request #67 from microsoft/joh/continued-rhinoceros
Browse files Browse the repository at this point in the history
more `_serviceBrand` removal
  • Loading branch information
jrieken authored Jul 2, 2024
2 parents 3dd3b42 + 447f91d commit d25770f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion src/base/test/elements.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
suite('PromptElements', () => {
suite('TextChunk', () => {
const tokenizer = new class TokenPerWordTokenizer implements ITokenizer {
_serviceBrand: undefined;
baseTokensPerMessage = 0;
baseTokensPerName = 0;
baseTokensPerCompletion = 0;
Expand Down
3 changes: 1 addition & 2 deletions src/base/test/renderer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ suite('PromptRenderer', () => {
"This late pivot means we don't have time to boil the ocean for the client deliverable.",
},
]);
assert.deepStrictEqual(res.tokenCount, 129 - BaseTokensPerCompletion);
assert.deepStrictEqual(res.tokenCount, 129 - BaseTokensPerCompletion);
});

test('runs async prepare in parallel', async () => {
Expand Down Expand Up @@ -910,7 +910,6 @@ LOW MED 00 01 02 03 04 05 06 07 08 09
const consumeRe = /consume=(\d+)/g;

class FakeTokenizer implements ITokenizer {
_serviceBrand: undefined;
baseTokensPerMessage = 0;
baseTokensPerName = 0;
baseTokensPerCompletion = 0;
Expand Down
1 change: 0 additions & 1 deletion src/base/tokenizer/cl100kBaseTokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { ITokenizer } from './tokenizer';
* See https://github.com/microsoft/Tokenizer
*/
export class Cl100KBaseTokenizer implements ITokenizer {
declare readonly _serviceBrand: undefined;
private _cl100kTokenizer: TikTokenizer | undefined;

public readonly models = ['gpt-4', 'gpt-3.5-turbo', 'text-embedding-ada-002'];
Expand Down
1 change: 0 additions & 1 deletion src/base/tokenizer/tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export interface ITokenizer {
}

export class AnyTokenizer implements ITokenizer {
_serviceBrand: undefined;

constructor(private countTokens: (text: string | LanguageModelChatMessage, token?: CancellationToken) => Thenable<number>) { }

Expand Down

0 comments on commit d25770f

Please sign in to comment.