Huggingface.js 文档
类: InferenceClientEndpoint
并获得增强的文档体验
开始使用
类: InferenceClientEndpoint
继承关系
TaskWithNoAccessTokenNoEndpointUrl
↳
InferenceClientEndpoint
构造函数
构造函数
• new InferenceClientEndpoint(endpointUrl
, accessToken?
, defaultOptions?
): InferenceClientEndpoint
参数
名称 | 类型 | 默认值 |
---|---|---|
endpointUrl | string | undefined |
accessToken | string | "" |
defaultOptions | Options | {} |
返回值
定义于
inference/src/InferenceClient.ts:51
属性
audioClassification
• audioClassification: (args
: { data
: 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
<AudioClassificationOutput
>
类型声明
▸ (args
, options?
): Promise
<AudioClassificationOutput
>
参数
名称 | 类型 |
---|---|
args | { data : 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
<AudioClassificationOutput
>
定义于
inference/src/tasks/audio/audioClassification.ts:14
audioToAudio
• audioToAudio: (args
: { data
: Blob
| ArrayBuffer
} | { 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
[]>
参数
名称 | 类型 |
---|---|
args | { data : Blob | ArrayBuffer } | { 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
• automaticSpeechRecognition: (args
: { data
: 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
<AutomaticSpeechRecognitionOutput
>
类型声明
▸ (args
, options?
): Promise
<AutomaticSpeechRecognitionOutput
>
参数
名称 | 类型 |
---|---|
args | { data : 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
\<AutomaticSpeechRecognitionOutput
>
定义于
inference/src/tasks/audio/automaticSpeechRecognition.ts:15
chatCompletion
• chatCompletion: (args
: {}, options?
: Options
) => Promise
\<ChatCompletionOutput
>
类型声明
▸ (args
, options?
): Promise
\<ChatCompletionOutput
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<ChatCompletionOutput
>
定义于
inference/src/tasks/nlp/chatCompletion.ts:9
chatCompletionStream
• chatCompletionStream: (args
: {}, options?
: Options
) => AsyncGenerator
\<ChatCompletionStreamOutput
, any
, unknown
>
类型声明
▸ (args
, options?
): AsyncGenerator
\<ChatCompletionStreamOutput
, any
, unknown
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
AsyncGenerator
\<ChatCompletionStreamOutput
, any
, unknown
>
定义于
inference/src/tasks/nlp/chatCompletionStream.ts:8
documentQuestionAnswering
• documentQuestionAnswering: (args
: {}, options?
: Options
) => Promise
\<DocumentQuestionAnsweringOutputElement
>
类型声明
▸ (args
, options?
): Promise
\<DocumentQuestionAnsweringOutputElement
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<DocumentQuestionAnsweringOutputElement
>
定义于
inference/src/tasks/multimodal/documentQuestionAnswering.ts:19
featureExtraction
• featureExtraction: (args
: {}, options?
: Options
) => Promise
\<FeatureExtractionOutput
>
类型声明
▸ (args
, options?
): Promise
\<FeatureExtractionOutput
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<FeatureExtractionOutput
>
定义于
inference/src/tasks/nlp/featureExtraction.ts:16
fillMask
• fillMask: (args
: {}, options?
: Options
) => Promise
\<FillMaskOutput
>
类型声明
▸ (args
, options?
): Promise
\<FillMaskOutput
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<FillMaskOutput
>
定义于
inference/src/tasks/nlp/fillMask.ts:11
imageClassification
• imageClassification: (args
: { data
: 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
\<ImageClassificationOutput
>
类型声明
▸ (args
, options?
): Promise
\<ImageClassificationOutput
>
参数
名称 | 类型 |
---|---|
args | { data : 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
\<ImageClassificationOutput
>
定义于
inference/src/tasks/cv/imageClassification.ts:13
imageSegmentation
• imageSegmentation: (args
: { data
: 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
\<ImageSegmentationOutput
>
类型声明
▸ (args
, options?
): Promise
\<ImageSegmentationOutput
>
参数
名称 | 类型 |
---|---|
args | { data : 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
\<ImageSegmentationOutput
>
定义于
inference/src/tasks/cv/imageSegmentation.ts:13
图像到图像
• imageToImage: (args
: {}, options?
: Options
) => Promise
\<Blob
>
类型声明
▸ (args
, options?
): Promise
\<Blob
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<Blob
>
定义于
inference/src/tasks/cv/imageToImage.ts:13
图像到文本
• imageToText: (args
: { data
: 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
\<ImageToTextOutput
>
类型声明
▸ (args
, options?
): Promise
\<ImageToTextOutput
>
参数
名称 | 类型 |
---|---|
args | { data : 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
\<ImageToTextOutput
>
定义于
inference/src/tasks/cv/imageToText.ts:12
目标检测
• objectDetection: (args
: { data
: 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
\<ObjectDetectionOutput
>
类型声明
▸ (args
, options?
): Promise
\<ObjectDetectionOutput
>
参数
名称 | 类型 |
---|---|
args | { data : 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
\<ObjectDetectionOutput
>
定义于
inference/src/tasks/cv/objectDetection.ts:13
问答
• questionAnswering: (args
: {}, options?
: Options
) => Promise
\<QuestionAnsweringOutputElement
>
类型声明
▸ (args
, options?
): Promise
\<QuestionAnsweringOutputElement
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<QuestionAnsweringOutputElement
>
定义于
inference/src/tasks/nlp/questionAnswering.ts:11
请求
• request: (args
: { data
: Blob
| ArrayBuffer
; 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"
} | { 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"
} | { 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"
} | { 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
; 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
>
参数
名称 | 类型 |
---|---|
args | { data : Blob | ArrayBuffer ; 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" } | { 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" } | { 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" } | { 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 ; 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:8
句子相似度
• sentenceSimilarity: (args
: {}, options?
: Options
) => Promise
\<SentenceSimilarityOutput
>
类型声明
▸ (args
, options?
): Promise
\<SentenceSimilarityOutput
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<SentenceSimilarityOutput
>
定义于
inference/src/tasks/nlp/sentenceSimilarity.ts:11
流式请求
• streamingRequest: (args
: { data
: Blob
| ArrayBuffer
; 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"
} | { 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"
} | { 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"
} | { 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
; 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
>
参数
名称 | 类型 |
---|---|
args | { data : Blob | ArrayBuffer ; 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" } | { 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" } | { 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" } | { 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 ; 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
>
定义于
inference/src/tasks/custom/streamingRequest.ts:7
文本摘要
• summarization: (args
: {}, options?
: Options
) => Promise
\<SummarizationOutput
>
类型声明
▸ (args
, options?
): Promise
\<SummarizationOutput
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<SummarizationOutput
>
定义于
inference/src/tasks/nlp/summarization.ts:11
表格问答
• tableQuestionAnswering: (args
: {}, options?
: Options
) => Promise
\<TableQuestionAnsweringOutputElement
>
类型声明
▸ (args
, options?
): Promise
\<TableQuestionAnsweringOutputElement
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<TableQuestionAnsweringOutputElement
>
定义于
inference/src/tasks/nlp/tableQuestionAnswering.ts:11
表格分类
• tabularClassification: (args
: { 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
>
参数
名称 | 类型 | 描述 |
---|---|---|
args | Object | - |
args.inputs | Object | - |
args.inputs.data | Record \<string , string []> | 表示为列表字典的数据表格,其中条目是标题,列表是所有值,所有列表必须具有相同的大小。 |
args.model? | string | 要使用的 HF 模型。如果未指定,将调用 huggingface.co/api/tasks 以获取任务的默认模型。/!\ 遗留行为允许这是一个 URL,但这已被弃用,将来会被删除。请改用 endpointUrl 参数。 |
args.provider? | "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" | 设置一个推理提供商来运行此模型。默认为您的用户设置中与此模型兼容的第一个提供商。 |
options? | Options | - |
返回值
Promise
\<TabularClassificationOutput
>
定义于
inference/src/tasks/tabular/tabularClassification.ts:24
表格回归
• tabularRegression: (args
: { 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
>
参数
名称 | 类型 | 描述 |
---|---|---|
args | Object | - |
args.inputs | Object | - |
args.inputs.data | Record \<string , string []> | 表示为列表字典的数据表格,其中条目是标题,列表是所有值,所有列表必须具有相同的大小。 |
args.model? | string | 要使用的 HF 模型。如果未指定,将调用 huggingface.co/api/tasks 以获取任务的默认模型。/!\ 遗留行为允许这是一个 URL,但这已被弃用,将来会被删除。请改用 endpointUrl 参数。 |
args.provider? | "black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "fireworks-ai" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "openai" | "replicate" | "sambanova" | "together" | 设置一个推理提供商来运行此模型。默认为您的用户设置中与此模型兼容的第一个提供商。 |
options? | Options | - |
返回值
Promise
\<TabularRegressionOutput
>
定义于
inference/src/tasks/tabular/tabularRegression.ts:24
文本分类
• textClassification: (args
: {}, options?
: Options
) => Promise
\<TextClassificationOutput
>
类型声明
▸ (args
, options?
): Promise
\<TextClassificationOutput
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<TextClassificationOutput
>
定义于
inference/src/tasks/nlp/textClassification.ts:11
文本生成
• textGeneration: (args
: {}, options?
: Options
) => Promise
\<TextGenerationOutput
>
类型声明
▸ (args
, options?
): Promise
\<TextGenerationOutput
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<TextGenerationOutput
>
定义于
inference/src/tasks/nlp/textGeneration.ts:34
文本生成流
• textGenerationStream: (args
: {}, options?
: Options
) => AsyncGenerator
\<TextGenerationStreamOutput
, any
, unknown
>
类型声明
▸ (args
, options?
): AsyncGenerator
\<TextGenerationStreamOutput
, any
, unknown
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
AsyncGenerator
\<TextGenerationStreamOutput
, any
, unknown
>
定义于
inference/src/tasks/nlp/textGenerationStream.ts:88
文本到图像
• textToImage: (args
: {}, options?
: TextToImageOptions
& { outputType?
: "blob"
}) => Promise
\<Blob
>
类型声明
▸ (args
, options?
): Promise
\<Blob
>
参数
名称 | 类型 |
---|---|
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
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<Blob
>
定义于
inference/src/tasks/audio/textToSpeech.ts:15
文本到视频
• textToVideo: (args
: {}, options?
: Options
) => Promise
\<Blob
>
类型声明
▸ (args
, options?
): Promise
\<Blob
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<Blob
>
定义于
inference/src/tasks/cv/textToVideo.ts:26
词元分类
• tokenClassification: (args
: {}, options?
: Options
) => Promise
\<TokenClassificationOutput
>
类型声明
▸ (args
, options?
): Promise
\<TokenClassificationOutput
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<TokenClassificationOutput
>
定义于
inference/src/tasks/nlp/tokenClassification.ts:12
翻译
• translation: (args
: {}, options?
: Options
) => Promise
\<TranslationOutput
>
类型声明
▸ (args
, options?
): Promise
\<TranslationOutput
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<TranslationOutput
>
定义于
inference/src/tasks/nlp/translation.ts:10
视觉问答
• visualQuestionAnswering: (args
: {}, options?
: Options
) => Promise
\<VisualQuestionAnsweringOutputElement
>
类型声明
▸ (args
, options?
): Promise
\<VisualQuestionAnsweringOutputElement
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<VisualQuestionAnsweringOutputElement
>
定义于
inference/src/tasks/multimodal/visualQuestionAnswering.ts:18
零样本分类
• zeroShotClassification: (args
: {}, options?
: Options
) => Promise
\<ZeroShotClassificationOutput
>
类型声明
▸ (args
, options?
): Promise
\<ZeroShotClassificationOutput
>
参数
名称 | 类型 |
---|---|
args | Object |
options? | Options |
返回值
Promise
\<ZeroShotClassificationOutput
>
定义于
inference/src/tasks/nlp/zeroShotClassification.ts:12
零样本图像分类
• zeroShotImageClassification: (args
: { 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
>
参数
名称 | 类型 |
---|---|
args | { 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
>
定义于
inference/src/tasks/cv/zeroShotImageClassification.ts:43
< > 更新在 GitHub 上