/** * See the registered mapping of HF model ID => DeepInfra model ID here: * * https://huggingface.co/api/partners/deepinfra/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 DeepInfra 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 DeepInfra, please open an issue on the present repo * and we will tag DeepInfra team members. * * Thanks! */ import type { AutomaticSpeechRecognitionOutput, TextGenerationOutput } from "@huggingface/tasks"; import type { AutomaticSpeechRecognitionArgs } from "../tasks/audio/automaticSpeechRecognition.js"; import type { BodyParams, RequestArgs } from "../types.js"; import { type AutomaticSpeechRecognitionTaskHelper, BaseConversationalTask, BaseTextGenerationTask, TaskProviderHelper } from "./providerHelper.js"; interface DeepInfraCompletionChoice { text?: string; } interface DeepInfraCompletionResponse { choices: DeepInfraCompletionChoice[]; model: string; } interface DeepInfraAudioTranscriptionSegment { start: number; end: number; text: string; } interface DeepInfraAudioTranscriptionResponse { text: string; segments?: DeepInfraAudioTranscriptionSegment[]; } export declare class DeepInfraConversationalTask extends BaseConversationalTask { constructor(); makeRoute(): string; } export declare class DeepInfraTextGenerationTask extends BaseTextGenerationTask { constructor(); makeRoute(): string; preparePayload(params: BodyParams): Record; getResponse(response: DeepInfraCompletionResponse): Promise; } export declare class DeepInfraAutomaticSpeechRecognitionTask extends TaskProviderHelper implements AutomaticSpeechRecognitionTaskHelper { constructor(); makeRoute(): string; preparePayload(params: BodyParams): Record; makeBody(params: BodyParams): BodyInit; preparePayloadAsync(args: AutomaticSpeechRecognitionArgs): Promise; getResponse(response: DeepInfraAudioTranscriptionResponse): Promise; } export {}; //# sourceMappingURL=deepinfra.d.ts.map