/** * Translator Registry — 参考 OmniRoute open-sse/translator/registry.ts * * 请求转换器: (model, body, stream?, credentials?) => unknown * 响应转换器: (chunk, state) => unknown[] */ export type RequestTranslator = (model: string, body: Record, stream?: boolean, credentials?: Record | null) => unknown; export type ResponseTranslator = (chunk: Record, state: Record) => unknown[] | null; /** 注册一对格式的转换器 */ export declare function register(from: string, to: string, requestFn?: RequestTranslator | null, responseFn?: ResponseTranslator | null): void; /** 获取请求转换器 */ export declare function getRequestTranslator(from: string, to: string): RequestTranslator | undefined; /** 获取响应转换器 */ export declare function getResponseTranslator(from: string, to: string): ResponseTranslator | undefined; /** 判断是否需要转换 */ export declare function needsTranslation(from: string, to: string): boolean; //# sourceMappingURL=registry.d.ts.map