/** * See the registered mapping of HF model ID => ZAI model ID here: * * https://huggingface.co/api/partners/zai-org/models * * This is a publicly available mapping. * * If you want to try to run inference for a new model locally before it's registered on huggingface.co, * you can add it to the dictionary "HARDCODED_MODEL_ID_MAPPING" in consts.ts, for dev purposes. * * - If you work at zai and want to update this mapping, please use the model mapping API we provide on huggingface.co * - If you're a community member and want to add a new supported HF model to zai, please open an issue on the present repo * and we will tag zai team members. * * Thanks! */ import type { ImageToTextOutput } from "@huggingface/tasks"; import type { BodyParams, HeaderParams, OutputType, RequestArgs } from "../types.js"; import type { ImageToTextArgs } from "../tasks/cv/imageToText.js"; import { BaseConversationalTask, TaskProviderHelper, type ImageToTextTaskHelper, type TextToImageTaskHelper } from "./providerHelper.js"; declare abstract class ZaiTask extends TaskProviderHelper { constructor(); prepareHeaders(params: HeaderParams, binary: boolean): Record; } export declare class ZaiConversationalTask extends BaseConversationalTask { constructor(); prepareHeaders(params: HeaderParams, binary: boolean): Record; makeRoute(): string; } interface ZaiTextToImageResponse { model: string; id: string; request_id: string; task_status: "PROCESSING" | "SUCCESS" | "FAIL"; } export declare class ZaiTextToImageTask extends ZaiTask implements TextToImageTaskHelper { makeRoute(): string; preparePayload(params: BodyParams): Record; getResponse(response: ZaiTextToImageResponse, url?: string, headers?: Record, outputType?: OutputType, signal?: AbortSignal): Promise>; } interface ZaiLayoutParsingResponse { md_results?: string; } export declare class ZaiImageToTextTask extends ZaiTask implements ImageToTextTaskHelper { makeRoute(): string; preparePayloadAsync(args: ImageToTextArgs, signal?: AbortSignal): Promise; preparePayload(params: BodyParams): Record; getResponse(response: ZaiLayoutParsingResponse): Promise; } export {}; //# sourceMappingURL=zai-org.d.ts.map