Huggingface.js documentation
@c1
@c1
名前空間
クラス
- HfInference
- InferenceClient
- InferenceClientEndpoint
- InferenceClientError
- InferenceClientHubApiError
- InferenceClientInputError
- InferenceClientProviderApiError
- InferenceClientProviderOutputError
- InferenceClientRoutingError
インターフェース
- AudioToAudioOutput
- AudioToAudioOutputElem
- BaseArgs
- BodyParams
- HeaderParams
- InferenceProviderMappingEntry
- ロガー
- オプション
- TextGenerationInput
- TextGenerationOutput
- TextGenerationStreamBestOfSequence
- TextGenerationStreamDetails
- TextGenerationStreamOutput
- TextGenerationStreamPrefillToken
- TextGenerationStreamToken
- UrlParams
型エイリアス
AudioClassificationArgs
Ƭ AudioClassificationArgs: BaseArgs & AudioClassificationInput | LegacyAudioInput
定義場所
inference/src/tasks/audio/audioClassification.ts:9
AudioToAudioArgs
Ƭ AudioToAudioArgs: BaseArgs & { inputs: Blob } | LegacyAudioInput
定義場所
inference/src/tasks/audio/audioToAudio.ts:8
AuthMethod
Ƭ AuthMethod: "none" | "hf-token" | "credentials-include" | "provider-key"
定義場所
AutomaticSpeechRecognitionArgs
Ƭ AutomaticSpeechRecognitionArgs: BaseArgs & AutomaticSpeechRecognitionInput | LegacyAudioInput
定義場所
inference/src/tasks/audio/automaticSpeechRecognition.ts:8
DocumentQuestionAnsweringArgs
Ƭ DocumentQuestionAnsweringArgs: BaseArgs & DocumentQuestionAnsweringInput & { inputs: DocumentQuestionAnsweringInputData & { image: Blob } }
定義場所
inference/src/tasks/multimodal/documentQuestionAnswering.ts:13
FeatureExtractionArgs
Ƭ FeatureExtractionArgs: BaseArgs & FeatureExtractionInput & FeatureExtractionOAICompatInput
定義場所
inference/src/tasks/nlp/featureExtraction.ts:12
FeatureExtractionOutput
Ƭ FeatureExtractionOutput: (number | number[] | number[][])[]
Returned valuesは浮動小数点数の多次元配列です(次元は、文字列を1つ送信したのか文字列のリストを送信したのか、また、自動的な集約(例えばmean_poolingなど)が適用されたかどうかによって異なります。これはモデルのREADMEに説明されているはずです)。
定義場所
inference/src/tasks/nlp/featureExtraction.ts:17
FillMaskArgs
Ƭ FillMaskArgs: BaseArgs & FillMaskInput
定義場所
inference/src/tasks/nlp/fillMask.ts:7
ImageClassificationArgs
Ƭ ImageClassificationArgs: BaseArgs & ImageClassificationInput | LegacyImageInput
定義場所
inference/src/tasks/cv/imageClassification.ts:8
ImageSegmentationArgs
Ƭ ImageSegmentationArgs: BaseArgs & ImageSegmentationInput
定義場所
inference/src/tasks/cv/imageSegmentation.ts:8
ImageTextToImageArgs
Ƭ ImageTextToImageArgs: BaseArgs & ImageTextToImageInput
定義場所
inference/src/tasks/cv/imageTextToImage.ts:7
ImageTextToVideoArgs
Ƭ ImageTextToVideoArgs: BaseArgs & ImageTextToVideoInput
定義場所
inference/src/tasks/cv/imageTextToVideo.ts:7
ImageToImageArgs
Ƭ ImageToImageArgs: BaseArgs & ImageToImageInput
定義場所
inference/src/tasks/cv/imageToImage.ts:8
ImageToTextArgs
Ƭ ImageToTextArgs: BaseArgs & ImageToTextInput | LegacyImageInput
定義場所
inference/src/tasks/cv/imageToText.ts:8
ImageToVideoArgs
Ƭ ImageToVideoArgs: BaseArgs & ImageToVideoInput
定義場所
inference/src/tasks/cv/imageToVideo.ts:8
InferenceProvider
Ƭ InferenceProvider: typeof INFERENCE_PROVIDERS[number]
定義場所
InferenceProviderOrPolicy
Ƭ InferenceProviderOrPolicy: typeof PROVIDERS_OR_POLICIES[number]
定義場所
InferenceTask
Ƭ InferenceTask: Exclude<PipelineType, "other"> | "conversational"
定義場所
ModelId
Ƭ ModelId: string
HFモデルID、例: “meta-llama/Llama-3.3-70B-Instruct”
定義場所
ObjectDetectionArgs
Ƭ ObjectDetectionArgs: BaseArgs & ObjectDetectionInput | LegacyImageInput
定義場所
inference/src/tasks/cv/objectDetection.ts:8
OutputType
Ƭ OutputType: "url" | "dataUrl" | "blob" | "json"
定義場所
QuestionAnsweringArgs
Ƭ QuestionAnsweringArgs: BaseArgs & QuestionAnsweringInput
定義場所
inference/src/tasks/nlp/questionAnswering.ts:8
RequestArgs
Ƭ RequestArgs: BaseArgs & { data: Blob | ArrayBuffer } | { inputs: unknown } | { prompt: string } | { text: string } | { audio_url: string } | ChatCompletionInput & { parameters?: Record<string, unknown> ; urlTransform?: (url: string) => string }
定義場所
SentenceSimilarityArgs
Ƭ SentenceSimilarityArgs: BaseArgs & SentenceSimilarityInput
定義場所
inference/src/tasks/nlp/sentenceSimilarity.ts:7
SummarizationArgs
Ƭ SummarizationArgs: BaseArgs & SummarizationInput
定義場所
inference/src/tasks/nlp/summarization.ts:7
TableQuestionAnsweringArgs
Ƭ TableQuestionAnsweringArgs: BaseArgs & TableQuestionAnsweringInput
定義場所
inference/src/tasks/nlp/tableQuestionAnswering.ts:7
TabularClassificationArgs
Ƭ TabularClassificationArgs: BaseArgs & { inputs: { data: Record<string, string[]> } }
定義場所
inference/src/tasks/tabular/tabularClassification.ts:6
TabularClassificationOutput
Ƭ TabularClassificationOutput: number[]
各行の予測ラベルのリスト
定義場所
inference/src/tasks/tabular/tabularClassification.ts:18
TabularRegressionArgs
Ƭ TabularRegressionArgs: BaseArgs & { inputs: { data: Record<string, string[]> } }
定義場所
inference/src/tasks/tabular/tabularRegression.ts:6
TabularRegressionOutput
Ƭ TabularRegressionOutput: number[]
各行の予測値のリスト
定義場所
inference/src/tasks/tabular/tabularRegression.ts:18
TextClassificationArgs
Ƭ TextClassificationArgs: BaseArgs & TextClassificationInput
定義場所
inference/src/tasks/nlp/textClassification.ts:7
TextGenerationStreamFinishReason
Ƭ TextGenerationStreamFinishReason: "length" | "eos_token" | "stop_sequence"
定義場所
inference/src/tasks/nlp/textGenerationStream.ts:48
TextRankingArgs
Ƭ TextRankingArgs: BaseArgs & TextRankingInput
定義場所
inference/src/tasks/nlp/textRanking.ts:7
TextToAudioArgs
Ƭ TextToAudioArgs: BaseArgs & TextToAudioInput
定義場所
inference/src/tasks/audio/textToAudio.ts:8
TextToImageArgs
Ƭ TextToImageArgs: BaseArgs & TextToImageInput
定義場所
inference/src/tasks/cv/textToImage.ts:8
TextToVideoArgs
Ƭ TextToVideoArgs: BaseArgs & TextToVideoInput
定義場所
inference/src/tasks/cv/textToVideo.ts:11
TextToVideoOutput
Ƭ TextToVideoOutput: Blob
定義場所
inference/src/tasks/cv/textToVideo.ts:13
TokenClassificationArgs
Ƭ TokenClassificationArgs: BaseArgs & TokenClassificationInput
定義場所
inference/src/tasks/nlp/tokenClassification.ts:7
TranslationArgs
Ƭ TranslationArgs: BaseArgs & TranslationInput
定義場所
inference/src/tasks/nlp/translation.ts:7
VisualQuestionAnsweringArgs
Ƭ VisualQuestionAnsweringArgs: BaseArgs & VisualQuestionAnsweringInput & { inputs: VisualQuestionAnsweringInputData & { image: Blob } }
定義場所
inference/src/tasks/multimodal/visualQuestionAnswering.ts:13
ZeroShotClassificationArgs
Ƭ ZeroShotClassificationArgs: BaseArgs & ZeroShotClassificationInput
定義場所
inference/src/tasks/nlp/zeroShotClassification.ts:7
ZeroShotImageClassificationArgs
Ƭ ZeroShotImageClassificationArgs: BaseArgs & ZeroShotImageClassificationInput | LegacyZeroShotImageClassificationInput
定義場所
inference/src/tasks/cv/zeroShotImageClassification.ts:15
変数
推論プロバイダー
• Const INFERENCE_PROVIDERS: 読み取り専用 ["baseten", "cerebras", "cohere", "deepinfra", "fal-ai", "featherless-ai", "fireworks-ai", "groq", "hf-inference", "humain-ai", "novita", "nscale", "openai", "openrouter", "ovhcloud", "publicai", "replicate", "scaleway", "together", "wavespeed", "zai-org"]
定義場所
プロバイダー
• Const PROVIDERS: Record<InferenceProvider, Partial<Record<InferenceTask, TaskProviderHelper>>>
定義場所
inference/src/lib/getProviderHelper.ts:61
PROVIDERS _ HUB _ ORGS
• Const PROVIDERS_HUB_ORGS: Record<InferenceProvider, string>
HF Hub 上の組織名前空間、つまり hf.co/…
可能な限り、InferenceProvider は == org namespace であるべきです
定義場所
PROVIDERS _ OR _ POLICIES
• Const PROVIDERS_OR_POLICIES: 読み取り専用 ["baseten", "cerebras", "cohere", "deepinfra", "fal-ai", "featherless-ai", "fireworks-ai", "groq", "hf-inference", "humain-ai", "novita", "nscale", "openai", "openrouter", "ovhcloud", "publicai", "replicate", "scaleway", "together", "wavespeed", "zai-org", "auto"]
定義場所
関数
audioClassification
▸ audioClassification(args, options?): Promise<AudioClassificationOutput>
このタスクは、一部の音声入力を読み取り、クラスの尤度を出力します。 推奨モデル: superb/hubert-large-superb-er
パラメータ
| 名前 | 型 |
|---|---|
args | AudioClassificationArgs |
options? | Options |
返り値
Promise<AudioClassificationOutput>
定義場所
inference/src/tasks/audio/audioClassification.ts:15
audioToAudio
▸ audioToAudio(args, options?): Promise<AudioToAudioOutput[]>
このタスクは、音声入力を読み取り、1つ以上の音声ファイルを出力します。 モデルの例: speechbrain/sepformer-wham は、音源分離を実行します。
パラメータ
| 名前 | 型 |
|---|---|
args | AudioToAudioArgs |
options? | Options |
返り値
Promise<AudioToAudioOutput[]>
定義場所
inference/src/tasks/audio/audioToAudio.ts:41
automaticSpeechRecognition
▸ automaticSpeechRecognition(args, options?): Promise<AutomaticSpeechRecognitionOutput>
このタスクは、音声入力を読み取り、音声ファイルに含まれる発話された単語を出力します。 推奨モデル(英語): facebook/wav2vec2-large-960h-lv60-self
パラメータ
| 名前 | 型 |
|---|---|
args | AutomaticSpeechRecognitionArgs |
options? | Options |
返り値
Promise<AutomaticSpeechRecognitionOutput>
定義場所
inference/src/tasks/audio/automaticSpeechRecognition.ts:13
chatCompletion
▸ chatCompletion(args, options?): Promise<ChatCompletionOutput>
OpenAIのメッセージ補完API(ストリーミングなし)を使用して、チャット補完エンドポイントでプロンプトに対する応答を生成します。
パラメータ
| 名前 | 型 |
|---|---|
args | BaseArgs & ChatCompletionInput |
options? | Options |
返り値
Promise<ChatCompletionOutput>
定義場所
inference/src/tasks/nlp/chatCompletion.ts:12
chatCompletionStream
▸ chatCompletionStream(args, options?): AsyncGenerator<ChatCompletionStreamOutput>
プロンプトからのテキストを継続するために使用します。textGenerationと同様ですが、1トークンずつ読み取れるジェネレーターを返します。
パラメータ
| 名前 | 型 |
|---|---|
args | BaseArgs & ChatCompletionInput |
options? | Options |
返り値
AsyncGenerator<ChatCompletionStreamOutput>
定義場所
inference/src/tasks/nlp/chatCompletionStream.ts:12
documentQuestionAnswering
▸ documentQuestionAnswering(args, options?): Promise<DocumentQuestionAnsweringOutput[number]>
ドキュメント画像に対する質問に回答します。推奨モデル: impira/layoutlm-document-qa。
パラメータ
| 名前 | 型 |
|---|---|
args | DocumentQuestionAnsweringArgs |
options? | Options |
返り値
Promise<DocumentQuestionAnsweringOutput[number]>
定義場所
inference/src/tasks/multimodal/documentQuestionAnswering.ts:19
featureExtraction
▸ featureExtraction(args, options?): Promise<FeatureExtractionOutput>
このタスクはテキストを読み取り、通常はセマンティックデータベース/セマンティック検索の一部として消費される生(raw)の浮動小数点数値を出力します。
パラメータ
| 名前 | 型 |
|---|---|
args | FeatureExtractionArgs |
options? | Options |
返り値
Promise<FeatureExtractionOutput>
定義場所
inference/src/tasks/nlp/featureExtraction.ts:22
fillMask
▸ fillMask(args, options?): Promise<FillMaskOutput>
欠落した単語(正確にはトークン)の穴を埋めることを試みます。これはBERTモデルの基本的なタスクです。
パラメータ
| 名前 | 型 |
|---|---|
args | FillMaskArgs |
options? | Options |
返り値
Promise<FillMaskOutput>
定義場所
inference/src/tasks/nlp/fillMask.ts:12
getProviderHelper
▸ getProviderHelper(provider, task): TextToImageTaskHelper & TaskProviderHelper
名前とタスクからプロバイダーヘルパーのインスタンスを取得します
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "text-to-image" |
返り値
TextToImageTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:201
▸ getProviderHelper(provider, task): ConversationalTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "conversational" |
返り値
ConversationalTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:205
▸ getProviderHelper(provider, task): TextGenerationTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "text-generation" |
返り値
TextGenerationTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:209
▸ getProviderHelper(provider, task): TextToSpeechTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "text-to-speech" |
返り値
TextToSpeechTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:213
▸ getProviderHelper(provider, task): TextToAudioTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "text-to-audio" |
返り値
TextToAudioTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:217
▸ getProviderHelper(provider, task): AutomaticSpeechRecognitionTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "automatic-speech-recognition" |
返り値
AutomaticSpeechRecognitionTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:221
▸ getProviderHelper(provider, task): TextToVideoTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "text-to-video" |
返り値
TextToVideoTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:225
▸ getProviderHelper(provider, task): TextClassificationTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "text-classification" |
返り値
TextClassificationTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:229
▸ getProviderHelper(provider, task): QuestionAnsweringTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "question-answering" |
返り値
QuestionAnsweringTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:233
▸ getProviderHelper(provider, task): AudioClassificationTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "audio-classification" |
返り値
AudioClassificationTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:237
▸ getProviderHelper(provider, task): AudioToAudioTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "audio-to-audio" |
返り値
AudioToAudioTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:241
▸ getProviderHelper(provider, task): FillMaskTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "fill-mask" |
返り値
FillMaskTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:245
▸ getProviderHelper(provider, task): FeatureExtractionTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "feature-extraction" |
返り値
FeatureExtractionTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:249
▸ getProviderHelper(provider, task): ImageClassificationTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "image-classification" |
返り値
ImageClassificationTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:253
▸ getProviderHelper(provider, task): ImageSegmentationTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "image-segmentation" |
返り値
ImageSegmentationTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:257
▸ getProviderHelper(provider, task): DocumentQuestionAnsweringTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "document-question-answering" |
返り値
DocumentQuestionAnsweringTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:261
▸ getProviderHelper(provider, task): ImageToTextTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "image-to-text" |
返り値
ImageToTextTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:265
▸ getProviderHelper(provider, task): ObjectDetectionTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "object-detection" |
返り値
ObjectDetectionTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:269
▸ getProviderHelper(provider, task): ZeroShotImageClassificationTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "zero-shot-image-classification" |
返り値
ZeroShotImageClassificationTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:273
▸ getProviderHelper(provider, task): ZeroShotClassificationTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "zero-shot-classification" |
返り値
ZeroShotClassificationTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:277
▸ getProviderHelper(provider, task): ImageToImageTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "image-to-image" |
返り値
ImageToImageTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:281
▸ getProviderHelper(provider, task): ImageToVideoTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "image-to-video" |
返り値
ImageToVideoTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:285
▸ getProviderHelper(provider, task): ImageTextToImageTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "image-text-to-image" |
返り値
ImageTextToImageTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:289
▸ getProviderHelper(provider, task): ImageTextToVideoTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "image-text-to-video" |
返り値
ImageTextToVideoTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:293
▸ getProviderHelper(provider, task): TextRankingTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "text-ranking" |
返り値
TextRankingTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:297
▸ getProviderHelper(provider, task): SentenceSimilarityTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "sentence-similarity" |
返り値
SentenceSimilarityTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:301
▸ getProviderHelper(provider, task): TableQuestionAnsweringTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "table-question-answering" |
返り値
TableQuestionAnsweringTaskHelper と TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:305
▸ getProviderHelper(provider, task): TabularClassificationTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "tabular-classification" |
返り値
TabularClassificationTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:309
▸ getProviderHelper(provider, task): TabularRegressionTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "tabular-regression" |
返り値
TabularRegressionTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:313
▸ getProviderHelper(provider, task): TokenClassificationTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "token-classification" |
返り値
TokenClassificationTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:317
▸ getProviderHelper(provider, task): TranslationTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "translation" |
返り値
TranslationTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:321
▸ getProviderHelper(provider, task): SummarizationTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "summarization" |
返り値
SummarizationTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:325
▸ getProviderHelper(provider, task): VisualQuestionAnsweringTaskHelper & TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | "visual-question-answering" |
返り値
VisualQuestionAnsweringTaskHelper & TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:329
▸ getProviderHelper(provider, task): TaskProviderHelper
パラメータ
| 名前 | 型 |
|---|---|
provider | "baseten" | "cerebras" | "cohere" | "deepinfra" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "humain-ai" | "novita" | "nscale" | "openai" | "openrouter" | "ovhcloud" | "publicai" | "replicate" | "scaleway" | "together" | "wavespeed" | "zai-org" | "auto" |
task | undefined | InferenceTask |
返り値
TaskProviderHelper
定義場所
inference/src/lib/getProviderHelper.ts:333
imageClassification
▸ imageClassification(args, options?): Promise<ImageClassificationOutput>
このタスクは画像を入力として読み取り、クラスの可能性を出力します。 推奨モデル: google/vit-base-patch16-224
パラメータ
| 名前 | 型 |
|---|---|
args | ImageClassificationArgs |
options? | Options |
返り値
Promise<ImageClassificationOutput>
定義場所
inference/src/tasks/cv/imageClassification.ts:14
imageSegmentation
▸ imageSegmentation(args, options?): Promise<ImageSegmentationOutput>
このタスクは画像を入力として読み取り、クラスの可能性と検出されたオブジェクトのバウンディングボックスを出力します。 推奨モデル: facebook/detr-resnet-50-panoptic
パラメータ
| 名前 | 型 |
|---|---|
args | ImageSegmentationArgs |
options? | Options |
返り値
Promise<ImageSegmentationOutput>
定義場所
inference/src/tasks/cv/imageSegmentation.ts:14
imageTextToImage
▸ imageTextToImage(args, options?): Promise<Blob>
このタスクは画像とテキストを入力として受け取り、新しく生成された画像を出力します。 推奨モデル: black-forest-labs/FLUX.2-dev
パラメータ
| 名前 | 型 |
|---|---|
args | ImageTextToImageArgs |
options? | Options |
返り値
Promise<Blob>
定義場所
inference/src/tasks/cv/imageTextToImage.ts:13
imageTextToVideo
▸ imageTextToVideo(args, options?): Promise<Blob>
このタスクは画像とテキストを入力として受け取り、生成された動画を出力します。 推奨モデル: Lightricks/LTX-Video
パラメータ
| 名前 | 型 |
|---|---|
args | ImageTextToVideoArgs |
options? | Options |
返り値
Promise<Blob>
定義場所
inference/src/tasks/cv/imageTextToVideo.ts:13
imageToImage
▸ imageToImage(args, options?): Promise<Blob>
このタスクはテキスト入力を読み取り、画像を出力します。 推奨モデル: lllyasviel/sd-controlnet-depth
パラメータ
| 名前 | 型 |
|---|---|
args | ImageToImageArgs |
options? | Options |
返り値
Promise<Blob>
定義場所
inference/src/tasks/cv/imageToImage.ts:14
imageToText
▸ imageToText(args, options?): Promise<ImageToTextOutput>
このタスクは画像を入力として読み取り、テキストのキャプションを出力します。
パラメータ
| 名前 | 型 |
|---|---|
args | ImageToTextArgs |
options? | Options |
返り値
Promise<ImageToTextOutput>
定義場所
inference/src/tasks/cv/imageToText.ts:12
imageToVideo
▸ imageToVideo(args, options?): Promise<Blob>
このタスクはテキスト入力を読み取り、画像を出力します。 推奨モデル: Wan-AI/Wan2.1-I2V-14B-720P
パラメータ
| 名前 | 型 |
|---|---|
args | ImageToVideoArgs |
options? | Options |
返り値
Promise<Blob>
定義場所
inference/src/tasks/cv/imageToVideo.ts:14
makeRequestOptions
▸ makeRequestOptions(args, providerHelper, options?): Promise<{ info: RequestInit ; url: string }>
リクエスト引数を準備するヘルパーです。 この非同期バージョンは、モデルIDの解決ステップを処理します。
パラメータ
| 名前 | 型 |
|---|---|
args | RequestArgs & { data?: Blob | ArrayBuffer ; stream?: boolean } |
providerHelper | TaskProviderHelper |
options? | Options & { task?: InferenceTask } |
返り値
Promise<{ info: RequestInit ; url: string }>
定義場所
inference/src/lib/makeRequestOptions.ts:19
makeRequestOptionsFromResolvedModel
▸ makeRequestOptionsFromResolvedModel(resolvedModel, providerHelper, args, mapping, options?): Object
リクエスト引数を準備するヘルパーです。 - 内部使用専用 この同期バージョンでは、モデルIDの解決ステップをスキップします
パラメータ
| 名前 | 型 |
|---|---|
resolvedModel | string |
providerHelper | TaskProviderHelper |
args | RequestArgs & { data?: Blob | ArrayBuffer ; stream?: boolean } |
mapping | undefined | InferenceProviderMappingEntry |
options? | Options & { outputType?: OutputType ; task?: InferenceTask } |
返り値
Object
| 名前 | 型 |
|---|---|
info | RequestInit |
url | string |
定義場所
inference/src/lib/makeRequestOptions.ts:105
objectDetection
▸ objectDetection(args, options?): Promise<ObjectDetectionOutput>
このタスクは画像を入力として読み取り、クラスの可能性と検出されたオブジェクトのバウンディングボックスを出力します。 推奨モデル: facebook/detr-resnet-50
パラメータ
| 名前 | 型 |
|---|---|
args | ObjectDetectionArgs |
options? | Options |
返り値
Promise<ObjectDetectionOutput>
定義場所
inference/src/tasks/cv/objectDetection.ts:14
questionAnswering
▸ questionAnswering(args, options?): Promise<QuestionAnsweringOutput[number]>
どんな質問にも答えられる万能ボットを作りたいですか?推奨モデル: deepset/roberta-base-squad2
パラメータ
| 名前 | 型 |
|---|---|
args | QuestionAnsweringArgs |
options? | Options |
返り値
Promise<QuestionAnsweringOutput[number]>
定義場所
inference/src/tasks/nlp/questionAnswering.ts:13
リクエスト
▸ request<T>(args, options?): Promise<T>
推論プロバイダーへのカスタム呼び出しを行うためのプリミティブ
型パラメータ
| 名前 |
|---|
T |
パラメータ
| 名前 | 型 |
|---|---|
args | RequestArgs |
options? | Options & { task?: InferenceTask } |
返り値
Promise<T>
Deprecated
代わりに特定のタスク関数を使用してください。この関数は将来のバージョンで削除されます。
定義場所
inference/src/tasks/custom/request.ts:11
sentenceSimilarity
▸ sentenceSimilarity(args, options?): Promise<SentenceSimilarityOutput>
埋め込みを比較することで、1つのテキストと他の文のリストとの間の意味的類似度を計算します。
パラメータ
| 名前 | 型 |
|---|---|
args | SentenceSimilarityArgs |
options? | Options |
返り値
Promise<SentenceSimilarityOutput>
定義場所
inference/src/tasks/nlp/sentenceSimilarity.ts:12
setLogger
▸ setLogger(logger): void
パラメータ
| 名前 | 型 |
|---|---|
logger | Logger |
返り値
void
定義場所
streamingRequest
▸ streamingRequest<T>(args, options?): AsyncGenerator<T>
サーバー送信イベントを期待するカスタム推論呼び出しを作成するためのプリミティブで、ジェネレーターを通じてレスポンスを返します
型パラメータ
| 名前 |
|---|
T |
パラメータ
| 名前 | 型 |
|---|---|
args | RequestArgs |
options? | Options & { task?: InferenceTask } |
返り値
AsyncGenerator<T>
Deprecated
代わりに特定のタスク関数を使用してください。この関数は将来のバージョンで削除されます。
定義場所
inference/src/tasks/custom/streamingRequest.ts:11
要約
▸ summarization(args, options?): Promise<SummarizationOutput>
このタスクは、長いテキストを短いテキストに要約するもので、よく知られています。注意してください。一部のモデルには入力長の上限があります。つまり、例えば小説全体を要約することはできないということです。モデルを選択する際はご注意ください。
パラメータ
| 名前 | 型 |
|---|---|
args | SummarizationArgs |
options? | Options |
返り値
Promise<SummarizationOutput>
定義場所
inference/src/tasks/nlp/summarization.ts:12
tableQuestionAnswering
▸ tableQuestionAnswering(args, options?): Promise<TableQuestionAnsweringOutput[number]>
SQLに詳しくなくても大丈夫です。大規模なスプレッドシートに手を出す必要はありません。自然な英語で質問してください。推奨モデル: google/tapas-base-finetuned-wtq。
パラメータ
| 名前 | 型 |
|---|---|
args | TableQuestionAnsweringArgs |
options? | Options |
返り値
Promise<TableQuestionAnsweringOutput[number]>
定義場所
inference/src/tasks/nlp/tableQuestionAnswering.ts:12
tabularClassification
▸ tabularClassification(args, options?): Promise<TabularClassificationOutput>
表形式の機能セットに対して、ターゲットラベルを予測します。 通常、トレーニングデータで分類モデルを学習し、同じ形式の新しいデータで使用します。 モデルの例: vvmnnnkv/wine-quality
パラメータ
| 名前 | 型 |
|---|---|
args | TabularClassificationArgs |
options? | Options |
返り値
Promise<TabularClassificationOutput>
定義場所
inference/src/tasks/tabular/tabularClassification.ts:25
tabularRegression
▸ tabularRegression(args, options?): Promise<TabularRegressionOutput>
表形式の機能セットに対して、ターゲット値を予測します。 通常、トレーニングデータで回帰モデルを訓練し、同じ形式の新しいデータで使用することになります。 モデルの例: scikit-learn/Fish-Weight
パラメータ
| 名前 | 型 |
|---|---|
args | TabularRegressionArgs |
options? | Options |
返り値
Promise<TabularRegressionOutput>
定義場所
inference/src/tasks/tabular/tabularRegression.ts:25
textClassification
▸ textClassification(args, options?): Promise<TextClassificationOutput>
通常、感情分析に使用され、入力に対する各クラスの確率を出力します。推奨モデル: distilbert-base-uncased-finetuned-sst-2-english
パラメータ
| 名前 | 型 |
|---|---|
args | TextClassificationArgs |
options? | Options |
返り値
Promise<TextClassificationOutput>
定義場所
inference/src/tasks/nlp/textClassification.ts:12
textGeneration
▸ textGeneration(args, options?): Promise<TextGenerationOutput>
プロンプトからのテキストを継続するために使用します。これは非常に汎用的なタスクです。推奨モデル: gpt2(シンプルなモデルですが、触って遊ぶには楽しいです)。
パラメータ
| 名前 | 型 |
|---|---|
args | BaseArgs & TextGenerationInput |
options? | Options |
返り値
Promise<TextGenerationOutput>
定義場所
inference/src/tasks/nlp/textGeneration.ts:12
textGenerationStream
▸ textGenerationStream(args, options?): AsyncGenerator<TextGenerationStreamOutput>
プロンプトからのテキストを継続するために使用します。textGenerationと同様ですが、1トークンずつ読み取れるジェネレーターを返します。
パラメータ
| 名前 | 型 |
|---|---|
args | BaseArgs & TextGenerationInput |
options? | Options |
返り値
AsyncGenerator<TextGenerationStreamOutput>
定義場所
inference/src/tasks/nlp/textGenerationStream.ts:90
textRanking
▸ textRanking(args, options?): Promise<TextRankingOutput>
リランカーモデルを使用して、クエリに対する関連性に基づいてドキュメントをランキングします。
パラメータ
| 名前 | 型 |
|---|---|
args | TextRankingArgs |
options? | Options |
返り値
Promise<TextRankingOutput>
定義場所
inference/src/tasks/nlp/textRanking.ts:12
textToAudio
▸ textToAudio(args, options?): Promise<Blob>
このタスクは、入力されたテキストプロンプトから音声(音楽や効果音など)を生成します。 モデルの例: stabilityai/stable-audio-open-1.0
パラメータ
| 名前 | 型 |
|---|---|
args | TextToAudioArgs |
options? | Options |
返り値
Promise<Blob>
定義場所
inference/src/tasks/audio/textToAudio.ts:18
textToImage
▸ textToImage(args, options?): Promise<string>
このタスクはテキストを入力として読み取り、画像を出力します。 推奨モデル: stabilityai/stable-diffusion-2
パラメータ
| 名前 | 型 |
|---|---|
args | TextToImageArgs |
options? | TextToImageOptions & { outputType: "url" } |
返り値
Promise<string>
定義場所
inference/src/tasks/cv/textToImage.ts:18
▸ textToImage(args, options?): Promise<string>
パラメータ
| 名前 | 型 |
|---|---|
args | TextToImageArgs |
options? | TextToImageOptions & { outputType: "dataUrl" } |
返り値
Promise<string>
定義場所
inference/src/tasks/cv/textToImage.ts:22
▸ textToImage(args, options?): Promise<Blob>
パラメータ
| 名前 | 型 |
|---|---|
args | TextToImageArgs |
options? | TextToImageOptions & { outputType?: "blob" } |
返り値
Promise<Blob>
定義場所
inference/src/tasks/cv/textToImage.ts:26
▸ textToImage(args, options?): Promise<Record<string, unknown>>
パラメータ
| 名前 | 型 |
|---|---|
args | TextToImageArgs |
options? | TextToImageOptions & { outputType?: "json" } |
返り値
Promise<Record<string, unknown>>
定義場所
inference/src/tasks/cv/textToImage.ts:30
textToSpeech
▸ textToSpeech(args, options?): Promise<Blob>
このタスクは、指定されたテキストを発音する音声の音声を合成します。 推奨モデル: espnet/kan-bayashi_ljspeech_vits
パラメータ
| 名前 | 型 |
|---|---|
args | TextToSpeechArgs |
options? | Options |
返り値
Promise<Blob>
定義場所
inference/src/tasks/audio/textToSpeech.ts:15
textToVideo
▸ textToVideo(args, options?): Promise<TextToVideoOutput>
パラメータ
| 名前 | 型 |
|---|---|
args | TextToVideoArgs |
options? | Options |
返り値
Promise<TextToVideoOutput>
定義場所
inference/src/tasks/cv/textToVideo.ts:15
tokenClassification
▸ tokenClassification(args, options?): Promise<TokenClassificationOutput>
文の解析、すなわち文法解析またはテキストに含まれるキーワードを理解するための固有表現認識(NER)に通常使用されます。推奨モデル: dbmdz/bert-large-cased-finetuned-conll03-english
パラメータ
| 名前 | 型 |
|---|---|
args | TokenClassificationArgs |
options? | Options |
返り値
Promise<TokenClassificationOutput>
定義場所
inference/src/tasks/nlp/tokenClassification.ts:12
翻訳
▸ 翻訳(args, options?): Promise<TranslationOutput>
このタスクは、ある言語のテキストを別の言語に翻訳するもので、広く知られています。推奨モデル: Helsinki-NLP/opus-mt-ru-en。
パラメータ
| 名前 | 型 |
|---|---|
args | TranslationArgs |
options? | Options |
返り値
Promise<TranslationOutput>
定義場所
inference/src/tasks/nlp/translation.ts:11
visualQuestionAnswering
▸ visualQuestionAnswering(args, options?): Promise<VisualQuestionAnsweringOutput[number]>
画像に関する質問に回答します。推奨モデル: dandelin/vilt-b32-finetuned-vqa。
パラメータ
| 名前 | 型 |
|---|---|
args | VisualQuestionAnsweringArgs |
options? | Options |
返り値
Promise<VisualQuestionAnsweringOutput[number]>
定義場所
inference/src/tasks/multimodal/visualQuestionAnswering.ts:19
zeroShotClassification
▸ zeroShotClassification(args, options?): Promise<ZeroShotClassificationOutput>
このタスクは、コードを書かずに分類を試すのに非常に便利です。文や段落、およびその文に対する候補ラベルを渡すだけで、結果が得られます。推奨モデル: facebook/bart-large-mnli。
パラメータ
| 名前 | 型 |
|---|---|
args | ZeroShotClassificationArgs |
options? | Options |
返り値
Promise<ZeroShotClassificationOutput>
定義場所
inference/src/tasks/nlp/zeroShotClassification.ts:12
zeroShotImageClassification
▸ zeroShotImageClassification(args, options?): Promise<ZeroShotImageClassificationOutput>
指定されたクラスに画像を分類します。 推奨モデル: openai/clip-vit-large-patch14-336
パラメータ
| 名前 | 型 |
|---|---|
args | ZeroShotImageClassificationArgs |
options? | Options |
返り値
Promise<ZeroShotImageClassificationOutput>
定義場所
inference/src/tasks/cv/zeroShotImageClassification.ts:44
Update on GitHub