@workglow/openai 0.3.16 → 0.3.17
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/package.json +11 -11
- package/dist/ai/OpenAiProvider.d.ts +0 -79
- package/dist/ai/OpenAiProvider.d.ts.map +0 -1
- package/dist/ai/OpenAiQueuedProvider.d.ts +0 -76
- package/dist/ai/OpenAiQueuedProvider.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_Capabilities.d.ts +0 -36
- package/dist/ai/common/OpenAI_Capabilities.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_CapabilitySets.d.ts +0 -30
- package/dist/ai/common/OpenAI_CapabilitySets.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_Client.d.ts +0 -17
- package/dist/ai/common/OpenAI_Client.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_Constants.d.ts +0 -7
- package/dist/ai/common/OpenAI_Constants.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_CountTokens.browser.d.ts +0 -15
- package/dist/ai/common/OpenAI_CountTokens.browser.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_CountTokens.d.ts +0 -15
- package/dist/ai/common/OpenAI_CountTokens.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_ImageEdit.d.ts +0 -14
- package/dist/ai/common/OpenAI_ImageEdit.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_ImageGenerate.d.ts +0 -16
- package/dist/ai/common/OpenAI_ImageGenerate.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_ImageValidation.d.ts +0 -15
- package/dist/ai/common/OpenAI_ImageValidation.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_JobRunFns.browser.d.ts +0 -16
- package/dist/ai/common/OpenAI_JobRunFns.browser.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_JobRunFns.d.ts +0 -19
- package/dist/ai/common/OpenAI_JobRunFns.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_ModelInfo.d.ts +0 -14
- package/dist/ai/common/OpenAI_ModelInfo.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_ModelSchema.d.ts +0 -185
- package/dist/ai/common/OpenAI_ModelSchema.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_ModelSearch.d.ts +0 -13
- package/dist/ai/common/OpenAI_ModelSearch.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_StructuredGeneration.d.ts +0 -15
- package/dist/ai/common/OpenAI_StructuredGeneration.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_TextEmbedding.d.ts +0 -14
- package/dist/ai/common/OpenAI_TextEmbedding.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_TextGeneration.d.ts +0 -16
- package/dist/ai/common/OpenAI_TextGeneration.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_TextRewriter.d.ts +0 -13
- package/dist/ai/common/OpenAI_TextRewriter.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_TextSummary.d.ts +0 -13
- package/dist/ai/common/OpenAI_TextSummary.d.ts.map +0 -1
- package/dist/ai/common/OpenAI_ToolCalling.d.ts +0 -18
- package/dist/ai/common/OpenAI_ToolCalling.d.ts.map +0 -1
- package/dist/ai/index.browser.d.ts +0 -10
- package/dist/ai/index.browser.d.ts.map +0 -1
- package/dist/ai/index.d.ts +0 -39
- package/dist/ai/index.d.ts.map +0 -1
- package/dist/ai/registerOpenAi.d.ts +0 -10
- package/dist/ai/registerOpenAi.d.ts.map +0 -1
- package/dist/ai/registerOpenAiInline.browser.d.ts +0 -8
- package/dist/ai/registerOpenAiInline.browser.d.ts.map +0 -1
- package/dist/ai/registerOpenAiInline.d.ts +0 -8
- package/dist/ai/registerOpenAiInline.d.ts.map +0 -1
- package/dist/ai/registerOpenAiWorker.browser.d.ts +0 -7
- package/dist/ai/registerOpenAiWorker.browser.d.ts.map +0 -1
- package/dist/ai/registerOpenAiWorker.d.ts +0 -7
- package/dist/ai/registerOpenAiWorker.d.ts.map +0 -1
- package/dist/ai/runtime.browser.d.ts +0 -15
- package/dist/ai/runtime.browser.d.ts.map +0 -1
- package/dist/ai/runtime.d.ts +0 -16
- package/dist/ai/runtime.d.ts.map +0 -1
- package/dist/ai-runtime.browser.d.ts +0 -7
- package/dist/ai-runtime.browser.d.ts.map +0 -1
- package/dist/ai-runtime.browser.js +0 -716
- package/dist/ai-runtime.browser.js.map +0 -29
- package/dist/ai-runtime.d.ts +0 -7
- package/dist/ai-runtime.d.ts.map +0 -1
- package/dist/ai-runtime.js +0 -731
- package/dist/ai-runtime.js.map +0 -30
- package/dist/ai.browser.d.ts +0 -7
- package/dist/ai.browser.d.ts.map +0 -1
- package/dist/ai.browser.js +0 -231
- package/dist/ai.browser.js.map +0 -17
- package/dist/ai.d.ts +0 -7
- package/dist/ai.d.ts.map +0 -1
- package/dist/ai.js +0 -775
- package/dist/ai.js.map +0 -30
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@workglow/openai",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.3.
|
|
5
|
+
"version": "0.3.17",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/workglow-dev/libs.git",
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"js-tiktoken": "^1.0.16"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@workglow/ai": "0.3.
|
|
54
|
-
"@workglow/job-queue": "0.3.
|
|
55
|
-
"@workglow/storage": "0.3.
|
|
56
|
-
"@workglow/task-graph": "0.3.
|
|
57
|
-
"@workglow/util": "0.3.
|
|
53
|
+
"@workglow/ai": "0.3.17",
|
|
54
|
+
"@workglow/job-queue": "0.3.17",
|
|
55
|
+
"@workglow/storage": "0.3.17",
|
|
56
|
+
"@workglow/task-graph": "0.3.17",
|
|
57
|
+
"@workglow/util": "0.3.17"
|
|
58
58
|
},
|
|
59
59
|
"peerDependenciesMeta": {
|
|
60
60
|
"@workglow/ai": {
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@workglow/ai": "0.3.
|
|
78
|
-
"@workglow/job-queue": "0.3.
|
|
79
|
-
"@workglow/storage": "0.3.
|
|
80
|
-
"@workglow/task-graph": "0.3.
|
|
81
|
-
"@workglow/util": "0.3.
|
|
77
|
+
"@workglow/ai": "0.3.17",
|
|
78
|
+
"@workglow/job-queue": "0.3.17",
|
|
79
|
+
"@workglow/storage": "0.3.17",
|
|
80
|
+
"@workglow/task-graph": "0.3.17",
|
|
81
|
+
"@workglow/util": "0.3.17"
|
|
82
82
|
},
|
|
83
83
|
"files": [
|
|
84
84
|
"dist",
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { Capability, ModelRecord } from "@workglow/ai/worker";
|
|
7
|
-
import { AiProvider } from "@workglow/ai/worker";
|
|
8
|
-
declare const OpenAiProvider_base: new (promiseRunFns?: readonly import("@workglow/ai").AiProviderRunFnRegistration<any, any, {
|
|
9
|
-
capabilities?: string[] | undefined;
|
|
10
|
-
description?: string | undefined;
|
|
11
|
-
metadata?: {
|
|
12
|
-
[x: string]: unknown;
|
|
13
|
-
} | undefined;
|
|
14
|
-
model_id?: string | undefined;
|
|
15
|
-
provider: "OPENAI";
|
|
16
|
-
provider_config: {
|
|
17
|
-
base_url?: string | undefined;
|
|
18
|
-
credential_key?: string | undefined;
|
|
19
|
-
model_name: string;
|
|
20
|
-
organization?: string | undefined;
|
|
21
|
-
trustedBaseUrl?: boolean | undefined;
|
|
22
|
-
};
|
|
23
|
-
title?: string | undefined;
|
|
24
|
-
}>[] | undefined, previewTasks?: Record<string, import("@workglow/ai").AiProviderPreviewRunFn<any, any, {
|
|
25
|
-
capabilities?: string[] | undefined;
|
|
26
|
-
description?: string | undefined;
|
|
27
|
-
metadata?: {
|
|
28
|
-
[x: string]: unknown;
|
|
29
|
-
} | undefined;
|
|
30
|
-
model_id?: string | undefined;
|
|
31
|
-
provider: "OPENAI";
|
|
32
|
-
provider_config: {
|
|
33
|
-
base_url?: string | undefined;
|
|
34
|
-
credential_key?: string | undefined;
|
|
35
|
-
model_name: string;
|
|
36
|
-
organization?: string | undefined;
|
|
37
|
-
trustedBaseUrl?: boolean | undefined;
|
|
38
|
-
};
|
|
39
|
-
title?: string | undefined;
|
|
40
|
-
}>> | undefined) => AiProvider<{
|
|
41
|
-
capabilities?: string[] | undefined;
|
|
42
|
-
description?: string | undefined;
|
|
43
|
-
metadata?: {
|
|
44
|
-
[x: string]: unknown;
|
|
45
|
-
} | undefined;
|
|
46
|
-
model_id?: string | undefined;
|
|
47
|
-
provider: "OPENAI";
|
|
48
|
-
provider_config: {
|
|
49
|
-
base_url?: string | undefined;
|
|
50
|
-
credential_key?: string | undefined;
|
|
51
|
-
model_name: string;
|
|
52
|
-
organization?: string | undefined;
|
|
53
|
-
trustedBaseUrl?: boolean | undefined;
|
|
54
|
-
};
|
|
55
|
-
title?: string | undefined;
|
|
56
|
-
}> & {
|
|
57
|
-
readonly name: string;
|
|
58
|
-
readonly displayName: string;
|
|
59
|
-
readonly isLocal: boolean;
|
|
60
|
-
readonly supportsBrowser: boolean;
|
|
61
|
-
readonly supportsServer: boolean;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Worker-server registration for OpenAI cloud models. Imports `AiProvider`
|
|
65
|
-
* from `@workglow/ai/worker` so the SDK is only loaded in the worker.
|
|
66
|
-
*
|
|
67
|
-
* The class extends the {@link createCloudProviderClass} mixin (which
|
|
68
|
-
* supplies `name` / `displayName` / `isLocal` / `supportsBrowser`) and adds
|
|
69
|
-
* the OpenAI-specific {@link AiProvider.inferCapabilities} and
|
|
70
|
-
* {@link AiProvider.workerRunFnSpecs} overrides.
|
|
71
|
-
*/
|
|
72
|
-
export declare class OpenAiProvider extends OpenAiProvider_base {
|
|
73
|
-
inferCapabilities(model: ModelRecord): readonly Capability[];
|
|
74
|
-
protected workerRunFnSpecs(): readonly {
|
|
75
|
-
serves: readonly Capability[];
|
|
76
|
-
}[];
|
|
77
|
-
}
|
|
78
|
-
export {};
|
|
79
|
-
//# sourceMappingURL=OpenAiProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAiProvider.d.ts","sourceRoot":"","sources":["../../src/ai/OpenAiProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKjD;;;;;;;;GAQG;AACH,qBAAa,cAAe,SAAQ,mBAGlC;IACS,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"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { Capability, ModelRecord } from "@workglow/ai";
|
|
7
|
-
import { AiProvider } from "@workglow/ai";
|
|
8
|
-
declare const OpenAiQueuedProvider_base: new (promiseRunFns?: readonly import("@workglow/ai").AiProviderRunFnRegistration<any, any, {
|
|
9
|
-
capabilities?: string[] | undefined;
|
|
10
|
-
description?: string | undefined;
|
|
11
|
-
metadata?: {
|
|
12
|
-
[x: string]: unknown;
|
|
13
|
-
} | undefined;
|
|
14
|
-
model_id?: string | undefined;
|
|
15
|
-
provider: "OPENAI";
|
|
16
|
-
provider_config: {
|
|
17
|
-
base_url?: string | undefined;
|
|
18
|
-
credential_key?: string | undefined;
|
|
19
|
-
model_name: string;
|
|
20
|
-
organization?: string | undefined;
|
|
21
|
-
trustedBaseUrl?: boolean | undefined;
|
|
22
|
-
};
|
|
23
|
-
title?: string | undefined;
|
|
24
|
-
}>[] | undefined, previewTasks?: Record<string, import("@workglow/ai").AiProviderPreviewRunFn<any, any, {
|
|
25
|
-
capabilities?: string[] | undefined;
|
|
26
|
-
description?: string | undefined;
|
|
27
|
-
metadata?: {
|
|
28
|
-
[x: string]: unknown;
|
|
29
|
-
} | undefined;
|
|
30
|
-
model_id?: string | undefined;
|
|
31
|
-
provider: "OPENAI";
|
|
32
|
-
provider_config: {
|
|
33
|
-
base_url?: string | undefined;
|
|
34
|
-
credential_key?: string | undefined;
|
|
35
|
-
model_name: string;
|
|
36
|
-
organization?: string | undefined;
|
|
37
|
-
trustedBaseUrl?: boolean | undefined;
|
|
38
|
-
};
|
|
39
|
-
title?: string | undefined;
|
|
40
|
-
}>> | undefined) => AiProvider<{
|
|
41
|
-
capabilities?: string[] | undefined;
|
|
42
|
-
description?: string | undefined;
|
|
43
|
-
metadata?: {
|
|
44
|
-
[x: string]: unknown;
|
|
45
|
-
} | undefined;
|
|
46
|
-
model_id?: string | undefined;
|
|
47
|
-
provider: "OPENAI";
|
|
48
|
-
provider_config: {
|
|
49
|
-
base_url?: string | undefined;
|
|
50
|
-
credential_key?: string | undefined;
|
|
51
|
-
model_name: string;
|
|
52
|
-
organization?: string | undefined;
|
|
53
|
-
trustedBaseUrl?: boolean | undefined;
|
|
54
|
-
};
|
|
55
|
-
title?: string | undefined;
|
|
56
|
-
}> & {
|
|
57
|
-
readonly name: string;
|
|
58
|
-
readonly displayName: string;
|
|
59
|
-
readonly isLocal: boolean;
|
|
60
|
-
readonly supportsBrowser: boolean;
|
|
61
|
-
readonly supportsServer: boolean;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Main-thread registration shell for OpenAI. Used both for inline mode
|
|
65
|
-
* (constructed with the run-fn registrations array) and worker-backed mode
|
|
66
|
-
* (constructed empty so the base class registers worker proxies). No queue
|
|
67
|
-
* is created — OpenAI uses {@link DirectExecutionStrategy}.
|
|
68
|
-
*/
|
|
69
|
-
export declare class OpenAiQueuedProvider extends OpenAiQueuedProvider_base {
|
|
70
|
-
inferCapabilities(model: ModelRecord): readonly Capability[];
|
|
71
|
-
protected workerRunFnSpecs(): readonly {
|
|
72
|
-
serves: readonly Capability[];
|
|
73
|
-
}[];
|
|
74
|
-
}
|
|
75
|
-
export {};
|
|
76
|
-
//# sourceMappingURL=OpenAiQueuedProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAiQueuedProvider.d.ts","sourceRoot":"","sources":["../../src/ai/OpenAiQueuedProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAM1C;;;;;GAKG;AACH,qBAAa,oBAAqB,SAAQ,yBAGxC;IACS,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"}
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
/**
|
|
8
|
-
* Closed list of capability-set specs the OpenAI provider serves. Derived
|
|
9
|
-
* from {@link OPENAI_CAPABILITY_SETS}. Used by the main-thread provider
|
|
10
|
-
* shells when registering worker-mode proxies so the dispatcher can route
|
|
11
|
-
* requests to the worker proxy.
|
|
12
|
-
*/
|
|
13
|
-
export declare const OPENAI_RUN_FN_SPECS: {
|
|
14
|
-
serves: ["image.editing"] | ["image.generation"] | ["model.count-tokens"] | ["model.info"] | ["model.search"] | ["text.embedding"] | ["text.generation"] | ["text.rewriter"] | ["text.summary"] | ["text.generation", "json-mode"] | ["text.generation", "tool-use"];
|
|
15
|
-
}[];
|
|
16
|
-
export declare function openAiWorkerRunFnSpecs(): readonly {
|
|
17
|
-
readonly serves: readonly Capability[];
|
|
18
|
-
}[];
|
|
19
|
-
/**
|
|
20
|
-
* Shape used by the model-name regexes — `model_id` is required, the rest
|
|
21
|
-
* is loosely-typed metadata only used to opportunistically widen the
|
|
22
|
-
* inferred capability set.
|
|
23
|
-
*/
|
|
24
|
-
type CapabilityHints = Pick<ModelRecord, "model_id" | "provider_config" | "capabilities">;
|
|
25
|
-
/**
|
|
26
|
-
* Heuristic capability inference for an OpenAI {@link ModelRecord}. Pattern-
|
|
27
|
-
* matches the canonical OpenAI model id strings (and the `provider_config.
|
|
28
|
-
* model_name` if present) to a closed set of {@link Capability}s. Falls back
|
|
29
|
-
* to the model's stored `capabilities` array (or a baseline of search +
|
|
30
|
-
* info) when no pattern matches.
|
|
31
|
-
*
|
|
32
|
-
* Main-thread method only — workers do not run capability inference.
|
|
33
|
-
*/
|
|
34
|
-
export declare function inferOpenAiCapabilities(model: CapabilityHints): readonly Capability[];
|
|
35
|
-
export {};
|
|
36
|
-
//# sourceMappingURL=OpenAI_Capabilities.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_Capabilities.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_Capabilities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGnE;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;GAAuD,CAAC;AAExF,wBAAgB,sBAAsB,IAAI,SAAS;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;CAAE,EAAE,CAE9F;AAED;;;;GAIG;AACH,KAAK,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,iBAAiB,GAAG,cAAc,CAAC,CAAC;AAE1F;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,UAAU,EAAE,CAgDrF"}
|
|
@@ -1,30 +0,0 @@
|
|
|
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 OpenAI's capability sets.
|
|
8
|
-
*
|
|
9
|
-
* Both `OPENAI_RUN_FNS` (the worker-side registration list) and
|
|
10
|
-
* `workerRunFnSpecs()` (the main-thread proxy declaration) derive their
|
|
11
|
-
* `serves` arrays from these named exports. SDK-free so the main thread
|
|
12
|
-
* can import without paying the OpenAI client cost.
|
|
13
|
-
*
|
|
14
|
-
* To add a new capability set: declare a new `as const` constant here,
|
|
15
|
-
* then reference it from both `OPENAI_RUN_FNS` and `OPENAI_RUN_FN_SPECS`.
|
|
16
|
-
*/
|
|
17
|
-
export declare const OPENAI_TEXT_GENERATION: ["text.generation"];
|
|
18
|
-
export declare const OPENAI_TOOL_USE: ["text.generation", "tool-use"];
|
|
19
|
-
export declare const OPENAI_JSON_MODE: ["text.generation", "json-mode"];
|
|
20
|
-
export declare const OPENAI_TEXT_REWRITER: ["text.rewriter"];
|
|
21
|
-
export declare const OPENAI_TEXT_SUMMARY: ["text.summary"];
|
|
22
|
-
export declare const OPENAI_TEXT_EMBEDDING: ["text.embedding"];
|
|
23
|
-
export declare const OPENAI_IMAGE_GENERATION: ["image.generation"];
|
|
24
|
-
export declare const OPENAI_IMAGE_EDITING: ["image.editing"];
|
|
25
|
-
export declare const OPENAI_COUNT_TOKENS: ["model.count-tokens"];
|
|
26
|
-
export declare const OPENAI_MODEL_SEARCH: ["model.search"];
|
|
27
|
-
export declare const OPENAI_MODEL_INFO: ["model.info"];
|
|
28
|
-
/** Aggregated list — for `workerRunFnSpecs()` derivation. Order MUST match `OPENAI_RUN_FNS`. */
|
|
29
|
-
export declare const OPENAI_CAPABILITY_SETS: readonly [["text.generation"], ["text.generation", "tool-use"], ["text.generation", "json-mode"], ["text.rewriter"], ["text.summary"], ["text.embedding"], ["image.generation"], ["image.editing"], ["model.count-tokens"], ["model.search"], ["model.info"]];
|
|
30
|
-
//# sourceMappingURL=OpenAI_CapabilitySets.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_CapabilitySets.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_CapabilitySets.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,qBAAsD,CAAC;AAC1F,eAAO,MAAM,eAAe,iCAAkE,CAAC;AAC/F,eAAO,MAAM,gBAAgB,kCAAmE,CAAC;AACjG,eAAO,MAAM,oBAAoB,mBAAoD,CAAC;AACtF,eAAO,MAAM,mBAAmB,kBAAmD,CAAC;AACpF,eAAO,MAAM,qBAAqB,oBAAqD,CAAC;AACxF,eAAO,MAAM,uBAAuB,sBAAuD,CAAC;AAC5F,eAAO,MAAM,oBAAoB,mBAAoD,CAAC;AACtF,eAAO,MAAM,mBAAmB,wBAAyD,CAAC;AAC1F,eAAO,MAAM,mBAAmB,kBAAmD,CAAC;AACpF,eAAO,MAAM,iBAAiB,gBAAiD,CAAC;AAEhF,gGAAgG;AAChG,eAAO,MAAM,sBAAsB,+PAYzB,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
7
|
-
/**
|
|
8
|
-
* Hostnames (or hostname suffixes) accepted for OpenAI `base_url` without
|
|
9
|
-
* the explicit `trustedBaseUrl` opt-out. Includes Azure OpenAI tenants.
|
|
10
|
-
*/
|
|
11
|
-
export declare const OPENAI_ALLOWED_HOSTS: readonly string[];
|
|
12
|
-
type OpenAIClientClass = new (config: any) => any;
|
|
13
|
-
export declare function loadOpenAISDK(): Promise<OpenAIClientClass>;
|
|
14
|
-
export declare function getClient(model: OpenAiModelConfig | undefined): Promise<any>;
|
|
15
|
-
export declare function getModelName(model: OpenAiModelConfig | undefined): string;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=OpenAI_Client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_Client.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_Client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAA4C,CAAC;AAE/F,KAAK,iBAAiB,GAAG,KAAK,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC;AAKlD,wBAAsB,aAAa,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAShE;AAgBD,wBAAsB,SAAS,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,gBA4BnE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,GAAG,MAAM,CAMzE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_Constants.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_Constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,MAAM,WAAW,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { AiProviderPreviewRunFn, AiProviderRunFn, CountTokensTaskInput, CountTokensTaskOutput } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* One-shot run-fn for `["model.count-tokens"]` in the browser.
|
|
10
|
-
* Emits a single `finish` event carrying the token count.
|
|
11
|
-
*/
|
|
12
|
-
export declare const OpenAI_CountTokens_Stream: AiProviderRunFn<CountTokensTaskInput, CountTokensTaskOutput, OpenAiModelConfig>;
|
|
13
|
-
/** Lightweight preview path used by `AiTask.executePreview()`. */
|
|
14
|
-
export declare const OpenAI_CountTokens_Preview: AiProviderPreviewRunFn<CountTokensTaskInput, CountTokensTaskOutput, OpenAiModelConfig>;
|
|
15
|
-
//# sourceMappingURL=OpenAI_CountTokens.browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_CountTokens.browser.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_CountTokens.browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA4C9D;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,CAIlB,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,0BAA0B,EAAE,sBAAsB,CAC7D,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,CAGlB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { AiProviderPreviewRunFn, AiProviderRunFn, CountTokensTaskInput, CountTokensTaskOutput } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* One-shot run-fn for `["model.count-tokens"]`. Emits a single
|
|
10
|
-
* `finish` event carrying the token count.
|
|
11
|
-
*/
|
|
12
|
-
export declare const OpenAI_CountTokens_Stream: AiProviderRunFn<CountTokensTaskInput, CountTokensTaskOutput, OpenAiModelConfig>;
|
|
13
|
-
/** Lightweight preview path used by `AiTask.executePreview()`. */
|
|
14
|
-
export declare const OpenAI_CountTokens_Preview: AiProviderPreviewRunFn<CountTokensTaskInput, CountTokensTaskOutput, OpenAiModelConfig>;
|
|
15
|
-
//# sourceMappingURL=OpenAI_CountTokens.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_CountTokens.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_CountTokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA4C9D;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,CAIlB,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,0BAA0B,EAAE,sBAAsB,CAC7D,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,CAGlB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { AiProviderRunFn, ImageEditTaskInput, ImageEditTaskOutput } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* Streaming run-fn for `["image.editing"]`. SDK v6.35+ supports
|
|
10
|
-
* `stream: true` on `images.edit` for GPT image models — emits snapshot
|
|
11
|
-
* events for each partial + final image, then finish.
|
|
12
|
-
*/
|
|
13
|
-
export declare const OpenAI_ImageEdit_Stream: AiProviderRunFn<ImageEditTaskInput, ImageEditTaskOutput, OpenAiModelConfig>;
|
|
14
|
-
//# sourceMappingURL=OpenAI_ImageEdit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_ImageEdit.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_ImageEdit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAU7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAqF9D;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,eAAe,CACnD,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,CAoClB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { AiProviderRunFn, ImageGenerateTaskInput, ImageGenerateTaskOutput } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* Streaming run-fn for `["image.generation"]`. GPT-image models support
|
|
10
|
-
* native streaming via `stream: true` + `partial_images: 3` and emit a
|
|
11
|
-
* `snapshot` event per partial frame plus a final snapshot. DALL-E models
|
|
12
|
-
* do not support streaming so this falls back to a single non-streaming
|
|
13
|
-
* call and emits one snapshot before finish.
|
|
14
|
-
*/
|
|
15
|
-
export declare const OpenAI_ImageGenerate_Stream: AiProviderRunFn<ImageGenerateTaskInput, ImageGenerateTaskOutput, OpenAiModelConfig>;
|
|
16
|
-
//# sourceMappingURL=OpenAI_ImageGenerate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_ImageGenerate.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_ImageGenerate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAMtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAuB9D;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,EAAE,eAAe,CACvD,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,CA6FlB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Registers the OpenAI per-provider image validator. Called at provider registration time
|
|
8
|
-
* (both inline and worker-backed paths) so it runs on the main thread before any dispatch.
|
|
9
|
-
*
|
|
10
|
-
* Currently validates:
|
|
11
|
-
* - DALL-E 2 + non-empty `additionalImages` → throws (single-image edit only).
|
|
12
|
-
* DALL-E 3 + ImageEditTask is rejected upstream by the model registry task-array check.
|
|
13
|
-
*/
|
|
14
|
-
export declare function registerOpenAiImageValidator(): void;
|
|
15
|
-
//# sourceMappingURL=OpenAI_ImageValidation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_ImageValidation.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_ImageValidation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,IAAI,IAAI,CAiBnD"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { AiProviderPreviewRunFn, AiProviderRunFnRegistration } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
export { getClient, getModelName, loadOpenAISDK } from "./OpenAI_Client";
|
|
9
|
-
/**
|
|
10
|
-
* Browser build of {@link OPENAI_RUN_FNS}. Identical to the node build
|
|
11
|
-
* except for the count-tokens import (uses `js-tiktoken` rather than the
|
|
12
|
-
* WASM `tiktoken` package).
|
|
13
|
-
*/
|
|
14
|
-
export declare const OPENAI_RUN_FNS: readonly AiProviderRunFnRegistration<any, any, OpenAiModelConfig>[];
|
|
15
|
-
export declare const OPENAI_PREVIEW_TASKS: Record<string, AiProviderPreviewRunFn<any, any, OpenAiModelConfig>>;
|
|
16
|
-
//# sourceMappingURL=OpenAI_JobRunFns.browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_JobRunFns.browser.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_JobRunFns.browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAcxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAiBzE;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,2BAA2B,CAAC,GAAG,EAAE,GAAG,EAAE,iBAAiB,CAAC,EAY7F,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,MAAM,EACN,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,iBAAiB,CAAC,CAGpD,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { AiProviderPreviewRunFn, AiProviderRunFnRegistration } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
export { getClient, getModelName, loadOpenAISDK } from "./OpenAI_Client";
|
|
9
|
-
/**
|
|
10
|
-
* Capability-set run-fn registrations for the OpenAI provider. Order is
|
|
11
|
-
* significant only as a tiebreaker — the dispatcher prefers the smallest
|
|
12
|
-
* `serves` set that is a superset of the task's `requires`, so the bare
|
|
13
|
-
* `["text.generation"]` entry wins for a plain {@link TextGenerationTask} or
|
|
14
|
-
* {@link AiChatTask} while the `["text.generation", "tool-use"]` entry wins
|
|
15
|
-
* for {@link ToolCallingTask}.
|
|
16
|
-
*/
|
|
17
|
-
export declare const OPENAI_RUN_FNS: readonly AiProviderRunFnRegistration<any, any, OpenAiModelConfig>[];
|
|
18
|
-
export declare const OPENAI_PREVIEW_TASKS: Record<string, AiProviderPreviewRunFn<any, any, OpenAiModelConfig>>;
|
|
19
|
-
//# sourceMappingURL=OpenAI_JobRunFns.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_JobRunFns.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_JobRunFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAcxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAczE;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,2BAA2B,CAAC,GAAG,EAAE,GAAG,EAAE,iBAAiB,CAAC,EAY7F,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,MAAM,EACN,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,iBAAiB,CAAC,CAGpD,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { AiProviderRunFn, ModelInfoTaskInput, ModelInfoTaskOutput } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* One-shot run-fn for `["model.info"]`. Returns a synchronous
|
|
10
|
-
* info record from the in-process embedding-dimensions table; OpenAI does not
|
|
11
|
-
* expose an HTTP endpoint for this metadata. Emits a single `finish` event.
|
|
12
|
-
*/
|
|
13
|
-
export declare const OpenAI_ModelInfo_Stream: AiProviderRunFn<ModelInfoTaskInput, ModelInfoTaskOutput, OpenAiModelConfig>;
|
|
14
|
-
//# sourceMappingURL=OpenAI_ModelInfo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_ModelInfo.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_ModelInfo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAS9D;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,eAAe,CACnD,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,CAiDlB,CAAC"}
|