import { z } from 'zod';
import { ReadableStream } from 'node:stream/web';
import type { ServiceContext, EventStream, Expand } from '../types';
export declare const schemas: {
    initContext: z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodAny>], null>;
    completion: z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodAny>], null>;
    tokenize: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
    detokenize: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
    applyChatTemplate: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
    releaseContext: z.ZodTuple<[z.ZodString], null>;
};
export interface Service {
    initContext: (ctx: ServiceContext, ...args: z.infer<typeof schemas.initContext>) => ReadableStream<Expand<EventStream>>;
    completion: (ctx: ServiceContext, ...args: z.infer<typeof schemas.completion>) => Promise<ReadableStream<Expand<EventStream>>>;
    tokenize: (ctx: ServiceContext, ...args: z.infer<typeof schemas.tokenize>) => Promise<any>;
    detokenize: (ctx: ServiceContext, ...args: z.infer<typeof schemas.detokenize>) => Promise<any>;
    applyChatTemplate: (ctx: ServiceContext, ...args: z.infer<typeof schemas.applyChatTemplate>) => Promise<any>;
    releaseContext: (ctx: ServiceContext, ...args: z.infer<typeof schemas.releaseContext>) => Promise<any>;
}
type GetBackend = (backend: any) => any;
export declare function createInitContext(getBackend: GetBackend): ({ backend, session }: ServiceContext, id: any, property: any) => ReadableStream<EventStream>;
export declare function createReleaseContext(getBackend: GetBackend, label: string): ({ backend, session }: ServiceContext, id: any, force: any) => Promise<any>;
export default function createLlmService(getBackend: GetBackend, label: string): Service;
export {};
