@huggingface/inference 3.6.2 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -25
- package/dist/index.cjs +1232 -898
- package/dist/index.js +1234 -900
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/lib/getProviderHelper.d.ts +37 -0
- package/dist/src/lib/getProviderHelper.d.ts.map +1 -0
- package/dist/src/lib/makeRequestOptions.d.ts +0 -2
- package/dist/src/lib/makeRequestOptions.d.ts.map +1 -1
- package/dist/src/providers/black-forest-labs.d.ts +14 -18
- package/dist/src/providers/black-forest-labs.d.ts.map +1 -1
- package/dist/src/providers/cerebras.d.ts +4 -2
- package/dist/src/providers/cerebras.d.ts.map +1 -1
- package/dist/src/providers/cohere.d.ts +5 -2
- package/dist/src/providers/cohere.d.ts.map +1 -1
- package/dist/src/providers/fal-ai.d.ts +50 -3
- package/dist/src/providers/fal-ai.d.ts.map +1 -1
- package/dist/src/providers/fireworks-ai.d.ts +5 -2
- package/dist/src/providers/fireworks-ai.d.ts.map +1 -1
- package/dist/src/providers/hf-inference.d.ts +125 -2
- package/dist/src/providers/hf-inference.d.ts.map +1 -1
- package/dist/src/providers/hyperbolic.d.ts +31 -2
- package/dist/src/providers/hyperbolic.d.ts.map +1 -1
- package/dist/src/providers/nebius.d.ts +20 -18
- package/dist/src/providers/nebius.d.ts.map +1 -1
- package/dist/src/providers/novita.d.ts +21 -18
- package/dist/src/providers/novita.d.ts.map +1 -1
- package/dist/src/providers/openai.d.ts +4 -2
- package/dist/src/providers/openai.d.ts.map +1 -1
- package/dist/src/providers/providerHelper.d.ts +182 -0
- package/dist/src/providers/providerHelper.d.ts.map +1 -0
- package/dist/src/providers/replicate.d.ts +23 -19
- package/dist/src/providers/replicate.d.ts.map +1 -1
- package/dist/src/providers/sambanova.d.ts +4 -2
- package/dist/src/providers/sambanova.d.ts.map +1 -1
- package/dist/src/providers/together.d.ts +32 -2
- package/dist/src/providers/together.d.ts.map +1 -1
- package/dist/src/snippets/getInferenceSnippets.d.ts.map +1 -1
- package/dist/src/tasks/audio/audioClassification.d.ts.map +1 -1
- package/dist/src/tasks/audio/automaticSpeechRecognition.d.ts.map +1 -1
- package/dist/src/tasks/audio/textToSpeech.d.ts.map +1 -1
- package/dist/src/tasks/audio/utils.d.ts +2 -1
- package/dist/src/tasks/audio/utils.d.ts.map +1 -1
- package/dist/src/tasks/custom/request.d.ts +1 -2
- package/dist/src/tasks/custom/request.d.ts.map +1 -1
- package/dist/src/tasks/custom/streamingRequest.d.ts +1 -2
- package/dist/src/tasks/custom/streamingRequest.d.ts.map +1 -1
- package/dist/src/tasks/cv/imageClassification.d.ts.map +1 -1
- package/dist/src/tasks/cv/imageSegmentation.d.ts.map +1 -1
- package/dist/src/tasks/cv/imageToImage.d.ts.map +1 -1
- package/dist/src/tasks/cv/imageToText.d.ts.map +1 -1
- package/dist/src/tasks/cv/objectDetection.d.ts +1 -1
- package/dist/src/tasks/cv/objectDetection.d.ts.map +1 -1
- package/dist/src/tasks/cv/textToImage.d.ts.map +1 -1
- package/dist/src/tasks/cv/textToVideo.d.ts +1 -1
- package/dist/src/tasks/cv/textToVideo.d.ts.map +1 -1
- package/dist/src/tasks/cv/zeroShotImageClassification.d.ts +1 -1
- package/dist/src/tasks/cv/zeroShotImageClassification.d.ts.map +1 -1
- package/dist/src/tasks/index.d.ts +6 -6
- package/dist/src/tasks/index.d.ts.map +1 -1
- package/dist/src/tasks/multimodal/documentQuestionAnswering.d.ts +1 -1
- package/dist/src/tasks/multimodal/documentQuestionAnswering.d.ts.map +1 -1
- package/dist/src/tasks/multimodal/visualQuestionAnswering.d.ts.map +1 -1
- package/dist/src/tasks/nlp/chatCompletion.d.ts +1 -1
- package/dist/src/tasks/nlp/chatCompletion.d.ts.map +1 -1
- package/dist/src/tasks/nlp/chatCompletionStream.d.ts +1 -1
- package/dist/src/tasks/nlp/chatCompletionStream.d.ts.map +1 -1
- package/dist/src/tasks/nlp/featureExtraction.d.ts.map +1 -1
- package/dist/src/tasks/nlp/fillMask.d.ts.map +1 -1
- package/dist/src/tasks/nlp/questionAnswering.d.ts.map +1 -1
- package/dist/src/tasks/nlp/sentenceSimilarity.d.ts.map +1 -1
- package/dist/src/tasks/nlp/summarization.d.ts.map +1 -1
- package/dist/src/tasks/nlp/tableQuestionAnswering.d.ts.map +1 -1
- package/dist/src/tasks/nlp/textClassification.d.ts.map +1 -1
- package/dist/src/tasks/nlp/textGeneration.d.ts.map +1 -1
- package/dist/src/tasks/nlp/tokenClassification.d.ts.map +1 -1
- package/dist/src/tasks/nlp/translation.d.ts.map +1 -1
- package/dist/src/tasks/nlp/zeroShotClassification.d.ts.map +1 -1
- package/dist/src/tasks/tabular/tabularClassification.d.ts.map +1 -1
- package/dist/src/tasks/tabular/tabularRegression.d.ts.map +1 -1
- package/dist/src/types.d.ts +10 -13
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/request.d.ts +27 -0
- package/dist/src/utils/request.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/config.ts +1 -0
- package/src/lib/getProviderHelper.ts +270 -0
- package/src/lib/makeRequestOptions.ts +36 -90
- package/src/providers/black-forest-labs.ts +73 -22
- package/src/providers/cerebras.ts +6 -27
- package/src/providers/cohere.ts +9 -28
- package/src/providers/fal-ai.ts +195 -77
- package/src/providers/fireworks-ai.ts +8 -29
- package/src/providers/hf-inference.ts +555 -34
- package/src/providers/hyperbolic.ts +107 -29
- package/src/providers/nebius.ts +65 -29
- package/src/providers/novita.ts +68 -32
- package/src/providers/openai.ts +6 -32
- package/src/providers/providerHelper.ts +354 -0
- package/src/providers/replicate.ts +124 -34
- package/src/providers/sambanova.ts +5 -30
- package/src/providers/together.ts +92 -28
- package/src/snippets/getInferenceSnippets.ts +16 -9
- package/src/snippets/templates.exported.ts +2 -2
- package/src/tasks/audio/audioClassification.ts +6 -9
- package/src/tasks/audio/audioToAudio.ts +5 -28
- package/src/tasks/audio/automaticSpeechRecognition.ts +7 -6
- package/src/tasks/audio/textToSpeech.ts +6 -30
- package/src/tasks/audio/utils.ts +2 -1
- package/src/tasks/custom/request.ts +7 -34
- package/src/tasks/custom/streamingRequest.ts +5 -87
- package/src/tasks/cv/imageClassification.ts +5 -9
- package/src/tasks/cv/imageSegmentation.ts +5 -10
- package/src/tasks/cv/imageToImage.ts +5 -8
- package/src/tasks/cv/imageToText.ts +8 -13
- package/src/tasks/cv/objectDetection.ts +6 -21
- package/src/tasks/cv/textToImage.ts +10 -138
- package/src/tasks/cv/textToVideo.ts +11 -59
- package/src/tasks/cv/zeroShotImageClassification.ts +7 -12
- package/src/tasks/index.ts +6 -6
- package/src/tasks/multimodal/documentQuestionAnswering.ts +10 -26
- package/src/tasks/multimodal/visualQuestionAnswering.ts +6 -12
- package/src/tasks/nlp/chatCompletion.ts +7 -23
- package/src/tasks/nlp/chatCompletionStream.ts +4 -5
- package/src/tasks/nlp/featureExtraction.ts +5 -20
- package/src/tasks/nlp/fillMask.ts +5 -18
- package/src/tasks/nlp/questionAnswering.ts +5 -23
- package/src/tasks/nlp/sentenceSimilarity.ts +5 -18
- package/src/tasks/nlp/summarization.ts +5 -8
- package/src/tasks/nlp/tableQuestionAnswering.ts +5 -29
- package/src/tasks/nlp/textClassification.ts +8 -14
- package/src/tasks/nlp/textGeneration.ts +13 -80
- package/src/tasks/nlp/textGenerationStream.ts +2 -2
- package/src/tasks/nlp/tokenClassification.ts +8 -24
- package/src/tasks/nlp/translation.ts +5 -8
- package/src/tasks/nlp/zeroShotClassification.ts +8 -22
- package/src/tasks/tabular/tabularClassification.ts +5 -8
- package/src/tasks/tabular/tabularRegression.ts +5 -8
- package/src/types.ts +11 -14
- package/src/utils/request.ts +161 -0
package/dist/src/config.d.ts
CHANGED
package/dist/src/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,2BAA2B,CAAC;AACnD,eAAO,MAAM,aAAa,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,2BAA2B,CAAC;AACnD,eAAO,MAAM,aAAa,kCAAkC,CAAC;AAC7D,eAAO,MAAM,mBAAmB,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AudioClassificationTaskHelper, AudioToAudioTaskHelper, AutomaticSpeechRecognitionTaskHelper, ConversationalTaskHelper, DocumentQuestionAnsweringTaskHelper, FeatureExtractionTaskHelper, FillMaskTaskHelper, ImageClassificationTaskHelper, ImageSegmentationTaskHelper, ImageToImageTaskHelper, ImageToTextTaskHelper, ObjectDetectionTaskHelper, QuestionAnsweringTaskHelper, SentenceSimilarityTaskHelper, SummarizationTaskHelper, TableQuestionAnsweringTaskHelper, TabularClassificationTaskHelper, TabularRegressionTaskHelper, TaskProviderHelper, TextClassificationTaskHelper, TextGenerationTaskHelper, TextToAudioTaskHelper, TextToImageTaskHelper, TextToSpeechTaskHelper, TextToVideoTaskHelper, TokenClassificationTaskHelper, TranslationTaskHelper, VisualQuestionAnsweringTaskHelper, ZeroShotClassificationTaskHelper, ZeroShotImageClassificationTaskHelper } from "../providers/providerHelper";
|
|
2
|
+
import type { InferenceProvider, InferenceTask } from "../types";
|
|
3
|
+
export declare const PROVIDERS: Record<InferenceProvider, Partial<Record<InferenceTask, TaskProviderHelper>>>;
|
|
4
|
+
/**
|
|
5
|
+
* Get provider helper instance by name and task
|
|
6
|
+
*/
|
|
7
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "text-to-image"): TextToImageTaskHelper & TaskProviderHelper;
|
|
8
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "conversational"): ConversationalTaskHelper & TaskProviderHelper;
|
|
9
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "text-generation"): TextGenerationTaskHelper & TaskProviderHelper;
|
|
10
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "text-to-speech"): TextToSpeechTaskHelper & TaskProviderHelper;
|
|
11
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "text-to-audio"): TextToAudioTaskHelper & TaskProviderHelper;
|
|
12
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "automatic-speech-recognition"): AutomaticSpeechRecognitionTaskHelper & TaskProviderHelper;
|
|
13
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "text-to-video"): TextToVideoTaskHelper & TaskProviderHelper;
|
|
14
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "text-classification"): TextClassificationTaskHelper & TaskProviderHelper;
|
|
15
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "question-answering"): QuestionAnsweringTaskHelper & TaskProviderHelper;
|
|
16
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "audio-classification"): AudioClassificationTaskHelper & TaskProviderHelper;
|
|
17
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "audio-to-audio"): AudioToAudioTaskHelper & TaskProviderHelper;
|
|
18
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "fill-mask"): FillMaskTaskHelper & TaskProviderHelper;
|
|
19
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "feature-extraction"): FeatureExtractionTaskHelper & TaskProviderHelper;
|
|
20
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "image-classification"): ImageClassificationTaskHelper & TaskProviderHelper;
|
|
21
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "image-segmentation"): ImageSegmentationTaskHelper & TaskProviderHelper;
|
|
22
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "document-question-answering"): DocumentQuestionAnsweringTaskHelper & TaskProviderHelper;
|
|
23
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "image-to-text"): ImageToTextTaskHelper & TaskProviderHelper;
|
|
24
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "object-detection"): ObjectDetectionTaskHelper & TaskProviderHelper;
|
|
25
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "zero-shot-image-classification"): ZeroShotImageClassificationTaskHelper & TaskProviderHelper;
|
|
26
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "zero-shot-classification"): ZeroShotClassificationTaskHelper & TaskProviderHelper;
|
|
27
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "image-to-image"): ImageToImageTaskHelper & TaskProviderHelper;
|
|
28
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "sentence-similarity"): SentenceSimilarityTaskHelper & TaskProviderHelper;
|
|
29
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "table-question-answering"): TableQuestionAnsweringTaskHelper & TaskProviderHelper;
|
|
30
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "tabular-classification"): TabularClassificationTaskHelper & TaskProviderHelper;
|
|
31
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "tabular-regression"): TabularRegressionTaskHelper & TaskProviderHelper;
|
|
32
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "token-classification"): TokenClassificationTaskHelper & TaskProviderHelper;
|
|
33
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "translation"): TranslationTaskHelper & TaskProviderHelper;
|
|
34
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "summarization"): SummarizationTaskHelper & TaskProviderHelper;
|
|
35
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: "visual-question-answering"): VisualQuestionAnsweringTaskHelper & TaskProviderHelper;
|
|
36
|
+
export declare function getProviderHelper(provider: InferenceProvider, task: InferenceTask | undefined): TaskProviderHelper;
|
|
37
|
+
//# sourceMappingURL=getProviderHelper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProviderHelper.d.ts","sourceRoot":"","sources":["../../../src/lib/getProviderHelper.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,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E,aAAa,GACjB,qBAAqB,GAAG,kBAAkB,CAAC;AAC9C,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,EAAE,eAAe,GACnB,uBAAuB,GAAG,kBAAkB,CAAC;AAChD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,EAAE,2BAA2B,GAC/B,iCAAiC,GAAG,kBAAkB,CAAC;AAC1D,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,kBAAkB,CAAC"}
|
|
@@ -9,7 +9,6 @@ export declare function makeRequestOptions(args: RequestArgs & {
|
|
|
9
9
|
}, options?: Options & {
|
|
10
10
|
/** In most cases (unless we pass a endpointUrl) we know the task */
|
|
11
11
|
task?: InferenceTask;
|
|
12
|
-
chatCompletion?: boolean;
|
|
13
12
|
}): Promise<{
|
|
14
13
|
url: string;
|
|
15
14
|
info: RequestInit;
|
|
@@ -23,7 +22,6 @@ export declare function makeRequestOptionsFromResolvedModel(resolvedModel: strin
|
|
|
23
22
|
stream?: boolean;
|
|
24
23
|
}, options?: Options & {
|
|
25
24
|
task?: InferenceTask;
|
|
26
|
-
chatCompletion?: boolean;
|
|
27
25
|
}): {
|
|
28
26
|
url: string;
|
|
29
27
|
info: RequestInit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeRequestOptions.d.ts","sourceRoot":"","sources":["../../../src/lib/makeRequestOptions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"makeRequestOptions.d.ts","sourceRoot":"","sources":["../../../src/lib/makeRequestOptions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAWpE;;;GAGG;AACH,wBAAsB,kBAAkB,CACvC,IAAI,EAAE,WAAW,GAAG;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,WAAW,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,EACD,OAAO,CAAC,EAAE,OAAO,GAAG;IACnB,oEAAoE;IACpE,IAAI,CAAC,EAAE,aAAa,CAAC;CACrB,GACC,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC,CAiC7C;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CAClD,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,WAAW,GAAG;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,WAAW,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,EACD,OAAO,CAAC,EAAE,OAAO,GAAG;IACnB,IAAI,CAAC,EAAE,aAAa,CAAC;CACrB,GACC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAAE,CA8EpC"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* Thanks!
|
|
16
|
-
*/
|
|
17
|
-
import type { ProviderConfig } from "../types";
|
|
18
|
-
export declare const BLACK_FOREST_LABS_CONFIG: ProviderConfig;
|
|
1
|
+
import type { BodyParams, HeaderParams, UrlParams } from "../types";
|
|
2
|
+
import { TaskProviderHelper, type TextToImageTaskHelper } from "./providerHelper";
|
|
3
|
+
interface BlackForestLabsResponse {
|
|
4
|
+
id: string;
|
|
5
|
+
polling_url: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class BlackForestLabsTextToImageTask extends TaskProviderHelper implements TextToImageTaskHelper {
|
|
8
|
+
constructor();
|
|
9
|
+
preparePayload(params: BodyParams): Record<string, unknown>;
|
|
10
|
+
prepareHeaders(params: HeaderParams, binary: boolean): Record<string, string>;
|
|
11
|
+
makeRoute(params: UrlParams): string;
|
|
12
|
+
getResponse(response: BlackForestLabsResponse, url?: string, headers?: HeadersInit, outputType?: "url" | "blob"): Promise<string | Blob>;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
19
15
|
//# sourceMappingURL=black-forest-labs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"black-forest-labs.d.ts","sourceRoot":"","sources":["../../../src/providers/black-forest-labs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"black-forest-labs.d.ts","sourceRoot":"","sources":["../../../src/providers/black-forest-labs.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGlF,UAAU,uBAAuB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,8BAA+B,SAAQ,kBAAmB,YAAW,qBAAqB;;IAKtG,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQlD,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAWtF,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM;IAO9B,WAAW,CAChB,QAAQ,EAAE,uBAAuB,EACjC,GAAG,CAAC,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,WAAW,EACrB,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,GACzB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAgCzB"}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Thanks!
|
|
16
16
|
*/
|
|
17
|
-
import
|
|
18
|
-
export declare
|
|
17
|
+
import { BaseConversationalTask } from "./providerHelper";
|
|
18
|
+
export declare class CerebrasConversationalTask extends BaseConversationalTask {
|
|
19
|
+
constructor();
|
|
20
|
+
}
|
|
19
21
|
//# sourceMappingURL=cerebras.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cerebras.d.ts","sourceRoot":"","sources":["../../../src/providers/cerebras.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"cerebras.d.ts","sourceRoot":"","sources":["../../../src/providers/cerebras.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,qBAAa,0BAA2B,SAAQ,sBAAsB;;CAIrE"}
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Thanks!
|
|
16
16
|
*/
|
|
17
|
-
import
|
|
18
|
-
export declare
|
|
17
|
+
import { BaseConversationalTask } from "./providerHelper";
|
|
18
|
+
export declare class CohereConversationalTask extends BaseConversationalTask {
|
|
19
|
+
constructor();
|
|
20
|
+
makeRoute(): string;
|
|
21
|
+
}
|
|
19
22
|
//# sourceMappingURL=cohere.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cohere.d.ts","sourceRoot":"","sources":["../../../src/providers/cohere.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"cohere.d.ts","sourceRoot":"","sources":["../../../src/providers/cohere.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,qBAAa,wBAAyB,SAAQ,sBAAsB;;IAI1D,SAAS,IAAI,MAAM;CAG5B"}
|
|
@@ -1,9 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* See the registered mapping of HF model ID => Fal model ID here:
|
|
3
|
+
*
|
|
4
|
+
* https://huggingface.co/api/partners/fal-ai/models
|
|
5
|
+
*
|
|
6
|
+
* This is a publicly available mapping.
|
|
7
|
+
*
|
|
8
|
+
* If you want to try to run inference for a new model locally before it's registered on huggingface.co,
|
|
9
|
+
* you can add it to the dictionary "HARDCODED_MODEL_ID_MAPPING" in consts.ts, for dev purposes.
|
|
10
|
+
*
|
|
11
|
+
* - If you work at Fal and want to update this mapping, please use the model mapping API we provide on huggingface.co
|
|
12
|
+
* - If you're a community member and want to add a new supported HF model to Fal, please open an issue on the present repo
|
|
13
|
+
* and we will tag Fal team members.
|
|
14
|
+
*
|
|
15
|
+
* Thanks!
|
|
16
|
+
*/
|
|
17
|
+
import type { AutomaticSpeechRecognitionOutput } from "@huggingface/tasks";
|
|
18
|
+
import type { BodyParams, HeaderParams, UrlParams } from "../types";
|
|
19
|
+
import { type AutomaticSpeechRecognitionTaskHelper, TaskProviderHelper, type TextToImageTaskHelper, type TextToVideoTaskHelper } from "./providerHelper";
|
|
3
20
|
export interface FalAiQueueOutput {
|
|
4
21
|
request_id: string;
|
|
5
22
|
status: string;
|
|
6
23
|
response_url: string;
|
|
7
24
|
}
|
|
8
|
-
|
|
25
|
+
interface FalAITextToImageOutput {
|
|
26
|
+
images: Array<{
|
|
27
|
+
url: string;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
export declare const FAL_AI_SUPPORTED_BLOB_TYPES: string[];
|
|
31
|
+
declare abstract class FalAITask extends TaskProviderHelper {
|
|
32
|
+
constructor(url?: string);
|
|
33
|
+
preparePayload(params: BodyParams): Record<string, unknown>;
|
|
34
|
+
makeRoute(params: UrlParams): string;
|
|
35
|
+
prepareHeaders(params: HeaderParams, binary: boolean): Record<string, string>;
|
|
36
|
+
}
|
|
37
|
+
export declare class FalAITextToImageTask extends FalAITask implements TextToImageTaskHelper {
|
|
38
|
+
preparePayload(params: BodyParams): Record<string, unknown>;
|
|
39
|
+
getResponse(response: FalAITextToImageOutput, outputType?: "url" | "blob"): Promise<string | Blob>;
|
|
40
|
+
}
|
|
41
|
+
export declare class FalAITextToVideoTask extends FalAITask implements TextToVideoTaskHelper {
|
|
42
|
+
constructor();
|
|
43
|
+
makeRoute(params: UrlParams): string;
|
|
44
|
+
preparePayload(params: BodyParams): Record<string, unknown>;
|
|
45
|
+
getResponse(response: FalAiQueueOutput, url?: string, headers?: Record<string, string>): Promise<Blob>;
|
|
46
|
+
}
|
|
47
|
+
export declare class FalAIAutomaticSpeechRecognitionTask extends FalAITask implements AutomaticSpeechRecognitionTaskHelper {
|
|
48
|
+
prepareHeaders(params: HeaderParams, binary: boolean): Record<string, string>;
|
|
49
|
+
getResponse(response: unknown): Promise<AutomaticSpeechRecognitionOutput>;
|
|
50
|
+
}
|
|
51
|
+
export declare class FalAITextToSpeechTask extends FalAITask {
|
|
52
|
+
preparePayload(params: BodyParams): Record<string, unknown>;
|
|
53
|
+
getResponse(response: unknown): Promise<Blob>;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
9
56
|
//# sourceMappingURL=fal-ai.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fal-ai.d.ts","sourceRoot":"","sources":["../../../src/providers/fal-ai.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fal-ai.d.ts","sourceRoot":"","sources":["../../../src/providers/fal-ai.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAG3E,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGpE,OAAO,EACN,KAAK,oCAAoC,EACzC,kBAAkB,EAClB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,MAAM,kBAAkB,CA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;IACxG,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAKvE,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,gCAAgC,CAAC;CASxF;AAED,qBAAa,qBAAsB,SAAQ,SAAS;IAC1C,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQrD,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAqB5D"}
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Thanks!
|
|
16
16
|
*/
|
|
17
|
-
import
|
|
18
|
-
export declare
|
|
17
|
+
import { BaseConversationalTask } from "./providerHelper";
|
|
18
|
+
export declare class FireworksConversationalTask extends BaseConversationalTask {
|
|
19
|
+
constructor();
|
|
20
|
+
makeRoute(): string;
|
|
21
|
+
}
|
|
19
22
|
//# sourceMappingURL=fireworks-ai.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fireworks-ai.d.ts","sourceRoot":"","sources":["../../../src/providers/fireworks-ai.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"fireworks-ai.d.ts","sourceRoot":"","sources":["../../../src/providers/fireworks-ai.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,qBAAa,2BAA4B,SAAQ,sBAAsB;;IAK7D,SAAS,IAAI,MAAM;CAG5B"}
|
|
@@ -1,3 +1,126 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* HF-Inference do not have a mapping since all models use IDs from the Hub.
|
|
3
|
+
*
|
|
4
|
+
* If you want to try to run inference for a new model locally before it's registered on huggingface.co,
|
|
5
|
+
* you can add it to the dictionary "HARDCODED_MODEL_ID_MAPPING" in consts.ts, for dev purposes.
|
|
6
|
+
*
|
|
7
|
+
* - If you work at HF and want to update this mapping, please use the model mapping API we provide on huggingface.co
|
|
8
|
+
* - If you're a community member and want to add a new supported HF model to HF, please open an issue on the present repo
|
|
9
|
+
* and we will tag HF team members.
|
|
10
|
+
*
|
|
11
|
+
* Thanks!
|
|
12
|
+
*/
|
|
13
|
+
import type { AudioClassificationOutput, AutomaticSpeechRecognitionOutput, ChatCompletionOutput, DocumentQuestionAnsweringOutput, FeatureExtractionOutput, FillMaskOutput, ImageClassificationOutput, ImageSegmentationOutput, ImageToTextOutput, ObjectDetectionOutput, QuestionAnsweringOutput, SentenceSimilarityOutput, SummarizationOutput, TableQuestionAnsweringOutput, TextClassificationOutput, TextGenerationOutput, TokenClassificationOutput, TranslationOutput, VisualQuestionAnsweringOutput, ZeroShotClassificationOutput, ZeroShotImageClassificationOutput } from "@huggingface/tasks";
|
|
14
|
+
import type { TabularClassificationOutput } from "../tasks/tabular/tabularClassification";
|
|
15
|
+
import type { BodyParams, UrlParams } from "../types";
|
|
16
|
+
import type { AudioClassificationTaskHelper, AudioToAudioTaskHelper, AutomaticSpeechRecognitionTaskHelper, ConversationalTaskHelper, DocumentQuestionAnsweringTaskHelper, FeatureExtractionTaskHelper, FillMaskTaskHelper, ImageClassificationTaskHelper, ImageSegmentationTaskHelper, ImageToImageTaskHelper, ImageToTextTaskHelper, ObjectDetectionTaskHelper, QuestionAnsweringTaskHelper, SentenceSimilarityTaskHelper, SummarizationTaskHelper, TableQuestionAnsweringTaskHelper, TabularClassificationTaskHelper, TabularRegressionTaskHelper, TextClassificationTaskHelper, TextGenerationTaskHelper, TextToAudioTaskHelper, TextToImageTaskHelper, TextToSpeechTaskHelper, TokenClassificationTaskHelper, TranslationTaskHelper, VisualQuestionAnsweringTaskHelper, ZeroShotClassificationTaskHelper, ZeroShotImageClassificationTaskHelper } from "./providerHelper";
|
|
17
|
+
import { TaskProviderHelper } from "./providerHelper";
|
|
18
|
+
interface Base64ImageGeneration {
|
|
19
|
+
data: Array<{
|
|
20
|
+
b64_json: string;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
interface OutputUrlImageGeneration {
|
|
24
|
+
output: string[];
|
|
25
|
+
}
|
|
26
|
+
interface AudioToAudioOutput {
|
|
27
|
+
blob: string;
|
|
28
|
+
"content-type": string;
|
|
29
|
+
label: string;
|
|
30
|
+
}
|
|
31
|
+
export declare class HFInferenceTask extends TaskProviderHelper {
|
|
32
|
+
constructor();
|
|
33
|
+
preparePayload(params: BodyParams): Record<string, unknown>;
|
|
34
|
+
makeUrl(params: UrlParams): string;
|
|
35
|
+
makeRoute(params: UrlParams): string;
|
|
36
|
+
getResponse(response: unknown): Promise<unknown>;
|
|
37
|
+
}
|
|
38
|
+
export declare class HFInferenceTextToImageTask extends HFInferenceTask implements TextToImageTaskHelper {
|
|
39
|
+
getResponse(response: Base64ImageGeneration | OutputUrlImageGeneration, url?: string, headers?: HeadersInit, outputType?: "url" | "blob"): Promise<string | Blob>;
|
|
40
|
+
}
|
|
41
|
+
export declare class HFInferenceConversationalTask extends HFInferenceTask implements ConversationalTaskHelper {
|
|
42
|
+
makeUrl(params: UrlParams): string;
|
|
43
|
+
preparePayload(params: BodyParams): Record<string, unknown>;
|
|
44
|
+
getResponse(response: ChatCompletionOutput): Promise<ChatCompletionOutput>;
|
|
45
|
+
}
|
|
46
|
+
export declare class HFInferenceTextGenerationTask extends HFInferenceTask implements TextGenerationTaskHelper {
|
|
47
|
+
getResponse(response: TextGenerationOutput | TextGenerationOutput[]): Promise<TextGenerationOutput>;
|
|
48
|
+
}
|
|
49
|
+
export declare class HFInferenceAudioClassificationTask extends HFInferenceTask implements AudioClassificationTaskHelper {
|
|
50
|
+
getResponse(response: unknown): Promise<AudioClassificationOutput>;
|
|
51
|
+
}
|
|
52
|
+
export declare class HFInferenceAutomaticSpeechRecognitionTask extends HFInferenceTask implements AutomaticSpeechRecognitionTaskHelper {
|
|
53
|
+
getResponse(response: AutomaticSpeechRecognitionOutput): Promise<AutomaticSpeechRecognitionOutput>;
|
|
54
|
+
}
|
|
55
|
+
export declare class HFInferenceAudioToAudioTask extends HFInferenceTask implements AudioToAudioTaskHelper {
|
|
56
|
+
getResponse(response: AudioToAudioOutput[]): Promise<AudioToAudioOutput[]>;
|
|
57
|
+
}
|
|
58
|
+
export declare class HFInferenceDocumentQuestionAnsweringTask extends HFInferenceTask implements DocumentQuestionAnsweringTaskHelper {
|
|
59
|
+
getResponse(response: DocumentQuestionAnsweringOutput): Promise<DocumentQuestionAnsweringOutput[number]>;
|
|
60
|
+
}
|
|
61
|
+
export declare class HFInferenceFeatureExtractionTask extends HFInferenceTask implements FeatureExtractionTaskHelper {
|
|
62
|
+
getResponse(response: FeatureExtractionOutput): Promise<FeatureExtractionOutput>;
|
|
63
|
+
}
|
|
64
|
+
export declare class HFInferenceImageClassificationTask extends HFInferenceTask implements ImageClassificationTaskHelper {
|
|
65
|
+
getResponse(response: ImageClassificationOutput): Promise<ImageClassificationOutput>;
|
|
66
|
+
}
|
|
67
|
+
export declare class HFInferenceImageSegmentationTask extends HFInferenceTask implements ImageSegmentationTaskHelper {
|
|
68
|
+
getResponse(response: ImageSegmentationOutput): Promise<ImageSegmentationOutput>;
|
|
69
|
+
}
|
|
70
|
+
export declare class HFInferenceImageToTextTask extends HFInferenceTask implements ImageToTextTaskHelper {
|
|
71
|
+
getResponse(response: ImageToTextOutput): Promise<ImageToTextOutput>;
|
|
72
|
+
}
|
|
73
|
+
export declare class HFInferenceImageToImageTask extends HFInferenceTask implements ImageToImageTaskHelper {
|
|
74
|
+
getResponse(response: Blob): Promise<Blob>;
|
|
75
|
+
}
|
|
76
|
+
export declare class HFInferenceObjectDetectionTask extends HFInferenceTask implements ObjectDetectionTaskHelper {
|
|
77
|
+
getResponse(response: ObjectDetectionOutput): Promise<ObjectDetectionOutput>;
|
|
78
|
+
}
|
|
79
|
+
export declare class HFInferenceZeroShotImageClassificationTask extends HFInferenceTask implements ZeroShotImageClassificationTaskHelper {
|
|
80
|
+
getResponse(response: ZeroShotImageClassificationOutput): Promise<ZeroShotImageClassificationOutput>;
|
|
81
|
+
}
|
|
82
|
+
export declare class HFInferenceTextClassificationTask extends HFInferenceTask implements TextClassificationTaskHelper {
|
|
83
|
+
getResponse(response: TextClassificationOutput): Promise<TextClassificationOutput>;
|
|
84
|
+
}
|
|
85
|
+
export declare class HFInferenceQuestionAnsweringTask extends HFInferenceTask implements QuestionAnsweringTaskHelper {
|
|
86
|
+
getResponse(response: QuestionAnsweringOutput | QuestionAnsweringOutput[number]): Promise<QuestionAnsweringOutput[number]>;
|
|
87
|
+
}
|
|
88
|
+
export declare class HFInferenceFillMaskTask extends HFInferenceTask implements FillMaskTaskHelper {
|
|
89
|
+
getResponse(response: FillMaskOutput): Promise<FillMaskOutput>;
|
|
90
|
+
}
|
|
91
|
+
export declare class HFInferenceZeroShotClassificationTask extends HFInferenceTask implements ZeroShotClassificationTaskHelper {
|
|
92
|
+
getResponse(response: ZeroShotClassificationOutput): Promise<ZeroShotClassificationOutput>;
|
|
93
|
+
}
|
|
94
|
+
export declare class HFInferenceSentenceSimilarityTask extends HFInferenceTask implements SentenceSimilarityTaskHelper {
|
|
95
|
+
getResponse(response: SentenceSimilarityOutput): Promise<SentenceSimilarityOutput>;
|
|
96
|
+
}
|
|
97
|
+
export declare class HFInferenceTableQuestionAnsweringTask extends HFInferenceTask implements TableQuestionAnsweringTaskHelper {
|
|
98
|
+
static validate(elem: unknown): elem is TableQuestionAnsweringOutput[number];
|
|
99
|
+
getResponse(response: TableQuestionAnsweringOutput): Promise<TableQuestionAnsweringOutput[number]>;
|
|
100
|
+
}
|
|
101
|
+
export declare class HFInferenceTokenClassificationTask extends HFInferenceTask implements TokenClassificationTaskHelper {
|
|
102
|
+
getResponse(response: TokenClassificationOutput): Promise<TokenClassificationOutput>;
|
|
103
|
+
}
|
|
104
|
+
export declare class HFInferenceTranslationTask extends HFInferenceTask implements TranslationTaskHelper {
|
|
105
|
+
getResponse(response: TranslationOutput): Promise<TranslationOutput>;
|
|
106
|
+
}
|
|
107
|
+
export declare class HFInferenceSummarizationTask extends HFInferenceTask implements SummarizationTaskHelper {
|
|
108
|
+
getResponse(response: SummarizationOutput): Promise<SummarizationOutput>;
|
|
109
|
+
}
|
|
110
|
+
export declare class HFInferenceTextToSpeechTask extends HFInferenceTask implements TextToSpeechTaskHelper {
|
|
111
|
+
getResponse(response: Blob): Promise<Blob>;
|
|
112
|
+
}
|
|
113
|
+
export declare class HFInferenceTabularClassificationTask extends HFInferenceTask implements TabularClassificationTaskHelper {
|
|
114
|
+
getResponse(response: TabularClassificationOutput): Promise<TabularClassificationOutput>;
|
|
115
|
+
}
|
|
116
|
+
export declare class HFInferenceVisualQuestionAnsweringTask extends HFInferenceTask implements VisualQuestionAnsweringTaskHelper {
|
|
117
|
+
getResponse(response: VisualQuestionAnsweringOutput): Promise<VisualQuestionAnsweringOutput[number]>;
|
|
118
|
+
}
|
|
119
|
+
export declare class HFInferenceTabularRegressionTask extends HFInferenceTask implements TabularRegressionTaskHelper {
|
|
120
|
+
getResponse(response: number[]): Promise<number[]>;
|
|
121
|
+
}
|
|
122
|
+
export declare class HFInferenceTextToAudioTask extends HFInferenceTask implements TextToAudioTaskHelper {
|
|
123
|
+
getResponse(response: Blob): Promise<Blob>;
|
|
124
|
+
}
|
|
125
|
+
export {};
|
|
3
126
|
//# sourceMappingURL=hf-inference.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hf-inference.d.ts","sourceRoot":"","sources":["../../../src/providers/hf-inference.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hf-inference.d.ts","sourceRoot":"","sources":["../../../src/providers/hf-inference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EACX,yBAAyB,EACzB,gCAAgC,EAChC,oBAAoB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MvF;AAED,qBAAa,2BAA4B,SAAQ,eAAgB,YAAW,sBAAsB;IAClF,WAAW,CAAC,QAAQ,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzD;AAED,qBAAa,oCAAqC,SAAQ,eAAgB,YAAW,+BAA+B;IACpG,WAAW,CAAC,QAAQ,EAAE,2BAA2B,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAMvG;AAED,qBAAa,sCACZ,SAAQ,eACR,YAAW,iCAAiC;IAE7B,WAAW,CAAC,QAAQ,EAAE,6BAA6B,GAAG,OAAO,CAAC,6BAA6B,CAAC,MAAM,CAAC,CAAC;CAYnH;AAED,qBAAa,gCAAiC,SAAQ,eAAgB,YAAW,2BAA2B;IAC5F,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAMjE;AAED,qBAAa,0BAA2B,SAAQ,eAAgB,YAAW,qBAAqB;IAChF,WAAW,CAAC,QAAQ,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzD"}
|
|
@@ -14,6 +14,35 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Thanks!
|
|
16
16
|
*/
|
|
17
|
-
import type {
|
|
18
|
-
|
|
17
|
+
import type { ChatCompletionOutput, TextGenerationOutput } from "@huggingface/tasks";
|
|
18
|
+
import type { BodyParams, UrlParams } from "../types";
|
|
19
|
+
import { BaseConversationalTask, BaseTextGenerationTask, TaskProviderHelper, type TextToImageTaskHelper } from "./providerHelper";
|
|
20
|
+
export interface HyperbolicTextCompletionOutput extends Omit<ChatCompletionOutput, "choices"> {
|
|
21
|
+
choices: Array<{
|
|
22
|
+
message: {
|
|
23
|
+
content: string;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
27
|
+
interface HyperbolicTextToImageOutput {
|
|
28
|
+
images: Array<{
|
|
29
|
+
image: string;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
export declare class HyperbolicConversationalTask extends BaseConversationalTask {
|
|
33
|
+
constructor();
|
|
34
|
+
}
|
|
35
|
+
export declare class HyperbolicTextGenerationTask extends BaseTextGenerationTask {
|
|
36
|
+
constructor();
|
|
37
|
+
makeRoute(): string;
|
|
38
|
+
preparePayload(params: BodyParams): Record<string, unknown>;
|
|
39
|
+
getResponse(response: HyperbolicTextCompletionOutput): Promise<TextGenerationOutput>;
|
|
40
|
+
}
|
|
41
|
+
export declare class HyperbolicTextToImageTask extends TaskProviderHelper implements TextToImageTaskHelper {
|
|
42
|
+
constructor();
|
|
43
|
+
makeRoute(params: UrlParams): string;
|
|
44
|
+
preparePayload(params: BodyParams): Record<string, unknown>;
|
|
45
|
+
getResponse(response: HyperbolicTextToImageOutput, url?: string, headers?: HeadersInit, outputType?: "url" | "blob"): Promise<string | Blob>;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
19
48
|
//# sourceMappingURL=hyperbolic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hyperbolic.d.ts","sourceRoot":"","sources":["../../../src/providers/hyperbolic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"hyperbolic.d.ts","sourceRoot":"","sources":["../../../src/providers/hyperbolic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEtD,OAAO,EACN,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,qBAAqB,EAC1B,MAAM,kBAAkB,CAAC;AAI1B,MAAM,WAAW,8BAA+B,SAAQ,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAC5F,OAAO,EAAE,KAAK,CAAC;QACd,OAAO,EAAE;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;KAC7B,CAAC,CAAC;CACH;AAED,UAAU,2BAA2B;IACpC,MAAM,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjC;AAED,qBAAa,4BAA6B,SAAQ,sBAAsB;;CAIvE;AAED,qBAAa,4BAA6B,SAAQ,sBAAsB;;IAK9D,SAAS,IAAI,MAAM;IAInB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAcrD,WAAW,CAAC,QAAQ,EAAE,8BAA8B,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAenG;AAED,qBAAa,yBAA0B,SAAQ,kBAAmB,YAAW,qBAAqB;;IAKjG,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM;IAKpC,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IASrD,WAAW,CAChB,QAAQ,EAAE,2BAA2B,EACrC,GAAG,CAAC,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,WAAW,EACrB,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,GACzB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAgBzB"}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import type { BodyParams, UrlParams } from "../types";
|
|
2
|
+
import { BaseConversationalTask, BaseTextGenerationTask, TaskProviderHelper, type TextToImageTaskHelper } from "./providerHelper";
|
|
3
|
+
interface NebiusBase64ImageGeneration {
|
|
4
|
+
data: Array<{
|
|
5
|
+
b64_json: string;
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
8
|
+
export declare class NebiusConversationalTask extends BaseConversationalTask {
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
export declare class NebiusTextGenerationTask extends BaseTextGenerationTask {
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
14
|
+
export declare class NebiusTextToImageTask extends TaskProviderHelper implements TextToImageTaskHelper {
|
|
15
|
+
constructor();
|
|
16
|
+
preparePayload(params: BodyParams): Record<string, unknown>;
|
|
17
|
+
makeRoute(params: UrlParams): string;
|
|
18
|
+
getResponse(response: NebiusBase64ImageGeneration, url?: string, headers?: HeadersInit, outputType?: "url" | "blob"): Promise<string | Blob>;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
19
21
|
//# sourceMappingURL=nebius.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nebius.d.ts","sourceRoot":"","sources":["../../../src/providers/nebius.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nebius.d.ts","sourceRoot":"","sources":["../../../src/providers/nebius.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEtD,OAAO,EACN,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,qBAAqB,EAC1B,MAAM,kBAAkB,CAAC;AAI1B,UAAU,2BAA2B;IACpC,IAAI,EAAE,KAAK,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACH;AAED,qBAAa,wBAAyB,SAAQ,sBAAsB;;CAInE;AAED,qBAAa,wBAAyB,SAAQ,sBAAsB;;CAInE;AAED,qBAAa,qBAAsB,SAAQ,kBAAmB,YAAW,qBAAqB;;IAK7F,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAU3D,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM;IAK9B,WAAW,CAChB,QAAQ,EAAE,2BAA2B,EACrC,GAAG,CAAC,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,WAAW,EACrB,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,GACzB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAkBzB"}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import type { BodyParams, UrlParams } from "../types";
|
|
2
|
+
import { BaseConversationalTask, BaseTextGenerationTask, TaskProviderHelper, type TextToVideoTaskHelper } from "./providerHelper";
|
|
3
|
+
export interface NovitaOutput {
|
|
4
|
+
video: {
|
|
5
|
+
video_url: string;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export declare class NovitaTextGenerationTask extends BaseTextGenerationTask {
|
|
9
|
+
constructor();
|
|
10
|
+
makeRoute(): string;
|
|
11
|
+
}
|
|
12
|
+
export declare class NovitaConversationalTask extends BaseConversationalTask {
|
|
13
|
+
constructor();
|
|
14
|
+
makeRoute(): string;
|
|
15
|
+
}
|
|
16
|
+
export declare class NovitaTextToVideoTask extends TaskProviderHelper implements TextToVideoTaskHelper {
|
|
17
|
+
constructor();
|
|
18
|
+
makeRoute(params: UrlParams): string;
|
|
19
|
+
preparePayload(params: BodyParams): Record<string, unknown>;
|
|
20
|
+
getResponse(response: NovitaOutput): Promise<Blob>;
|
|
21
|
+
}
|
|
19
22
|
//# sourceMappingURL=novita.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"novita.d.ts","sourceRoot":"","sources":["../../../src/providers/novita.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"novita.d.ts","sourceRoot":"","sources":["../../../src/providers/novita.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEtD,OAAO,EACN,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,qBAAqB,EAC1B,MAAM,kBAAkB,CAAC;AAG1B,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE;QACN,SAAS,EAAE,MAAM,CAAC;KAClB,CAAC;CACF;AACD,qBAAa,wBAAyB,SAAQ,sBAAsB;;IAK1D,SAAS,IAAI,MAAM;CAG5B;AAED,qBAAa,wBAAyB,SAAQ,sBAAsB;;IAK1D,SAAS,IAAI,MAAM;CAG5B;AACD,qBAAa,qBAAsB,SAAQ,kBAAmB,YAAW,qBAAqB;;IAK7F,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM;IAIpC,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAO5C,WAAW,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAkBjE"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Special case: provider configuration for a private models provider (OpenAI in this case).
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
5
|
-
export declare
|
|
4
|
+
import { BaseConversationalTask } from "./providerHelper";
|
|
5
|
+
export declare class OpenAIConversationalTask extends BaseConversationalTask {
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
6
8
|
//# sourceMappingURL=openai.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/providers/openai.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/providers/openai.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAI1D,qBAAa,wBAAyB,SAAQ,sBAAsB;;CAKnE"}
|