@workglow/huggingface-transformers 0.2.33 → 0.2.35
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/dist/ai/HuggingFaceTransformersProvider.d.ts +9 -8
- package/dist/ai/HuggingFaceTransformersProvider.d.ts.map +1 -1
- package/dist/ai/HuggingFaceTransformersQueuedProvider.d.ts +10 -8
- package/dist/ai/HuggingFaceTransformersQueuedProvider.d.ts.map +1 -1
- package/dist/ai/common/HFT_BackgroundRemoval.d.ts.map +1 -1
- package/dist/ai/common/HFT_Capabilities.d.ts +28 -0
- package/dist/ai/common/HFT_Capabilities.d.ts.map +1 -0
- package/dist/ai/common/HFT_CapabilitySets.d.ts +39 -0
- package/dist/ai/common/HFT_CapabilitySets.d.ts.map +1 -0
- package/dist/ai/common/HFT_Chat.d.ts +1 -2
- package/dist/ai/common/HFT_Chat.d.ts.map +1 -1
- package/dist/ai/common/HFT_CountTokens.d.ts.map +1 -1
- package/dist/ai/common/HFT_Download.d.ts +7 -2
- package/dist/ai/common/HFT_Download.d.ts.map +1 -1
- package/dist/ai/common/{HFT_Unload.d.ts → HFT_DownloadRemove.d.ts} +3 -3
- package/dist/ai/common/HFT_DownloadRemove.d.ts.map +1 -0
- package/dist/ai/common/HFT_ImageClassification.d.ts.map +1 -1
- package/dist/ai/common/HFT_ImageEmbedding.d.ts.map +1 -1
- package/dist/ai/common/HFT_ImageSegmentation.d.ts.map +1 -1
- package/dist/ai/common/HFT_ImageToText.d.ts.map +1 -1
- package/dist/ai/common/HFT_JobRunFns.d.ts +9 -9
- package/dist/ai/common/HFT_JobRunFns.d.ts.map +1 -1
- package/dist/ai/common/HFT_ModelInfo.d.ts.map +1 -1
- package/dist/ai/common/HFT_ModelSchema.d.ts +3 -3
- package/dist/ai/common/HFT_ObjectDetection.d.ts.map +1 -1
- package/dist/ai/common/HFT_Pipeline.d.ts +30 -4
- package/dist/ai/common/HFT_Pipeline.d.ts.map +1 -1
- package/dist/ai/common/HFT_Streaming.d.ts +5 -12
- package/dist/ai/common/HFT_Streaming.d.ts.map +1 -1
- package/dist/ai/common/HFT_StructuredGeneration.d.ts +1 -2
- package/dist/ai/common/HFT_StructuredGeneration.d.ts.map +1 -1
- package/dist/ai/common/HFT_TextClassification.d.ts.map +1 -1
- package/dist/ai/common/HFT_TextEmbedding.d.ts +4 -0
- package/dist/ai/common/HFT_TextEmbedding.d.ts.map +1 -1
- package/dist/ai/common/HFT_TextFillMask.d.ts.map +1 -1
- package/dist/ai/common/HFT_TextGeneration.d.ts +1 -6
- package/dist/ai/common/HFT_TextGeneration.d.ts.map +1 -1
- package/dist/ai/common/HFT_TextLanguageDetection.d.ts.map +1 -1
- package/dist/ai/common/HFT_TextNamedEntityRecognition.d.ts.map +1 -1
- package/dist/ai/common/HFT_TextQuestionAnswer.d.ts +1 -6
- package/dist/ai/common/HFT_TextQuestionAnswer.d.ts.map +1 -1
- package/dist/ai/common/HFT_TextRewriter.d.ts +1 -6
- package/dist/ai/common/HFT_TextRewriter.d.ts.map +1 -1
- package/dist/ai/common/HFT_TextSummary.d.ts +1 -6
- package/dist/ai/common/HFT_TextSummary.d.ts.map +1 -1
- package/dist/ai/common/HFT_TextTranslation.d.ts +1 -6
- package/dist/ai/common/HFT_TextTranslation.d.ts.map +1 -1
- package/dist/ai/common/HFT_ToolCalling.d.ts +1 -2
- package/dist/ai/common/HFT_ToolCalling.d.ts.map +1 -1
- package/dist/ai/index.d.ts +53 -2
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/registerHuggingFaceTransformersInline.d.ts.map +1 -1
- package/dist/ai/registerHuggingFaceTransformersWorker.d.ts.map +1 -1
- package/dist/ai/runtime.d.ts.map +1 -1
- package/dist/ai-runtime.d.ts.map +1 -1
- package/dist/ai-runtime.js +602 -848
- package/dist/ai-runtime.js.map +37 -36
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +1383 -183
- package/dist/ai.js.map +37 -8
- package/package.json +12 -13
- package/dist/ai/common/HFT_Unload.d.ts.map +0 -1
|
@@ -4,24 +4,25 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { AiProvider } from "@workglow/ai/worker";
|
|
7
|
-
import type { AiProviderPreviewRunFn,
|
|
7
|
+
import type { AiProviderPreviewRunFn, AiProviderRunFnRegistration, Capability, ModelConfig, ModelRecord } from "@workglow/ai/worker";
|
|
8
8
|
import type { HfTransformersOnnxModelConfig } from "./common/HFT_ModelSchema";
|
|
9
9
|
/**
|
|
10
10
|
* AI provider for HuggingFace Transformers ONNX models.
|
|
11
11
|
*
|
|
12
|
-
* Supports text, vision, and multimodal tasks via the
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* `@huggingface/transformers` library is only imported where actually needed
|
|
16
|
-
* (inline mode, worker server), not on the main thread in worker mode.
|
|
12
|
+
* Supports text, vision, and multimodal tasks via the `@huggingface/transformers`
|
|
13
|
+
* library. Run-fn registrations are injected via the constructor so the heavy
|
|
14
|
+
* `@huggingface/transformers` import is only paid in worker contexts.
|
|
17
15
|
*/
|
|
18
16
|
export declare class HuggingFaceTransformersProvider extends AiProvider<HfTransformersOnnxModelConfig> {
|
|
19
17
|
readonly name = "HF_TRANSFORMERS_ONNX";
|
|
20
18
|
readonly displayName = "Hugging Face Transformers (ONNX)";
|
|
21
19
|
readonly isLocal = true;
|
|
22
20
|
readonly supportsBrowser = true;
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
constructor(promiseRunFns?: readonly AiProviderRunFnRegistration<any, any, HfTransformersOnnxModelConfig>[], previewTasks?: Record<string, AiProviderPreviewRunFn<any, any, HfTransformersOnnxModelConfig>>);
|
|
22
|
+
inferCapabilities(model: ModelRecord): readonly Capability[];
|
|
23
|
+
protected workerRunFnSpecs(): readonly {
|
|
24
|
+
serves: readonly Capability[];
|
|
25
|
+
}[];
|
|
25
26
|
createSession(_model: ModelConfig): string;
|
|
26
27
|
disposeSession(sessionId: string): Promise<void>;
|
|
27
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HuggingFaceTransformersProvider.d.ts","sourceRoot":"","sources":["../../src/ai/HuggingFaceTransformersProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EACV,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"HuggingFaceTransformersProvider.d.ts","sourceRoot":"","sources":["../../src/ai/HuggingFaceTransformersProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,UAAU,EACV,WAAW,EACX,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAG9E;;;;;;GAMG;AACH,qBAAa,+BAAgC,SAAQ,UAAU,CAAC,6BAA6B,CAAC;IAC5F,QAAQ,CAAC,IAAI,0BAAwB;IACrC,QAAQ,CAAC,WAAW,sCAAsC;IAC1D,QAAQ,CAAC,OAAO,QAAQ;IACxB,QAAQ,CAAC,eAAe,QAAQ;IAEhC,YACE,aAAa,CAAC,EAAE,SAAS,2BAA2B,CAElD,GAAG,EAEH,GAAG,EACH,6BAA6B,CAC9B,EAAE,EACH,YAAY,CAAC,EAAE,MAAM,CACnB,MAAM,EAEN,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,6BAA6B,CAAC,CAChE,EAGF;IAEQ,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,UAAU,EAAE,CAEpE;IAED,UAAmB,gBAAgB,IAAI,SAAS;QAAE,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;KAAE,EAAE,CAElF;IAEQ,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAElD;IAEc,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D;CACF"}
|
|
@@ -4,14 +4,13 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { QueuedAiProvider } from "@workglow/ai";
|
|
7
|
-
import type {
|
|
7
|
+
import type { AiProviderPreviewRunFn, AiProviderRegisterOptions, AiProviderRunFnRegistration, Capability, IAiExecutionStrategy, ModelConfig, ModelRecord } from "@workglow/ai";
|
|
8
8
|
import type { HfTransformersOnnxModelConfig } from "./common/HFT_ModelSchema";
|
|
9
9
|
/**
|
|
10
|
-
* Main-thread registration (inline or worker-backed).
|
|
11
|
-
* WebGPU/GPU/Metal models use the `gpu` slot (or a numeric `queue.concurrency`,
|
|
12
|
-
* WASM/CPU models use a separate {@link HF_TRANSFORMERS_ONNX_CPU}
|
|
13
|
-
* concurrency (4 in production, 1 under automated tests)
|
|
14
|
-
* Set `cpu` in `queue.concurrency` to override the default.
|
|
10
|
+
* Main-thread registration (inline or worker-backed) for the HFT provider.
|
|
11
|
+
* WebGPU/GPU/Metal models use the `gpu` slot (or a numeric `queue.concurrency`,
|
|
12
|
+
* default 1). WASM/CPU models use a separate {@link HF_TRANSFORMERS_ONNX_CPU}
|
|
13
|
+
* queue with higher concurrency (4 in production, 1 under automated tests).
|
|
15
14
|
*/
|
|
16
15
|
export declare class HuggingFaceTransformersQueuedProvider extends QueuedAiProvider<HfTransformersOnnxModelConfig> {
|
|
17
16
|
readonly name = "HF_TRANSFORMERS_ONNX";
|
|
@@ -19,8 +18,11 @@ export declare class HuggingFaceTransformersQueuedProvider extends QueuedAiProvi
|
|
|
19
18
|
readonly isLocal = true;
|
|
20
19
|
readonly supportsBrowser = true;
|
|
21
20
|
private cpuStrategy;
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
constructor(promiseRunFns?: readonly AiProviderRunFnRegistration<any, any, HfTransformersOnnxModelConfig>[], previewTasks?: Record<string, AiProviderPreviewRunFn<any, any, HfTransformersOnnxModelConfig>>);
|
|
22
|
+
inferCapabilities(model: ModelRecord): readonly Capability[];
|
|
23
|
+
protected workerRunFnSpecs(): readonly {
|
|
24
|
+
serves: readonly Capability[];
|
|
25
|
+
}[];
|
|
24
26
|
createSession(_model: ModelConfig): string;
|
|
25
27
|
disposeSession(sessionId: string): Promise<void>;
|
|
26
28
|
protected afterRegister(options: AiProviderRegisterOptions): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HuggingFaceTransformersQueuedProvider.d.ts","sourceRoot":"","sources":["../../src/ai/HuggingFaceTransformersQueuedProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"HuggingFaceTransformersQueuedProvider.d.ts","sourceRoot":"","sources":["../../src/ai/HuggingFaceTransformersQueuedProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EACV,sBAAsB,EACtB,yBAAyB,EAEzB,2BAA2B,EAC3B,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,WAAW,EACZ,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAsC9E;;;;;GAKG;AACH,qBAAa,qCAAsC,SAAQ,gBAAgB,CAAC,6BAA6B,CAAC;IACxG,QAAQ,CAAC,IAAI,0BAAwB;IACrC,QAAQ,CAAC,WAAW,sCAAsC;IAC1D,QAAQ,CAAC,OAAO,QAAQ;IACxB,QAAQ,CAAC,eAAe,QAAQ;IAEhC,OAAO,CAAC,WAAW,CAAmC;IAEtD,YACE,aAAa,CAAC,EAAE,SAAS,2BAA2B,CAElD,GAAG,EAEH,GAAG,EACH,6BAA6B,CAC9B,EAAE,EACH,YAAY,CAAC,EAAE,MAAM,CACnB,MAAM,EAEN,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,6BAA6B,CAAC,CAChE,EAGF;IAEQ,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,UAAU,EAAE,CAEpE;IAED,UAAmB,gBAAgB,IAAI,SAAS;QAAE,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;KAAE,EAAE,CAElF;IAEQ,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAElD;IAEc,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D;IAED,UAAyB,aAAa,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAOxF;IAED,UAAmB,mBAAmB,CAAC,KAAK,EAAE,WAAW,GAAG,oBAAoB,CAM/E;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_BackgroundRemoval.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_BackgroundRemoval.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAavE;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,eAAe,CACjD,0BAA0B,EAC1B,2BAA2B,EAC3B,6BAA6B,
|
|
1
|
+
{"version":3,"file":"HFT_BackgroundRemoval.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_BackgroundRemoval.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAavE;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,eAAe,CACjD,0BAA0B,EAC1B,2BAA2B,EAC3B,6BAA6B,CAe9B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Capability, ModelRecord } from "@workglow/ai/worker";
|
|
7
|
+
export declare const HFT_RUN_FN_SPECS: {
|
|
8
|
+
serves: ["image.background-removal"] | ["image.classification"] | ["image.embedding"] | ["image.object-detection"] | ["image.segmentation"] | ["image.to-text"] | ["model.count-tokens"] | ["model.download"] | ["model.download-remove"] | ["model.info"] | ["model.search"] | ["text.classification"] | ["text.embedding"] | ["text.fill-mask"] | ["text.generation"] | ["text.language-detection"] | ["text.ner"] | ["text.question-answering"] | ["text.rewriter"] | ["text.summary"] | ["text.translation"] | ["text.generation", "json-mode"] | ["text.generation", "tool-use"];
|
|
9
|
+
}[];
|
|
10
|
+
export declare function hftWorkerRunFnSpecs(): readonly {
|
|
11
|
+
readonly serves: readonly Capability[];
|
|
12
|
+
}[];
|
|
13
|
+
type CapabilityHints = Pick<ModelRecord, "model_id" | "provider_config" | "capabilities">;
|
|
14
|
+
/**
|
|
15
|
+
* Heuristic capability inference for a HuggingFace Transformers
|
|
16
|
+
* {@link ModelRecord}.
|
|
17
|
+
*
|
|
18
|
+
* HFT model ids come from the HF Hub catalog (e.g. `Xenova/all-MiniLM-L6-v2`,
|
|
19
|
+
* `onnx-community/Llama-3.2-1B-Instruct-q4f16`, `Xenova/clip-vit-base-patch32`).
|
|
20
|
+
* Heuristics inspect a normalized suffix and `provider_config.pipeline_task`
|
|
21
|
+
* if present (HF tags each repo with a pipeline-task hint).
|
|
22
|
+
*
|
|
23
|
+
* If `capabilities` is already declared on the record, those win unconditionally
|
|
24
|
+
* (HF Hub repo metadata is the most authoritative signal we have).
|
|
25
|
+
*/
|
|
26
|
+
export declare function inferHftCapabilities(model: CapabilityHints): readonly Capability[];
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=HFT_Capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HFT_Capabilities.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_Capabilities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGnE,eAAO,MAAM,gBAAgB;;GAAoD,CAAC;AAElF,wBAAgB,mBAAmB,IAAI,SAAS;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;CAAE,EAAE,CAE3F;AAED,KAAK,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,iBAAiB,GAAG,cAAc,CAAC,CAAC;AAE1F;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,UAAU,EAAE,CAqGlF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Single source of truth for HuggingFace Transformers' capability sets.
|
|
8
|
+
*
|
|
9
|
+
* Both `HFT_RUN_FNS` (worker-side registration) and `workerRunFnSpecs()`
|
|
10
|
+
* (main-thread proxy declaration) derive their `serves` arrays from these
|
|
11
|
+
* named exports. SDK-free so the main thread can import without paying the
|
|
12
|
+
* `@huggingface/transformers` cost.
|
|
13
|
+
*/
|
|
14
|
+
export declare const HFT_TEXT_GENERATION: ["text.generation"];
|
|
15
|
+
export declare const HFT_TOOL_USE: ["text.generation", "tool-use"];
|
|
16
|
+
export declare const HFT_JSON_MODE: ["text.generation", "json-mode"];
|
|
17
|
+
export declare const HFT_TEXT_REWRITER: ["text.rewriter"];
|
|
18
|
+
export declare const HFT_TEXT_SUMMARY: ["text.summary"];
|
|
19
|
+
export declare const HFT_TEXT_TRANSLATION: ["text.translation"];
|
|
20
|
+
export declare const HFT_TEXT_QUESTION_ANSWERING: ["text.question-answering"];
|
|
21
|
+
export declare const HFT_TEXT_EMBEDDING: ["text.embedding"];
|
|
22
|
+
export declare const HFT_TEXT_CLASSIFICATION: ["text.classification"];
|
|
23
|
+
export declare const HFT_TEXT_LANGUAGE_DETECTION: ["text.language-detection"];
|
|
24
|
+
export declare const HFT_TEXT_FILL_MASK: ["text.fill-mask"];
|
|
25
|
+
export declare const HFT_TEXT_NER: ["text.ner"];
|
|
26
|
+
export declare const HFT_IMAGE_CLASSIFICATION: ["image.classification"];
|
|
27
|
+
export declare const HFT_IMAGE_EMBEDDING: ["image.embedding"];
|
|
28
|
+
export declare const HFT_IMAGE_SEGMENTATION: ["image.segmentation"];
|
|
29
|
+
export declare const HFT_IMAGE_TO_TEXT: ["image.to-text"];
|
|
30
|
+
export declare const HFT_IMAGE_BACKGROUND_REMOVAL: ["image.background-removal"];
|
|
31
|
+
export declare const HFT_IMAGE_OBJECT_DETECTION: ["image.object-detection"];
|
|
32
|
+
export declare const HFT_COUNT_TOKENS: ["model.count-tokens"];
|
|
33
|
+
export declare const HFT_MODEL_DOWNLOAD_REMOVE: ["model.download-remove"];
|
|
34
|
+
export declare const HFT_MODEL_DOWNLOAD: ["model.download"];
|
|
35
|
+
export declare const HFT_MODEL_SEARCH: ["model.search"];
|
|
36
|
+
export declare const HFT_MODEL_INFO: ["model.info"];
|
|
37
|
+
/** Aggregated list — for `workerRunFnSpecs()` derivation. Order MUST match `HFT_RUN_FNS`. */
|
|
38
|
+
export declare const HFT_CAPABILITY_SETS: readonly [["text.generation"], ["text.generation", "tool-use"], ["text.generation", "json-mode"], ["text.rewriter"], ["text.summary"], ["text.translation"], ["text.question-answering"], ["text.embedding"], ["text.classification"], ["text.language-detection"], ["text.fill-mask"], ["text.ner"], ["image.classification"], ["image.embedding"], ["image.segmentation"], ["image.to-text"], ["image.background-removal"], ["image.object-detection"], ["model.count-tokens"], ["model.download-remove"], ["model.download"], ["model.search"], ["model.info"]];
|
|
39
|
+
//# sourceMappingURL=HFT_CapabilitySets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HFT_CapabilitySets.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_CapabilitySets.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,qBAAsD,CAAC;AACvF,eAAO,MAAM,YAAY,iCAAkE,CAAC;AAC5F,eAAO,MAAM,aAAa,kCAAmE,CAAC;AAC9F,eAAO,MAAM,iBAAiB,mBAAoD,CAAC;AACnF,eAAO,MAAM,gBAAgB,kBAAmD,CAAC;AACjF,eAAO,MAAM,oBAAoB,sBAAuD,CAAC;AACzF,eAAO,MAAM,2BAA2B,6BAEP,CAAC;AAClC,eAAO,MAAM,kBAAkB,oBAAqD,CAAC;AACrF,eAAO,MAAM,uBAAuB,yBAA0D,CAAC;AAC/F,eAAO,MAAM,2BAA2B,6BAEP,CAAC;AAClC,eAAO,MAAM,kBAAkB,oBAAqD,CAAC;AACrF,eAAO,MAAM,YAAY,cAA+C,CAAC;AACzE,eAAO,MAAM,wBAAwB,0BAA2D,CAAC;AACjG,eAAO,MAAM,mBAAmB,qBAAsD,CAAC;AACvF,eAAO,MAAM,sBAAsB,wBAAyD,CAAC;AAC7F,eAAO,MAAM,iBAAiB,mBAAoD,CAAC;AACnF,eAAO,MAAM,4BAA4B,8BAER,CAAC;AAClC,eAAO,MAAM,0BAA0B,4BAEN,CAAC;AAClC,eAAO,MAAM,gBAAgB,wBAAyD,CAAC;AACvF,eAAO,MAAM,yBAAyB,2BAA4D,CAAC;AACnG,eAAO,MAAM,kBAAkB,oBAAqD,CAAC;AACrF,eAAO,MAAM,gBAAgB,kBAAmD,CAAC;AACjF,eAAO,MAAM,cAAc,gBAAiD,CAAC;AAE7E,6FAA6F;AAC7F,eAAO,MAAM,mBAAmB,oiBAwBtB,CAAC"}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Copyright 2026 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiChatProviderInput, AiChatProviderOutput, AiProviderRunFn
|
|
6
|
+
import type { AiChatProviderInput, AiChatProviderOutput, AiProviderRunFn } from "@workglow/ai";
|
|
7
7
|
import type { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema";
|
|
8
8
|
export declare const HFT_Chat: AiProviderRunFn<AiChatProviderInput, AiChatProviderOutput, HfTransformersOnnxModelConfig>;
|
|
9
|
-
export declare const HFT_Chat_Stream: AiProviderStreamFn<AiChatProviderInput, AiChatProviderOutput, HfTransformersOnnxModelConfig>;
|
|
10
9
|
//# sourceMappingURL=HFT_Chat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_Chat.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_Chat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"HFT_Chat.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_Chat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/F,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AA6IvE,eAAO,MAAM,QAAQ,EAAE,eAAe,CACpC,mBAAmB,EACnB,oBAAoB,EACpB,6BAA6B,CAM9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_CountTokens.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_CountTokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"HFT_CountTokens.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_CountTokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAevE,eAAO,MAAM,eAAe,EAAE,eAAe,CAC3C,oBAAoB,EACpB,qBAAqB,EACrB,6BAA6B,CAI9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,sBAAsB,CAC1D,oBAAoB,EACpB,qBAAqB,EACrB,6BAA6B,CAG9B,CAAC"}
|
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, ModelDownloadTaskRunInput, ModelDownloadTaskRunOutput } from "@workglow/ai";
|
|
7
7
|
import type { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema";
|
|
8
8
|
/**
|
|
9
9
|
* Core implementation for downloading and caching a Hugging Face Transformers model.
|
|
10
10
|
* This is shared between inline and worker implementations.
|
|
11
|
+
*
|
|
12
|
+
* The download is the entire operation, so progress is forwarded via `phase`
|
|
13
|
+
* stream events through the `emit` callback passed to {@link getPipeline}. The
|
|
14
|
+
* {@link StreamProcessor} consumer translates each phase event into a task-level
|
|
15
|
+
* progress callback.
|
|
11
16
|
*/
|
|
12
|
-
export declare const HFT_Download: AiProviderRunFn<
|
|
17
|
+
export declare const HFT_Download: AiProviderRunFn<ModelDownloadTaskRunInput, ModelDownloadTaskRunOutput, HfTransformersOnnxModelConfig>;
|
|
13
18
|
//# sourceMappingURL=HFT_Download.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_Download.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_Download.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE
|
|
1
|
+
{"version":3,"file":"HFT_Download.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_Download.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,eAAe,CACxC,yBAAyB,EACzB,0BAA0B,EAC1B,6BAA6B,CAY9B,CAAC"}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, ModelDownloadRemoveTaskRunInput, ModelDownloadRemoveTaskRunOutput } from "@workglow/ai";
|
|
7
7
|
import type { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema";
|
|
8
8
|
/**
|
|
9
9
|
* Core implementation for unloading a Hugging Face Transformers model.
|
|
10
10
|
* This is shared between inline and worker implementations.
|
|
11
11
|
*/
|
|
12
|
-
export declare const
|
|
13
|
-
//# sourceMappingURL=
|
|
12
|
+
export declare const HFT_DownloadRemove: AiProviderRunFn<ModelDownloadRemoveTaskRunInput, ModelDownloadRemoveTaskRunOutput, HfTransformersOnnxModelConfig>;
|
|
13
|
+
//# sourceMappingURL=HFT_DownloadRemove.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HFT_DownloadRemove.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_DownloadRemove.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,+BAA+B,EAC/B,gCAAgC,EACjC,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AA2DvE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAC9C,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,CAkB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_ImageClassification.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_ImageClassification.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EACV,eAAe,EACf,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,eAAe,CACnD,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,
|
|
1
|
+
{"version":3,"file":"HFT_ImageClassification.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_ImageClassification.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EACV,eAAe,EACf,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,eAAe,CACnD,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,CA+C9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_ImageEmbedding.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_ImageEmbedding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAC9C,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,
|
|
1
|
+
{"version":3,"file":"HFT_ImageEmbedding.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_ImageEmbedding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAC9C,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,CAgC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_ImageSegmentation.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_ImageSegmentation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,eAAe,CACjD,0BAA0B,EAC1B,2BAA2B,EAC3B,6BAA6B,
|
|
1
|
+
{"version":3,"file":"HFT_ImageSegmentation.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_ImageSegmentation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,eAAe,CACjD,0BAA0B,EAC1B,2BAA2B,EAC3B,6BAA6B,CAyB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_ImageToText.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_ImageToText.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAGjG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,eAAe,CAC3C,oBAAoB,EACpB,qBAAqB,EACrB,6BAA6B,
|
|
1
|
+
{"version":3,"file":"HFT_ImageToText.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_ImageToText.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAGjG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,eAAe,CAC3C,oBAAoB,EACpB,qBAAqB,EACrB,6BAA6B,CAgB9B,CAAC"}
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderPreviewRunFn,
|
|
6
|
+
import type { AiProviderPreviewRunFn, AiProviderRunFnRegistration } from "@workglow/ai";
|
|
7
7
|
import type { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema";
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Capability-set run-fn registrations for HuggingFace Transformers (ONNX).
|
|
10
|
+
*
|
|
11
|
+
* Order is significant only as a tiebreaker — the dispatcher prefers the
|
|
12
|
+
* smallest `serves` set that is a superset of the task's `requires`, so the
|
|
13
|
+
* bare `["text.generation"]` entry wins for {@link TextGenerationTask} /
|
|
14
|
+
* {@link AiChatTask}, while `["text.generation", "tool-use"]` wins for
|
|
15
|
+
* {@link ToolCallingTask}.
|
|
12
16
|
*/
|
|
13
|
-
export declare const
|
|
14
|
-
/**
|
|
15
|
-
* Streaming variants of HuggingFace Transformers task run functions.
|
|
16
|
-
*/
|
|
17
|
-
export declare const HFT_STREAM_TASKS: Record<string, AiProviderStreamFn<any, any, HfTransformersOnnxModelConfig>>;
|
|
17
|
+
export declare const HFT_RUN_FNS: readonly AiProviderRunFnRegistration<any, any, HfTransformersOnnxModelConfig>[];
|
|
18
18
|
export declare const HFT_PREVIEW_TASKS: Record<string, AiProviderPreviewRunFn<any, any, HfTransformersOnnxModelConfig>>;
|
|
19
19
|
//# sourceMappingURL=HFT_JobRunFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_JobRunFns.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_JobRunFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"HFT_JobRunFns.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_JobRunFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,sBAAsB,EAEtB,2BAA2B,EAC5B,MAAM,cAAc,CAAC;AA0BtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAiDvE;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,2BAA2B,CAE5D,GAAG,EAEH,GAAG,EACH,6BAA6B,CAC9B,EAwBA,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,MAAM,EAEN,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,6BAA6B,CAAC,CAGhE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_ModelInfo.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_ModelInfo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAIvE,eAAO,MAAM,aAAa,EAAE,eAAe,CACzC,kBAAkB,EAClB,mBAAmB,EACnB,6BAA6B,
|
|
1
|
+
{"version":3,"file":"HFT_ModelInfo.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_ModelInfo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAIvE,eAAO,MAAM,aAAa,EAAE,eAAe,CACzC,kBAAkB,EAClB,mBAAmB,EACnB,6BAA6B,CAyH9B,CAAC"}
|
|
@@ -115,7 +115,7 @@ export declare const HfTransformersOnnxModelRecordSchema: {
|
|
|
115
115
|
readonly model_id: {
|
|
116
116
|
readonly type: "string";
|
|
117
117
|
};
|
|
118
|
-
readonly
|
|
118
|
+
readonly capabilities: {
|
|
119
119
|
readonly type: "array";
|
|
120
120
|
readonly items: {
|
|
121
121
|
readonly type: "string";
|
|
@@ -233,7 +233,7 @@ export declare const HfTransformersOnnxModelRecordSchema: {
|
|
|
233
233
|
};
|
|
234
234
|
};
|
|
235
235
|
};
|
|
236
|
-
readonly required: readonly ["model_id", "
|
|
236
|
+
readonly required: readonly ["model_id", "capabilities", "provider", "title", "description", "provider_config", "metadata", "provider", "provider_config"];
|
|
237
237
|
readonly additionalProperties: false;
|
|
238
238
|
};
|
|
239
239
|
export type HfTransformersOnnxModelRecord = FromSchema<typeof HfTransformersOnnxModelRecordSchema>;
|
|
@@ -243,7 +243,7 @@ export declare const HfTransformersOnnxModelConfigSchema: {
|
|
|
243
243
|
readonly model_id: {
|
|
244
244
|
readonly type: "string";
|
|
245
245
|
};
|
|
246
|
-
readonly
|
|
246
|
+
readonly capabilities: {
|
|
247
247
|
readonly type: "array";
|
|
248
248
|
readonly items: {
|
|
249
249
|
readonly type: "string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_ObjectDetection.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_ObjectDetection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EACV,eAAe,EACf,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,eAAe,CAC/C,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,
|
|
1
|
+
{"version":3,"file":"HFT_ObjectDetection.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_ObjectDetection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EACV,eAAe,EACf,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,eAAe,CAC/C,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,CA8C9B,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { DynamicCache, PretrainedModelOptions } from "@huggingface/transformers";
|
|
7
|
+
import type { StreamPhase } from "@workglow/task-graph";
|
|
7
8
|
import type { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema";
|
|
8
9
|
type TransformersSDKModule = typeof import("@huggingface/transformers");
|
|
9
10
|
/**
|
|
@@ -42,11 +43,36 @@ export declare function disposeHftSessionsForModel(modelPath: string): void;
|
|
|
42
43
|
*/
|
|
43
44
|
export declare const HFT_NULL_PROCESSOR_PREFIX = "HFT_NULL_PROCESSOR:";
|
|
44
45
|
/**
|
|
45
|
-
* Clear all cached pipelines
|
|
46
|
+
* Clear all cached pipelines. Best-effort calls `.dispose()` on each pipeline's
|
|
47
|
+
* underlying ONNX model so its native (WASM) memory is released immediately —
|
|
48
|
+
* dropping the JS reference alone leaks ONNX sessions, which accumulate across
|
|
49
|
+
* test files and OOM-kill the next file's pipeline load. Any dispose Promise
|
|
50
|
+
* is intentionally not awaited (synchronous API is required by the many
|
|
51
|
+
* callers); native free happens synchronously inside dispose.
|
|
46
52
|
*/
|
|
47
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Clear all cached pipelines. Best-effort awaits `model.dispose()` on each
|
|
55
|
+
* pipeline so its ONNX sessions release their WASM memory before the cache
|
|
56
|
+
* is cleared. transformers.js's dispose is async (it awaits `session.release()`
|
|
57
|
+
* on every session in `model.sessions`); calling it synchronously would
|
|
58
|
+
* fire-and-forget the WASM release.
|
|
59
|
+
*/
|
|
60
|
+
export declare function clearPipelineCache(): Promise<void>;
|
|
48
61
|
export declare function hasCachedPipeline(cacheKey: string): boolean;
|
|
49
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Remove a pipeline from the cache and asynchronously dispose its underlying
|
|
64
|
+
* ONNX sessions. transformers.js's `model.dispose()` is async — it iterates
|
|
65
|
+
* `model.sessions` and awaits `session.release?.()` on each, which is what
|
|
66
|
+
* actually frees the WASM session memory. Dropping the JS reference alone
|
|
67
|
+
* leaks ONNX sessions because the WASM heap doesn't shrink in response to V8
|
|
68
|
+
* GC; explicit `release()` is required.
|
|
69
|
+
*
|
|
70
|
+
* Returns the model.dispose() promise; callers that can await it should
|
|
71
|
+
* (e.g. inside HFT_DownloadRemove's async generator) so the WASM release completes
|
|
72
|
+
* before the next operation. Best-effort: dispose failure does not prevent
|
|
73
|
+
* cache eviction.
|
|
74
|
+
*/
|
|
75
|
+
export declare function removeCachedPipeline(cacheKey: string): Promise<boolean>;
|
|
50
76
|
/**
|
|
51
77
|
* Generate a cache key for a pipeline that includes all configuration options
|
|
52
78
|
* that affect pipeline creation (model_path, pipeline, dtype, device)
|
|
@@ -58,6 +84,6 @@ export declare function getPipelineCacheKey(model: HfTransformersOnnxModelConfig
|
|
|
58
84
|
*
|
|
59
85
|
* Explicit `Promise<any>` return avoids TS2883 (inferred type not portable across package boundaries).
|
|
60
86
|
*/
|
|
61
|
-
export declare function getPipeline(model: HfTransformersOnnxModelConfig,
|
|
87
|
+
export declare function getPipeline(model: HfTransformersOnnxModelConfig, emit: (event: StreamPhase) => void, options?: PretrainedModelOptions, signal?: AbortSignal, progressScaleMax?: number): Promise<any>;
|
|
62
88
|
export {};
|
|
63
89
|
//# sourceMappingURL=HFT_Pipeline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_Pipeline.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_Pipeline.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAgB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"HFT_Pipeline.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_Pipeline.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAgB,MAAM,2BAA2B,CAAC;AACpG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAEvE,KAAK,qBAAqB,GAAG,cAAc,2BAA2B,CAAC,CAAC;AAMxE;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAKhD;AAGD,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAiB1E;AAkJD,UAAU,cAAc;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B;;;yCAGqC;IACrC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC3D,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AAED,MAAM,MAAM,eAAe,GAAG,sBAAsB,GAAG,qBAAqB,CAAC;AAI7E,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAE5E;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI,CAE7E;AAgBD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAM3D;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAOlE;AAsBD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAE/D;;;;;;;GAOG;AACH;;;;;;GAMG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAaxD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAY7E;AAYD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,6BAA6B,GAAG,MAAM,CAKhF;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,6BAA6B,EACpC,IAAI,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,EAClC,OAAO,GAAE,sBAA2B,EACpC,MAAM,CAAC,EAAE,WAAW,EACpB,gBAAgB,GAAE,MAAW,GAC5B,OAAO,CAAC,GAAG,CAAC,CAoCd"}
|
|
@@ -4,20 +4,13 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { TextStreamer } from "@huggingface/transformers";
|
|
7
|
-
import type { StreamEvent } from "@workglow/task-graph";
|
|
8
|
-
export type StreamEventQueue<T> = {
|
|
9
|
-
push: (event: T) => void;
|
|
10
|
-
done: () => void;
|
|
11
|
-
error: (err: Error) => void;
|
|
12
|
-
iterable: AsyncIterable<T>;
|
|
13
|
-
};
|
|
14
|
-
export declare function createStreamEventQueue<T>(): StreamEventQueue<T>;
|
|
15
7
|
/**
|
|
16
|
-
* Creates a TextStreamer that
|
|
17
|
-
* The pipeline
|
|
18
|
-
*
|
|
8
|
+
* Creates a TextStreamer that invokes `onText` for each decoded token piece.
|
|
9
|
+
* The pipeline yields tokens synchronously through the callback during
|
|
10
|
+
* `model.generate(...)`, so `onText` can call `emit` directly — no queue
|
|
11
|
+
* is needed between the SDK and the consumer.
|
|
19
12
|
*/
|
|
20
|
-
export declare function createStreamingTextStreamer(tokenizer: any,
|
|
13
|
+
export declare function createStreamingTextStreamer(tokenizer: any, onText: (text: string) => void, textStreamer: typeof TextStreamer): TextStreamer;
|
|
21
14
|
/**
|
|
22
15
|
* Create a text streamer for a given tokenizer and update progress function
|
|
23
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_Streaming.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_Streaming.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"HFT_Streaming.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_Streaming.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,GAAG,EACd,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAC9B,YAAY,EAAE,OAAO,YAAY,gBAOlC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,GAAG,EACd,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,IAAI,EAC3E,YAAY,EAAE,OAAO,YAAY,gBAalC"}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, StructuredGenerationTaskInput, StructuredGenerationTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema";
|
|
8
8
|
export declare const HFT_StructuredGeneration: AiProviderRunFn<StructuredGenerationTaskInput, StructuredGenerationTaskOutput, HfTransformersOnnxModelConfig>;
|
|
9
|
-
export declare const HFT_StructuredGeneration_Stream: AiProviderStreamFn<StructuredGenerationTaskInput, StructuredGenerationTaskOutput, HfTransformersOnnxModelConfig>;
|
|
10
9
|
//# sourceMappingURL=HFT_StructuredGeneration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_StructuredGeneration.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_StructuredGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"HFT_StructuredGeneration.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_StructuredGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,6BAA6B,EAC7B,8BAA8B,EAC/B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAgDvE,eAAO,MAAM,wBAAwB,EAAE,eAAe,CACpD,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,CAiF9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_TextClassification.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextClassification.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EACV,eAAe,EACf,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE,eAAO,MAAM,sBAAsB,EAAE,eAAe,CAClD,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,
|
|
1
|
+
{"version":3,"file":"HFT_TextClassification.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextClassification.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EACV,eAAe,EACf,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE,eAAO,MAAM,sBAAsB,EAAE,eAAe,CAClD,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,CAkD9B,CAAC"}
|
|
@@ -8,6 +8,10 @@ import type { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema";
|
|
|
8
8
|
/**
|
|
9
9
|
* Core implementation for text embedding using Hugging Face Transformers.
|
|
10
10
|
* This is shared between inline and worker implementations.
|
|
11
|
+
*
|
|
12
|
+
* Model download progress (first-call cold start) is forwarded as `phase`
|
|
13
|
+
* stream events via the `emit` callback passed to {@link getPipeline}; subsequent
|
|
14
|
+
* calls are near-instant because the pipeline is cached.
|
|
11
15
|
*/
|
|
12
16
|
export declare const HFT_TextEmbedding: AiProviderRunFn<TextEmbeddingTaskInput, TextEmbeddingTaskOutput, HfTransformersOnnxModelConfig>;
|
|
13
17
|
//# sourceMappingURL=HFT_TextEmbedding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_TextEmbedding.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextEmbedding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE
|
|
1
|
+
{"version":3,"file":"HFT_TextEmbedding.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextEmbedding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAC7C,sBAAsB,EACtB,uBAAuB,EACvB,6BAA6B,CA4E9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_TextFillMask.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextFillMask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAC5C,qBAAqB,EACrB,sBAAsB,EACtB,6BAA6B,
|
|
1
|
+
{"version":3,"file":"HFT_TextFillMask.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextFillMask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAC5C,qBAAqB,EACrB,sBAAsB,EACtB,6BAA6B,CAe9B,CAAC"}
|
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, TextGenerationTaskInput, TextGenerationTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* Core implementation for text generation using Hugging Face Transformers.
|
|
10
|
-
* This is shared between inline and worker implementations.
|
|
11
|
-
*/
|
|
12
8
|
export declare const HFT_TextGeneration: AiProviderRunFn<TextGenerationTaskInput, TextGenerationTaskOutput, HfTransformersOnnxModelConfig>;
|
|
13
|
-
export declare const HFT_TextGeneration_Stream: AiProviderStreamFn<TextGenerationTaskInput, TextGenerationTaskOutput, HfTransformersOnnxModelConfig>;
|
|
14
9
|
//# sourceMappingURL=HFT_TextGeneration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_TextGeneration.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"HFT_TextGeneration.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAKvE,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAC9C,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,CAiD9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_TextLanguageDetection.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextLanguageDetection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,8BAA8B,EAC9B,+BAA+B,EAC/B,6BAA6B,
|
|
1
|
+
{"version":3,"file":"HFT_TextLanguageDetection.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextLanguageDetection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,8BAA8B,EAC9B,+BAA+B,EAC/B,6BAA6B,CAqB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_TextNamedEntityRecognition.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextNamedEntityRecognition.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,mCAAmC,EACnC,oCAAoC,EACrC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE,eAAO,MAAM,8BAA8B,EAAE,eAAe,CAC1D,mCAAmC,EACnC,oCAAoC,EACpC,6BAA6B,
|
|
1
|
+
{"version":3,"file":"HFT_TextNamedEntityRecognition.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextNamedEntityRecognition.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,mCAAmC,EACnC,oCAAoC,EACrC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAGvE,eAAO,MAAM,8BAA8B,EAAE,eAAe,CAC1D,mCAAmC,EACnC,oCAAoC,EACpC,6BAA6B,CAsB9B,CAAC"}
|
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, TextQuestionAnswerTaskInput, TextQuestionAnswerTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* Core implementation for question answering using Hugging Face Transformers.
|
|
10
|
-
* This is shared between inline and worker implementations.
|
|
11
|
-
*/
|
|
12
8
|
export declare const HFT_TextQuestionAnswer: AiProviderRunFn<TextQuestionAnswerTaskInput, TextQuestionAnswerTaskOutput, HfTransformersOnnxModelConfig>;
|
|
13
|
-
export declare const HFT_TextQuestionAnswer_Stream: AiProviderStreamFn<TextQuestionAnswerTaskInput, TextQuestionAnswerTaskOutput, HfTransformersOnnxModelConfig>;
|
|
14
9
|
//# sourceMappingURL=HFT_TextQuestionAnswer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_TextQuestionAnswer.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextQuestionAnswer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EACV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"HFT_TextQuestionAnswer.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextQuestionAnswer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EACV,eAAe,EACf,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAIvE,eAAO,MAAM,sBAAsB,EAAE,eAAe,CAClD,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,CAyB9B,CAAC"}
|
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, TextRewriterTaskInput, TextRewriterTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* Core implementation for text rewriting using Hugging Face Transformers.
|
|
10
|
-
* This is shared between inline and worker implementations.
|
|
11
|
-
*/
|
|
12
8
|
export declare const HFT_TextRewriter: AiProviderRunFn<TextRewriterTaskInput, TextRewriterTaskOutput, HfTransformersOnnxModelConfig>;
|
|
13
|
-
export declare const HFT_TextRewriter_Stream: AiProviderStreamFn<TextRewriterTaskInput, TextRewriterTaskOutput, HfTransformersOnnxModelConfig>;
|
|
14
9
|
//# sourceMappingURL=HFT_TextRewriter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFT_TextRewriter.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextRewriter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"HFT_TextRewriter.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFT_TextRewriter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAIvE,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAC5C,qBAAqB,EACrB,sBAAsB,EACtB,6BAA6B,CAsB9B,CAAC"}
|