MCPcopy
hub / github.com/continuedev/continue / AsyncEncoder

Interface AsyncEncoder

core/llm/asyncEncoder.ts:5–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import workerpool from "workerpool";
4
5export interface AsyncEncoder {
6 encode(text: string): Promise<number[]>;
7 decode(tokens: number[]): Promise<string>;
8 close(): Promise<void>;
9}
10
11export class LlamaAsyncEncoder implements AsyncEncoder {
12 private workerPool: workerpool.Pool;

Callers 24

startFunction · 0.65
encodeMethod · 0.65
encodeMethod · 0.65
countTokensAsyncFunction · 0.65
countTokensFunction · 0.65
countFunction · 0.65
pruneStringFromBottomFunction · 0.65
pruneStringFromTopFunction · 0.65
streamResponseFunction · 0.65
__init__Method · 0.65
response_deserializeMethod · 0.65

Implementers 3

LlamaAsyncEncodercore/llm/asyncEncoder.ts
GPTAsyncEncodercore/llm/asyncEncoder.ts
NonWorkerAsyncEncodercore/llm/countTokens.ts

Calls

no outgoing calls

Tested by

no test coverage detected