For backward compatibility only.
↳ HfInference
• new HfInference(accessToken?, defaultOptions?): HfInference
| Name | Type | Default value |
|---|---|---|
accessToken | string | "" |
defaultOptions | Options | {} |
inference/src/InferenceClient.ts:28
• audioClassification: (args: { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {}, options?: Options) => Promise\<AudioClassificationOutput>
▸ (args, options?): Promise\<AudioClassificationOutput>
| Name | Type |
|---|---|
args | { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {} |
options? | Options |
Promise\<AudioClassificationOutput>
InferenceClient.audioClassification
inference/src/tasks/audio/audioClassification.ts:14
• audioToAudio: (args: { data: Blob | ArrayBuffer } | { endpointUrl?: string ; inputs: Blob ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" }, options?: Options) => Promise\<AudioToAudioOutput[]>
▸ (args, options?): Promise\<AudioToAudioOutput[]>
| Name | Type |
|---|---|
args | { data: Blob | ArrayBuffer } | { endpointUrl?: string ; inputs: Blob ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } |
options? | Options |
Promise\<AudioToAudioOutput[]>
inference/src/tasks/audio/audioToAudio.ts:38
• automaticSpeechRecognition: (args: { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {}, options?: Options) => Promise\<AutomaticSpeechRecognitionOutput>
▸ (args, options?): Promise\<AutomaticSpeechRecognitionOutput>
| Name | Type |
|---|---|
args | { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {} |
options? | Options |
Promise\<AutomaticSpeechRecognitionOutput>
InferenceClient.automaticSpeechRecognition
inference/src/tasks/audio/automaticSpeechRecognition.ts:15
• chatCompletion: (args: {}, options?: Options) => Promise\<ChatCompletionOutput>
▸ (args, options?): Promise\<ChatCompletionOutput>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<ChatCompletionOutput>
InferenceClient.chatCompletion
inference/src/tasks/nlp/chatCompletion.ts:9
• chatCompletionStream: (args: {}, options?: Options) => AsyncGenerator\<ChatCompletionStreamOutput, any, unknown>
▸ (args, options?): AsyncGenerator\<ChatCompletionStreamOutput, any, unknown>
| Name | Type |
|---|---|
args | Object |
options? | Options |
AsyncGenerator\<ChatCompletionStreamOutput, any, unknown>
InferenceClient.chatCompletionStream
inference/src/tasks/nlp/chatCompletionStream.ts:8
• documentQuestionAnswering: (args: {}, options?: Options) => Promise\<DocumentQuestionAnsweringOutputElement>
▸ (args, options?): Promise\<DocumentQuestionAnsweringOutputElement>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<DocumentQuestionAnsweringOutputElement>
InferenceClient.documentQuestionAnswering
inference/src/tasks/multimodal/documentQuestionAnswering.ts:20
• featureExtraction: (args: {}, options?: Options) => Promise\<FeatureExtractionOutput>
▸ (args, options?): Promise\<FeatureExtractionOutput>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<FeatureExtractionOutput>
InferenceClient.featureExtraction
inference/src/tasks/nlp/featureExtraction.ts:16
• fillMask: (args: {}, options?: Options) => Promise\<FillMaskOutput>
▸ (args, options?): Promise\<FillMaskOutput>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<FillMaskOutput>
inference/src/tasks/nlp/fillMask.ts:11
• imageClassification: (args: { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {}, options?: Options) => Promise\<ImageClassificationOutput>
▸ (args, options?): Promise\<ImageClassificationOutput>
| Name | Type |
|---|---|
args | { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {} |
options? | Options |
Promise\<ImageClassificationOutput>
InferenceClient.imageClassification
inference/src/tasks/cv/imageClassification.ts:13
• imageSegmentation: (args: { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {}, options?: Options) => Promise\<ImageSegmentationOutput>
▸ (args, options?): Promise\<ImageSegmentationOutput>
| Name | Type |
|---|---|
args | { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {} |
options? | Options |
Promise\<ImageSegmentationOutput>
InferenceClient.imageSegmentation
inference/src/tasks/cv/imageSegmentation.ts:13
• imageToImage: (args: {}, options?: Options) => Promise\<Blob>
▸ (args, options?): Promise\<Blob>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<Blob>
inference/src/tasks/cv/imageToImage.ts:13
• imageToText: (args: { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {}, options?: Options) => Promise\<ImageToTextOutput>
▸ (args, options?): Promise\<ImageToTextOutput>
| Name | Type |
|---|---|
args | { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {} |
options? | Options |
Promise\<ImageToTextOutput>
inference/src/tasks/cv/imageToText.ts:12
• objectDetection: (args: { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {}, options?: Options) => Promise\<ObjectDetectionOutput>
▸ (args, options?): Promise\<ObjectDetectionOutput>
| Name | Type |
|---|---|
args | { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {} |
options? | Options |
Promise\<ObjectDetectionOutput>
InferenceClient.objectDetection
inference/src/tasks/cv/objectDetection.ts:13
• questionAnswering: (args: {}, options?: Options) => Promise\<QuestionAnsweringOutputElement>
▸ (args, options?): Promise\<QuestionAnsweringOutputElement>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<QuestionAnsweringOutputElement>
InferenceClient.questionAnswering
inference/src/tasks/nlp/questionAnswering.ts:11
• request: (args: { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | { endpointUrl?: string ; inputs: unknown ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | { endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; prompt: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | { endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" ; text: string } | { audio_url: string ; endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {}, options?: Options & { chatCompletion?: boolean ; task?: InferenceTask }) => Promise\<unknown>
▸ (args, options?): Promise\<unknown>
| Name | Type |
|---|---|
args | { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | { endpointUrl?: string ; inputs: unknown ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | { endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; prompt: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | { endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" ; text: string } | { audio_url: string ; endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {} |
options? | Options & { chatCompletion?: boolean ; task?: InferenceTask } |
Promise\<unknown>
inference/src/tasks/custom/request.ts:7
• sentenceSimilarity: (args: {}, options?: Options) => Promise\<SentenceSimilarityOutput>
▸ (args, options?): Promise\<SentenceSimilarityOutput>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<SentenceSimilarityOutput>
InferenceClient.sentenceSimilarity
inference/src/tasks/nlp/sentenceSimilarity.ts:12
• streamingRequest: (args: { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | { endpointUrl?: string ; inputs: unknown ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | { endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; prompt: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | { endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" ; text: string } | { audio_url: string ; endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {}, options?: Options & { chatCompletion?: boolean ; task?: InferenceTask }) => AsyncGenerator\<unknown, any, unknown>
▸ (args, options?): AsyncGenerator\<unknown, any, unknown>
| Name | Type |
|---|---|
args | { data: Blob | ArrayBuffer ; endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | { endpointUrl?: string ; inputs: unknown ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | { endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; prompt: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | { endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" ; text: string } | { audio_url: string ; endpointUrl?: string ; model?: string ; parameters?: Record\<string, unknown> ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {} |
options? | Options & { chatCompletion?: boolean ; task?: InferenceTask } |
AsyncGenerator\<unknown, any, unknown>
InferenceClient.streamingRequest
inference/src/tasks/custom/streamingRequest.ts:9
• summarization: (args: {}, options?: Options) => Promise\<SummarizationOutput>
▸ (args, options?): Promise\<SummarizationOutput>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<SummarizationOutput>
inference/src/tasks/nlp/summarization.ts:11
• tableQuestionAnswering: (args: {}, options?: Options) => Promise\<TableQuestionAnsweringOutputElement>
▸ (args, options?): Promise\<TableQuestionAnsweringOutputElement>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<TableQuestionAnsweringOutputElement>
InferenceClient.tableQuestionAnswering
inference/src/tasks/nlp/tableQuestionAnswering.ts:11
• tabularClassification: (args: { endpointUrl?: string ; inputs: { data: Record\<string, string[]> } ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" }, options?: Options) => Promise\<TabularClassificationOutput>
▸ (args, options?): Promise\<TabularClassificationOutput>
| Name | Type | Description |
|---|---|---|
args | Object | - |
args.endpointUrl? | string | The URL of the endpoint to use. If not specified, will call huggingface.co/api/tasks to get the default endpoint for the task. If specified, will use this URL instead of the default one. |
args.inputs | Object | - |
args.inputs.data | Record\<string, string[]> | A table of data represented as a dict of list where entries are headers and the lists are all the values, all lists must have the same size. |
args.model? | string | The HF model to use. If not specified, will call huggingface.co/api/tasks to get the default model for the task. /!\ Legacy behavior allows this to be an URL, but this is deprecated and will be removed in the future. Use the endpointUrl parameter instead. |
args.provider? | "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" | Set an Inference provider to run this model on. Defaults to the first provider in your user settings that is compatible with this model. |
options? | Options | - |
Promise\<TabularClassificationOutput>
InferenceClient.tabularClassification
inference/src/tasks/tabular/tabularClassification.ts:24
• tabularRegression: (args: { endpointUrl?: string ; inputs: { data: Record\<string, string[]> } ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" }, options?: Options) => Promise\<TabularRegressionOutput>
▸ (args, options?): Promise\<TabularRegressionOutput>
| Name | Type | Description |
|---|---|---|
args | Object | - |
args.endpointUrl? | string | The URL of the endpoint to use. If not specified, will call huggingface.co/api/tasks to get the default endpoint for the task. If specified, will use this URL instead of the default one. |
args.inputs | Object | - |
args.inputs.data | Record\<string, string[]> | A table of data represented as a dict of list where entries are headers and the lists are all the values, all lists must have the same size. |
args.model? | string | The HF model to use. If not specified, will call huggingface.co/api/tasks to get the default model for the task. /!\ Legacy behavior allows this to be an URL, but this is deprecated and will be removed in the future. Use the endpointUrl parameter instead. |
args.provider? | "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" | Set an Inference provider to run this model on. Defaults to the first provider in your user settings that is compatible with this model. |
options? | Options | - |
Promise\<TabularRegressionOutput>
InferenceClient.tabularRegression
inference/src/tasks/tabular/tabularRegression.ts:24
• textClassification: (args: {}, options?: Options) => Promise\<TextClassificationOutput>
▸ (args, options?): Promise\<TextClassificationOutput>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<TextClassificationOutput>
InferenceClient.textClassification
inference/src/tasks/nlp/textClassification.ts:11
• textGeneration: (args: {}, options?: Options) => Promise\<TextGenerationOutput>
▸ (args, options?): Promise\<TextGenerationOutput>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<TextGenerationOutput>
InferenceClient.textGeneration
inference/src/tasks/nlp/textGeneration.ts:34
• textGenerationStream: (args: {}, options?: Options) => AsyncGenerator\<TextGenerationStreamOutput, any, unknown>
▸ (args, options?): AsyncGenerator\<TextGenerationStreamOutput, any, unknown>
| Name | Type |
|---|---|
args | Object |
options? | Options |
AsyncGenerator\<TextGenerationStreamOutput, any, unknown>
InferenceClient.textGenerationStream
inference/src/tasks/nlp/textGenerationStream.ts:88
• textToImage: (args: {}, options?: TextToImageOptions & { outputType?: "blob" }) => Promise\<Blob>
▸ (args, options?): Promise\<Blob>
| Name | Type |
|---|---|
args | Object |
options? | TextToImageOptions & { outputType?: "blob" } |
Promise\<Blob>
inference/src/tasks/cv/textToImage.ts:50
inference/src/tasks/cv/textToImage.ts:54
inference/src/tasks/cv/textToImage.ts:58
• textToSpeech: (args: {}, options?: Options) => Promise\<Blob>
▸ (args, options?): Promise\<Blob>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<Blob>
inference/src/tasks/audio/textToSpeech.ts:15
• textToVideo: (args: {}, options?: Options) => Promise\<Blob>
▸ (args, options?): Promise\<Blob>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<Blob>
inference/src/tasks/cv/textToVideo.ts:27
• tokenClassification: (args: {}, options?: Options) => Promise\<TokenClassificationOutput>
▸ (args, options?): Promise\<TokenClassificationOutput>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<TokenClassificationOutput>
InferenceClient.tokenClassification
inference/src/tasks/nlp/tokenClassification.ts:12
• translation: (args: {}, options?: Options) => Promise\<TranslationOutput>
▸ (args, options?): Promise\<TranslationOutput>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<TranslationOutput>
inference/src/tasks/nlp/translation.ts:10
• visualQuestionAnswering: (args: {}, options?: Options) => Promise\<VisualQuestionAnsweringOutputElement>
▸ (args, options?): Promise\<VisualQuestionAnsweringOutputElement>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<VisualQuestionAnsweringOutputElement>
InferenceClient.visualQuestionAnswering
inference/src/tasks/multimodal/visualQuestionAnswering.ts:18
• zeroShotClassification: (args: {}, options?: Options) => Promise\<ZeroShotClassificationOutput>
▸ (args, options?): Promise\<ZeroShotClassificationOutput>
| Name | Type |
|---|---|
args | Object |
options? | Options |
Promise\<ZeroShotClassificationOutput>
InferenceClient.zeroShotClassification
inference/src/tasks/nlp/zeroShotClassification.ts:12
• zeroShotImageClassification: (args: { endpointUrl?: string ; inputs: { image: Blob | ArrayBuffer } ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {}, options?: Options) => Promise\<ZeroShotImageClassificationOutput>
▸ (args, options?): Promise\<ZeroShotImageClassificationOutput>
| Name | Type |
|---|---|
args | { endpointUrl?: string ; inputs: { image: Blob | ArrayBuffer } ; model?: string ; provider?: "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" } | {} |
options? | Options |
Promise\<ZeroShotImageClassificationOutput>
InferenceClient.zeroShotImageClassification
inference/src/tasks/cv/zeroShotImageClassification.ts:44
▸ endpoint(endpointUrl): InferenceClientEndpoint
Returns copy of InferenceClient tied to a specified endpoint.
| Name | Type |
|---|---|
endpointUrl | string |
inference/src/InferenceClient.ts:45
< > Update on GitHub