@workglow/huggingface-inference 0.2.34 → 0.2.36
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/HfInferenceProvider.d.ts +10 -20
- package/dist/ai/HfInferenceProvider.d.ts.map +1 -1
- package/dist/ai/HfInferenceQueuedProvider.d.ts +10 -20
- package/dist/ai/HfInferenceQueuedProvider.d.ts.map +1 -1
- package/dist/ai/common/HFI_Capabilities.d.ts +23 -0
- package/dist/ai/common/HFI_Capabilities.d.ts.map +1 -0
- package/dist/ai/common/HFI_CapabilitySets.d.ts +25 -0
- package/dist/ai/common/HFI_CapabilitySets.d.ts.map +1 -0
- package/dist/ai/common/HFI_ImageEdit.d.ts +4 -5
- package/dist/ai/common/HFI_ImageEdit.d.ts.map +1 -1
- package/dist/ai/common/HFI_ImageGenerate.d.ts +4 -5
- package/dist/ai/common/HFI_ImageGenerate.d.ts.map +1 -1
- package/dist/ai/common/HFI_JobRunFns.d.ts +2 -3
- package/dist/ai/common/HFI_JobRunFns.d.ts.map +1 -1
- package/dist/ai/common/HFI_ModelInfo.d.ts.map +1 -1
- package/dist/ai/common/HFI_ModelSchema.d.ts +3 -3
- package/dist/ai/common/HFI_ModelSearch.d.ts.map +1 -1
- package/dist/ai/common/HFI_TextEmbedding.d.ts.map +1 -1
- package/dist/ai/common/HFI_TextGeneration.d.ts +2 -3
- package/dist/ai/common/HFI_TextGeneration.d.ts.map +1 -1
- package/dist/ai/common/HFI_TextRewriter.d.ts +2 -3
- package/dist/ai/common/HFI_TextRewriter.d.ts.map +1 -1
- package/dist/ai/common/HFI_TextSummary.d.ts +2 -3
- package/dist/ai/common/HFI_TextSummary.d.ts.map +1 -1
- package/dist/ai/common/HFI_ToolCalling.d.ts +2 -3
- package/dist/ai/common/HFI_ToolCalling.d.ts.map +1 -1
- package/dist/ai/index.d.ts +25 -0
- package/dist/ai/index.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 +188 -229
- package/dist/ai-runtime.js.map +20 -18
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +392 -25
- package/dist/ai.js.map +18 -5
- package/package.json +12 -13
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { AiProvider } from "@workglow/ai/worker";
|
|
7
|
-
|
|
7
|
+
import type { Capability, ModelRecord } from "@workglow/ai/worker";
|
|
8
|
+
declare const HfInferenceProvider_base: new (promiseRunFns?: readonly import("@workglow/ai").AiProviderRunFnRegistration<any, any, {
|
|
9
|
+
capabilities?: string[] | undefined;
|
|
8
10
|
description?: string | undefined;
|
|
9
11
|
metadata?: {
|
|
10
12
|
[x: string]: unknown;
|
|
@@ -16,9 +18,9 @@ declare const HfInferenceProvider_base: new (tasks?: Record<string, import("@wor
|
|
|
16
18
|
model_name: string;
|
|
17
19
|
provider?: string | undefined;
|
|
18
20
|
};
|
|
19
|
-
tasks?: string[] | undefined;
|
|
20
21
|
title?: string | undefined;
|
|
21
|
-
}
|
|
22
|
+
}>[] | undefined, previewTasks?: Record<string, import("@workglow/ai").AiProviderPreviewRunFn<any, any, {
|
|
23
|
+
capabilities?: string[] | undefined;
|
|
22
24
|
description?: string | undefined;
|
|
23
25
|
metadata?: {
|
|
24
26
|
[x: string]: unknown;
|
|
@@ -30,23 +32,9 @@ declare const HfInferenceProvider_base: new (tasks?: Record<string, import("@wor
|
|
|
30
32
|
model_name: string;
|
|
31
33
|
provider?: string | undefined;
|
|
32
34
|
};
|
|
33
|
-
tasks?: string[] | undefined;
|
|
34
|
-
title?: string | undefined;
|
|
35
|
-
}>> | undefined, previewTasks?: Record<string, import("@workglow/ai").AiProviderPreviewRunFn<any, any, {
|
|
36
|
-
description?: string | undefined;
|
|
37
|
-
metadata?: {
|
|
38
|
-
[x: string]: unknown;
|
|
39
|
-
} | undefined;
|
|
40
|
-
model_id?: string | undefined;
|
|
41
|
-
provider: "HF_INFERENCE";
|
|
42
|
-
provider_config: {
|
|
43
|
-
credential_key?: string | undefined;
|
|
44
|
-
model_name: string;
|
|
45
|
-
provider?: string | undefined;
|
|
46
|
-
};
|
|
47
|
-
tasks?: string[] | undefined;
|
|
48
35
|
title?: string | undefined;
|
|
49
36
|
}>> | undefined) => AiProvider<{
|
|
37
|
+
capabilities?: string[] | undefined;
|
|
50
38
|
description?: string | undefined;
|
|
51
39
|
metadata?: {
|
|
52
40
|
[x: string]: unknown;
|
|
@@ -58,20 +46,22 @@ declare const HfInferenceProvider_base: new (tasks?: Record<string, import("@wor
|
|
|
58
46
|
model_name: string;
|
|
59
47
|
provider?: string | undefined;
|
|
60
48
|
};
|
|
61
|
-
tasks?: string[] | undefined;
|
|
62
49
|
title?: string | undefined;
|
|
63
50
|
}> & {
|
|
64
51
|
readonly name: string;
|
|
65
52
|
readonly displayName: string;
|
|
66
53
|
readonly isLocal: boolean;
|
|
67
54
|
readonly supportsBrowser: boolean;
|
|
68
|
-
readonly taskTypes: readonly ["ModelInfoTask", "TextGenerationTask", "TextEmbeddingTask", "TextRewriterTask", "TextSummaryTask", "ToolCallingTask", "ModelSearchTask"];
|
|
69
55
|
};
|
|
70
56
|
/**
|
|
71
57
|
* Worker-server registration for Hugging Face Inference. Imports `AiProvider`
|
|
72
58
|
* from `@workglow/ai/worker` so the SDK is only loaded in the worker.
|
|
73
59
|
*/
|
|
74
60
|
export declare class HfInferenceProvider extends HfInferenceProvider_base {
|
|
61
|
+
inferCapabilities(model: ModelRecord): readonly Capability[];
|
|
62
|
+
protected workerRunFnSpecs(): readonly {
|
|
63
|
+
serves: readonly Capability[];
|
|
64
|
+
}[];
|
|
75
65
|
}
|
|
76
66
|
export {};
|
|
77
67
|
//# sourceMappingURL=HfInferenceProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HfInferenceProvider.d.ts","sourceRoot":"","sources":["../../src/ai/HfInferenceProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC
|
|
1
|
+
{"version":3,"file":"HfInferenceProvider.d.ts","sourceRoot":"","sources":["../../src/ai/HfInferenceProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASnE;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,wBAMxC;IACU,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;CACF"}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { AiProvider } from "@workglow/ai";
|
|
7
|
-
|
|
7
|
+
import type { Capability, ModelRecord } from "@workglow/ai";
|
|
8
|
+
declare const HfInferenceQueuedProvider_base: new (promiseRunFns?: readonly import("@workglow/ai").AiProviderRunFnRegistration<any, any, {
|
|
9
|
+
capabilities?: string[] | undefined;
|
|
8
10
|
description?: string | undefined;
|
|
9
11
|
metadata?: {
|
|
10
12
|
[x: string]: unknown;
|
|
@@ -16,9 +18,9 @@ declare const HfInferenceQueuedProvider_base: new (tasks?: Record<string, import
|
|
|
16
18
|
model_name: string;
|
|
17
19
|
provider?: string | undefined;
|
|
18
20
|
};
|
|
19
|
-
tasks?: string[] | undefined;
|
|
20
21
|
title?: string | undefined;
|
|
21
|
-
}
|
|
22
|
+
}>[] | undefined, previewTasks?: Record<string, import("@workglow/ai").AiProviderPreviewRunFn<any, any, {
|
|
23
|
+
capabilities?: string[] | undefined;
|
|
22
24
|
description?: string | undefined;
|
|
23
25
|
metadata?: {
|
|
24
26
|
[x: string]: unknown;
|
|
@@ -30,23 +32,9 @@ declare const HfInferenceQueuedProvider_base: new (tasks?: Record<string, import
|
|
|
30
32
|
model_name: string;
|
|
31
33
|
provider?: string | undefined;
|
|
32
34
|
};
|
|
33
|
-
tasks?: string[] | undefined;
|
|
34
|
-
title?: string | undefined;
|
|
35
|
-
}>> | undefined, previewTasks?: Record<string, import("@workglow/ai").AiProviderPreviewRunFn<any, any, {
|
|
36
|
-
description?: string | undefined;
|
|
37
|
-
metadata?: {
|
|
38
|
-
[x: string]: unknown;
|
|
39
|
-
} | undefined;
|
|
40
|
-
model_id?: string | undefined;
|
|
41
|
-
provider: "HF_INFERENCE";
|
|
42
|
-
provider_config: {
|
|
43
|
-
credential_key?: string | undefined;
|
|
44
|
-
model_name: string;
|
|
45
|
-
provider?: string | undefined;
|
|
46
|
-
};
|
|
47
|
-
tasks?: string[] | undefined;
|
|
48
35
|
title?: string | undefined;
|
|
49
36
|
}>> | undefined) => AiProvider<{
|
|
37
|
+
capabilities?: string[] | undefined;
|
|
50
38
|
description?: string | undefined;
|
|
51
39
|
metadata?: {
|
|
52
40
|
[x: string]: unknown;
|
|
@@ -58,17 +46,19 @@ declare const HfInferenceQueuedProvider_base: new (tasks?: Record<string, import
|
|
|
58
46
|
model_name: string;
|
|
59
47
|
provider?: string | undefined;
|
|
60
48
|
};
|
|
61
|
-
tasks?: string[] | undefined;
|
|
62
49
|
title?: string | undefined;
|
|
63
50
|
}> & {
|
|
64
51
|
readonly name: string;
|
|
65
52
|
readonly displayName: string;
|
|
66
53
|
readonly isLocal: boolean;
|
|
67
54
|
readonly supportsBrowser: boolean;
|
|
68
|
-
readonly taskTypes: readonly ["ModelInfoTask", "TextGenerationTask", "TextEmbeddingTask", "TextRewriterTask", "TextSummaryTask", "ToolCallingTask", "ModelSearchTask", "ImageGenerateTask", "ImageEditTask"];
|
|
69
55
|
};
|
|
70
56
|
/** Main-thread registration (inline or worker-backed). No queue — uses direct execution. */
|
|
71
57
|
export declare class HfInferenceQueuedProvider extends HfInferenceQueuedProvider_base {
|
|
58
|
+
inferCapabilities(model: ModelRecord): readonly Capability[];
|
|
59
|
+
protected workerRunFnSpecs(): readonly {
|
|
60
|
+
serves: readonly Capability[];
|
|
61
|
+
}[];
|
|
72
62
|
}
|
|
73
63
|
export {};
|
|
74
64
|
//# sourceMappingURL=HfInferenceQueuedProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HfInferenceQueuedProvider.d.ts","sourceRoot":"","sources":["../../src/ai/HfInferenceQueuedProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"HfInferenceQueuedProvider.d.ts","sourceRoot":"","sources":["../../src/ai/HfInferenceQueuedProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAS5D,4FAA4F;AAC5F,qBAAa,yBAA0B,SAAQ,8BAM9C;IACU,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;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 HFI_RUN_FN_SPECS: {
|
|
8
|
+
serves: ["image.editing"] | ["image.generation"] | ["model.info"] | ["model.search"] | ["text.embedding"] | ["text.generation"] | ["text.rewriter"] | ["text.summary"] | ["text.generation", "tool-use"];
|
|
9
|
+
}[];
|
|
10
|
+
export declare function hfInferenceWorkerRunFnSpecs(): 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 Inference {@link ModelRecord}.
|
|
16
|
+
*
|
|
17
|
+
* HF Inference catalog items are HF Hub repo IDs (e.g. `mistralai/Mistral-7B-Instruct`,
|
|
18
|
+
* `black-forest-labs/FLUX.1-dev`). Like HFT, declared capabilities (set by
|
|
19
|
+
* model-search) win. Otherwise fall back to id patterns.
|
|
20
|
+
*/
|
|
21
|
+
export declare function inferHfInferenceCapabilities(model: CapabilityHints): readonly Capability[];
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=HFI_Capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HFI_Capabilities.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_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,2BAA2B,IAAI,SAAS;IACtD,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;CACxC,EAAE,CAEF;AAED,KAAK,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,iBAAiB,GAAG,cAAc,CAAC,CAAC;AAE1F;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,UAAU,EAAE,CAoC1F"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 Inference's capability sets.
|
|
8
|
+
*
|
|
9
|
+
* Both `HFI_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/inference` cost.
|
|
13
|
+
*/
|
|
14
|
+
export declare const HFI_TEXT_GENERATION: ["text.generation"];
|
|
15
|
+
export declare const HFI_TOOL_USE: ["text.generation", "tool-use"];
|
|
16
|
+
export declare const HFI_TEXT_REWRITER: ["text.rewriter"];
|
|
17
|
+
export declare const HFI_TEXT_SUMMARY: ["text.summary"];
|
|
18
|
+
export declare const HFI_TEXT_EMBEDDING: ["text.embedding"];
|
|
19
|
+
export declare const HFI_IMAGE_GENERATION: ["image.generation"];
|
|
20
|
+
export declare const HFI_IMAGE_EDITING: ["image.editing"];
|
|
21
|
+
export declare const HFI_MODEL_SEARCH: ["model.search"];
|
|
22
|
+
export declare const HFI_MODEL_INFO: ["model.info"];
|
|
23
|
+
/** Aggregated list — for `workerRunFnSpecs()` derivation. Order MUST match `HFI_RUN_FNS`. */
|
|
24
|
+
export declare const HFI_CAPABILITY_SETS: readonly [["text.generation"], ["text.generation", "tool-use"], ["text.rewriter"], ["text.summary"], ["text.embedding"], ["image.generation"], ["image.editing"], ["model.search"], ["model.info"]];
|
|
25
|
+
//# sourceMappingURL=HFI_CapabilitySets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HFI_CapabilitySets.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_CapabilitySets.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,qBAAsD,CAAC;AACvF,eAAO,MAAM,YAAY,iCAAkE,CAAC;AAC5F,eAAO,MAAM,iBAAiB,mBAAoD,CAAC;AACnF,eAAO,MAAM,gBAAgB,kBAAmD,CAAC;AACjF,eAAO,MAAM,kBAAkB,oBAAqD,CAAC;AACrF,eAAO,MAAM,oBAAoB,sBAAuD,CAAC;AACzF,eAAO,MAAM,iBAAiB,mBAAoD,CAAC;AACnF,eAAO,MAAM,gBAAgB,kBAAmD,CAAC;AACjF,eAAO,MAAM,cAAc,gBAAiD,CAAC;AAE7E,6FAA6F;AAC7F,eAAO,MAAM,mBAAmB,qMAUtB,CAAC"}
|
|
@@ -3,12 +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, ImageEditTaskInput, ImageEditTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { HfInferenceModelConfig } from "./HFI_ModelSchema";
|
|
8
|
-
export declare const HFI_ImageEdit: AiProviderRunFn<ImageEditTaskInput, ImageEditTaskOutput, HfInferenceModelConfig>;
|
|
9
8
|
/**
|
|
10
|
-
* One-shot
|
|
11
|
-
* so we
|
|
9
|
+
* One-shot run fn. HF Inference does not support partial image streaming,
|
|
10
|
+
* so we run the request, emit one snapshot, then finish.
|
|
12
11
|
*/
|
|
13
|
-
export declare const HFI_ImageEdit_Stream:
|
|
12
|
+
export declare const HFI_ImageEdit_Stream: AiProviderRunFn<ImageEditTaskInput, ImageEditTaskOutput, HfInferenceModelConfig>;
|
|
14
13
|
//# sourceMappingURL=HFI_ImageEdit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFI_ImageEdit.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_ImageEdit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"HFI_ImageEdit.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_ImageEdit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EAEpB,MAAM,cAAc,CAAC;AAMtB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AA0BhE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,eAAe,CAChD,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,CAsDvB,CAAC"}
|
|
@@ -3,12 +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, ImageGenerateTaskInput, ImageGenerateTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { HfInferenceModelConfig } from "./HFI_ModelSchema";
|
|
8
|
-
export declare const HFI_ImageGenerate: AiProviderRunFn<ImageGenerateTaskInput, ImageGenerateTaskOutput, HfInferenceModelConfig>;
|
|
9
8
|
/**
|
|
10
|
-
* One-shot
|
|
11
|
-
* so we
|
|
9
|
+
* One-shot run fn. HF Inference does not support partial image streaming,
|
|
10
|
+
* so we run the request, emit one snapshot, then finish.
|
|
12
11
|
*/
|
|
13
|
-
export declare const HFI_ImageGenerate_Stream:
|
|
12
|
+
export declare const HFI_ImageGenerate_Stream: AiProviderRunFn<ImageGenerateTaskInput, ImageGenerateTaskOutput, HfInferenceModelConfig>;
|
|
14
13
|
//# sourceMappingURL=HFI_ImageGenerate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFI_ImageGenerate.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_ImageGenerate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"HFI_ImageGenerate.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_ImageGenerate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EAExB,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAYhE;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,eAAe,CACpD,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,CA2CvB,CAAC"}
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { AiProviderRunFnRegistration } from "@workglow/ai";
|
|
7
7
|
import type { HfInferenceModelConfig } from "./HFI_ModelSchema";
|
|
8
8
|
export { loadHfInferenceSDK, getClient, getModelName, getProvider } from "./HFI_Client";
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const HFI_STREAM_TASKS: Record<string, AiProviderStreamFn<any, any, HfInferenceModelConfig>>;
|
|
9
|
+
export declare const HFI_RUN_FNS: readonly AiProviderRunFnRegistration<any, any, HfInferenceModelConfig>[];
|
|
11
10
|
//# sourceMappingURL=HFI_JobRunFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFI_JobRunFns.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_JobRunFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"HFI_JobRunFns.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_JobRunFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAahE,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAsBxF,eAAO,MAAM,WAAW,EAAE,SAAS,2BAA2B,CAE5D,GAAG,EAEH,GAAG,EACH,sBAAsB,CACvB,EAUA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFI_ModelInfo.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_ModelInfo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"HFI_ModelInfo.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_ModelInfo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,eAAO,MAAM,aAAa,EAAE,eAAe,CACzC,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,CAqCvB,CAAC"}
|
|
@@ -43,7 +43,7 @@ export declare const HfInferenceModelRecordSchema: {
|
|
|
43
43
|
readonly model_id: {
|
|
44
44
|
readonly type: "string";
|
|
45
45
|
};
|
|
46
|
-
readonly
|
|
46
|
+
readonly capabilities: {
|
|
47
47
|
readonly type: "array";
|
|
48
48
|
readonly items: {
|
|
49
49
|
readonly type: "string";
|
|
@@ -89,7 +89,7 @@ export declare const HfInferenceModelRecordSchema: {
|
|
|
89
89
|
readonly additionalProperties: false;
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
|
-
readonly required: readonly ["model_id", "
|
|
92
|
+
readonly required: readonly ["model_id", "capabilities", "provider", "title", "description", "provider_config", "metadata", "provider", "provider_config"];
|
|
93
93
|
readonly additionalProperties: false;
|
|
94
94
|
};
|
|
95
95
|
export type HfInferenceModelRecord = FromSchema<typeof HfInferenceModelRecordSchema>;
|
|
@@ -99,7 +99,7 @@ export declare const HfInferenceModelConfigSchema: {
|
|
|
99
99
|
readonly model_id: {
|
|
100
100
|
readonly type: "string";
|
|
101
101
|
};
|
|
102
|
-
readonly
|
|
102
|
+
readonly capabilities: {
|
|
103
103
|
readonly type: "array";
|
|
104
104
|
readonly items: {
|
|
105
105
|
readonly type: "string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFI_ModelSearch.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_ModelSearch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AA6BtB,eAAO,MAAM,eAAe,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"HFI_ModelSearch.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_ModelSearch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AA6BtB,eAAO,MAAM,eAAe,EAAE,eAAe,CAC3C,oBAAoB,EACpB,qBAAqB,CAwBtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFI_TextEmbedding.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_TextEmbedding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAGhE,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAC7C,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"HFI_TextEmbedding.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_TextEmbedding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAGhE,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAC7C,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,CA6CvB,CAAC"}
|
|
@@ -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, TextGenerationTaskInput, TextGenerationTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { HfInferenceModelConfig } from "./HFI_ModelSchema";
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const HFI_TextGeneration_Stream: AiProviderStreamFn<TextGenerationTaskInput, TextGenerationTaskOutput, HfInferenceModelConfig>;
|
|
8
|
+
export declare const HFI_TextGeneration_Stream: AiProviderRunFn<TextGenerationTaskInput, TextGenerationTaskOutput, HfInferenceModelConfig>;
|
|
10
9
|
//# sourceMappingURL=HFI_TextGeneration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFI_TextGeneration.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_TextGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"HFI_TextGeneration.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_TextGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAGhE,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,CA0BvB,CAAC"}
|
|
@@ -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, TextRewriterTaskInput, TextRewriterTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { HfInferenceModelConfig } from "./HFI_ModelSchema";
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const HFI_TextRewriter_Stream: AiProviderStreamFn<TextRewriterTaskInput, TextRewriterTaskOutput, HfInferenceModelConfig>;
|
|
8
|
+
export declare const HFI_TextRewriter_Stream: AiProviderRunFn<TextRewriterTaskInput, TextRewriterTaskOutput, HfInferenceModelConfig>;
|
|
10
9
|
//# sourceMappingURL=HFI_TextRewriter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFI_TextRewriter.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_TextRewriter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"HFI_TextRewriter.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_TextRewriter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAGhE,eAAO,MAAM,uBAAuB,EAAE,eAAe,CACnD,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,CAyBvB,CAAC"}
|
|
@@ -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, TextSummaryTaskInput, TextSummaryTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { HfInferenceModelConfig } from "./HFI_ModelSchema";
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const HFI_TextSummary_Stream: AiProviderStreamFn<TextSummaryTaskInput, TextSummaryTaskOutput, HfInferenceModelConfig>;
|
|
8
|
+
export declare const HFI_TextSummary_Stream: AiProviderRunFn<TextSummaryTaskInput, TextSummaryTaskOutput, HfInferenceModelConfig>;
|
|
10
9
|
//# sourceMappingURL=HFI_TextSummary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFI_TextSummary.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_TextSummary.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"HFI_TextSummary.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_TextSummary.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAGhE,eAAO,MAAM,sBAAsB,EAAE,eAAe,CAClD,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,CAyBvB,CAAC"}
|
|
@@ -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, ToolCallingTaskInput, ToolCallingTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { HfInferenceModelConfig } from "./HFI_ModelSchema";
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const HFI_ToolCalling_Stream: AiProviderStreamFn<ToolCallingTaskInput, ToolCallingTaskOutput, HfInferenceModelConfig>;
|
|
8
|
+
export declare const HFI_ToolCalling_Stream: AiProviderRunFn<ToolCallingTaskInput, ToolCallingTaskOutput, HfInferenceModelConfig>;
|
|
10
9
|
//# sourceMappingURL=HFI_ToolCalling.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HFI_ToolCalling.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_ToolCalling.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"HFI_ToolCalling.d.ts","sourceRoot":"","sources":["../../../src/ai/common/HFI_ToolCalling.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAMtB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAGhE,eAAO,MAAM,sBAAsB,EAAE,eAAe,CAClD,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,CA2BvB,CAAC"}
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -9,4 +9,29 @@ export * from "./common/HFI_ImageValidation";
|
|
|
9
9
|
export * from "./common/HFI_ModelSchema";
|
|
10
10
|
export * from "./common/HFI_ModelSearch";
|
|
11
11
|
export * from "./registerHfInference";
|
|
12
|
+
import { HfInferenceQueuedProvider } from "./HfInferenceQueuedProvider";
|
|
13
|
+
/**
|
|
14
|
+
* @internal Symbols exported only for use by `@workglow/test`. Not part of the stable public API.
|
|
15
|
+
*/
|
|
16
|
+
export declare const _testOnly: {
|
|
17
|
+
readonly HfInferenceQueuedProvider: typeof HfInferenceQueuedProvider;
|
|
18
|
+
readonly HFI_RUN_FN_SPECS: {
|
|
19
|
+
serves: ["image.editing"] | ["image.generation"] | ["model.info"] | ["model.search"] | ["text.embedding"] | ["text.generation"] | ["text.rewriter"] | ["text.summary"] | ["text.generation", "tool-use"];
|
|
20
|
+
}[];
|
|
21
|
+
readonly HFI_RUN_FNS: readonly import("@workglow/ai").AiProviderRunFnRegistration<any, any, {
|
|
22
|
+
capabilities?: string[] | undefined;
|
|
23
|
+
description?: string | undefined;
|
|
24
|
+
metadata?: {
|
|
25
|
+
[x: string]: unknown;
|
|
26
|
+
} | undefined;
|
|
27
|
+
model_id?: string | undefined;
|
|
28
|
+
provider: "HF_INFERENCE";
|
|
29
|
+
provider_config: {
|
|
30
|
+
credential_key?: string | undefined;
|
|
31
|
+
model_name: string;
|
|
32
|
+
provider?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
title?: string | undefined;
|
|
35
|
+
}>[];
|
|
36
|
+
};
|
|
12
37
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ai/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AAItC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;CAIZ,CAAC"}
|
package/dist/ai/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/ai/runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/ai/runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AAGH,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC"}
|
package/dist/ai-runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-runtime.d.ts","sourceRoot":"","sources":["../src/ai-runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"ai-runtime.d.ts","sourceRoot":"","sources":["../src/ai-runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,cAAc,cAAc,CAAC"}
|