export declare enum PvStatus {
    SUCCESS = 10000,
    OUT_OF_MEMORY = 10001,
    IO_ERROR = 10002,
    INVALID_ARGUMENT = 10003,
    STOP_ITERATION = 10004,
    KEY_ERROR = 10005,
    INVALID_STATE = 10006,
    RUNTIME_ERROR = 10007,
    ACTIVATION_ERROR = 10008,
    ACTIVATION_LIMIT_REACHED = 10009,
    ACTIVATION_THROTTLED = 10010,
    ACTIVATION_REFUSED = 10011
}
export declare enum PicoLLMEndpoint {
    END_OF_SENTENCE = 0,
    COMPLETION_TOKEN_LIMIT_REACHED = 1,
    STOP_PHRASE_ENCOUNTERED = 2,
    INTERRUPTED = 3
}
export type PicoLLMModel = {
    modelFile: string | File | Blob | (string | File | Blob)[];
    cacheFilePath?: string;
    cacheFileVersion?: number;
    cacheFileOverwrite?: boolean;
    numFetchRetries?: number;
};
export type PicoLLMInitOptions = {
    device?: string;
};
export type PicoLLMGenerateOptions = {
    completionTokenLimit?: number;
    stopPhrases?: string[];
    seed?: number;
    presencePenalty?: number;
    frequencyPenalty?: number;
    temperature?: number;
    topP?: number;
    numTopChoices?: number;
    streamCallback?: (token: string) => void;
};
export type PicoLLMImage = {
    data: Uint8Array;
    width: number;
    height: number;
};
export type PicoLLMGenerateWithImageOptions = PicoLLMGenerateOptions & {
    promptProgressCallback?: (progress: number) => void;
};
export type PicoLLMGenerateOCROptions = {
    completionTokenLimit?: number;
    streamCallback?: (token: string) => void;
    promptProgressCallback?: (progress: number) => void;
};
export type PicoLLMUsage = {
    promptTokens: number;
    completionTokens: number;
};
export type PicoLLMToken = {
    token: string;
    logProb: number;
};
export type PicoLLMCompletionToken = {
    token: PicoLLMToken;
    topChoices: PicoLLMToken[];
};
export type PicoLLMCompletion = {
    usage?: PicoLLMUsage;
    endpoint: PicoLLMEndpoint;
    completionTokens?: PicoLLMCompletionToken[];
    completion: string;
};
export type PicoLLMEmbeddingsCompletion = {
    embeddings: number[];
};
export type PicoLLMWorkerInitRequest = {
    command: 'init';
    accessKey: string;
    modelPath: string;
    options: PicoLLMInitOptions;
    wasmPThread: string;
    wasmPThreadLib: string;
    sdk: string;
};
export type PicoLLMWorkerGenerateRequest = {
    command: 'generate';
    prompt: string;
    options: PicoLLMGenerateOptions;
};
export type PicoLLMWorkerGenerateWithImageRequest = {
    command: 'generateWithImage';
    prompt: string;
    image: PicoLLMImage;
    options: PicoLLMGenerateWithImageOptions;
};
export type PicoLLMWorkerGenerateEmbeddingsRequest = {
    command: 'generateEmbeddings';
    prompt: string;
};
export type PicoLLMWorkerGenerateOCRRequest = {
    command: 'generateOCR';
    image: PicoLLMImage;
    options: PicoLLMGenerateOCROptions;
};
export type PicoLLMWorkerInterruptRequest = {
    command: 'interrupt';
};
export type PicoLLMWorkerTokenizeRequest = {
    command: 'tokenize';
    text: string;
    bos: boolean;
    eos: boolean;
};
export type PicoLLMWorkerForwardRequest = {
    command: 'forward';
    token: number;
};
export type PicoLLMWorkerResetRequest = {
    command: 'reset';
};
export type PicoLLMWorkerReleaseRequest = {
    command: 'release';
};
export type PicoLLMWorkerRequest = PicoLLMWorkerInitRequest | PicoLLMWorkerGenerateRequest | PicoLLMWorkerGenerateWithImageRequest | PicoLLMWorkerGenerateEmbeddingsRequest | PicoLLMWorkerGenerateOCRRequest | PicoLLMWorkerInterruptRequest | PicoLLMWorkerTokenizeRequest | PicoLLMWorkerForwardRequest | PicoLLMWorkerResetRequest | PicoLLMWorkerReleaseRequest;
export type PicoLLMWorkerFailureResponse = {
    command: 'failed' | 'error';
    status: PvStatus;
    shortMessage: string;
    messageStack: string[];
};
export type PicoLLMWorkerInitResponse = PicoLLMWorkerFailureResponse | {
    command: 'ok';
    contextLength: number;
    maxTopChoices: number;
    model: string;
    version: string;
};
export type PicoLLMWorkerGenerateResponse = PicoLLMWorkerFailureResponse | {
    command: 'ok';
    completion: PicoLLMCompletion;
} | {
    command: 'stream';
    token: string;
};
export type PicoLLMWorkerGenerateWithImageResponse = PicoLLMWorkerGenerateResponse | {
    command: 'progress';
    progress: number;
};
export type PicoLLMWorkerGenerateEmbeddingsResponse = PicoLLMWorkerFailureResponse | {
    command: 'ok';
    embeddings: PicoLLMEmbeddingsCompletion;
};
export type PicoLLMWorkerGenerateOCRResponse = PicoLLMWorkerGenerateResponse | {
    command: 'progress';
    progress: number;
};
export type PicoLLMWorkerTokenizeResponse = PicoLLMWorkerFailureResponse | {
    command: 'ok';
    tokens: number[];
};
export type PicoLLMWorkerForwardResponse = PicoLLMWorkerFailureResponse | {
    command: 'ok';
    logits: number[];
};
export type PicoLLMWorkerResetResponse = PicoLLMWorkerFailureResponse | {
    command: 'ok';
};
export type PicoLLMWorkerReleaseResponse = PicoLLMWorkerFailureResponse | {
    command: 'ok';
};
export type PicoLLMWorkerResponse = PicoLLMWorkerInitResponse | PicoLLMWorkerGenerateResponse | PicoLLMWorkerGenerateWithImageResponse | PicoLLMWorkerGenerateEmbeddingsResponse | PicoLLMWorkerGenerateOCRResponse | PicoLLMWorkerTokenizeResponse | PicoLLMWorkerForwardResponse | PicoLLMWorkerResetResponse | PicoLLMWorkerReleaseResponse;
//# sourceMappingURL=types.d.ts.map