@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
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { FromSchema } from "@workglow/util/worker";
|
|
7
|
-
export declare const OpenAiModelSchema: {
|
|
8
|
-
readonly type: "object";
|
|
9
|
-
readonly properties: {
|
|
10
|
-
readonly provider: {
|
|
11
|
-
readonly const: "OPENAI";
|
|
12
|
-
readonly description: "Discriminator: OpenAI cloud provider.";
|
|
13
|
-
};
|
|
14
|
-
readonly provider_config: {
|
|
15
|
-
readonly type: "object";
|
|
16
|
-
readonly description: "OpenAI-specific configuration.";
|
|
17
|
-
readonly properties: {
|
|
18
|
-
readonly model_name: {
|
|
19
|
-
readonly type: "string";
|
|
20
|
-
readonly description: "The OpenAI model identifier (e.g., 'gpt-4o', 'text-embedding-3-small').";
|
|
21
|
-
};
|
|
22
|
-
readonly credential_key: {
|
|
23
|
-
readonly type: "string";
|
|
24
|
-
readonly format: "credential";
|
|
25
|
-
readonly description: "Key to look up in the credential store for the API key.";
|
|
26
|
-
readonly "x-ui-hidden": true;
|
|
27
|
-
};
|
|
28
|
-
readonly base_url: {
|
|
29
|
-
readonly type: "string";
|
|
30
|
-
readonly description: "Base URL for the OpenAI API. Useful for Azure OpenAI or proxy servers.";
|
|
31
|
-
readonly default: "https://api.openai.com/v1";
|
|
32
|
-
};
|
|
33
|
-
readonly trustedBaseUrl: {
|
|
34
|
-
readonly type: "boolean";
|
|
35
|
-
readonly description: "When true, accept a base_url whose hostname is not in the built-in allow-list. Use only for known-good custom enterprise gateways — otherwise an attacker can exfiltrate the API key by pointing base_url at their own server.";
|
|
36
|
-
readonly default: false;
|
|
37
|
-
readonly "x-ui-hidden": true;
|
|
38
|
-
};
|
|
39
|
-
readonly organization: {
|
|
40
|
-
readonly type: "string";
|
|
41
|
-
readonly description: "OpenAI organization ID (optional).";
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
readonly required: readonly ["model_name"];
|
|
45
|
-
readonly additionalProperties: false;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
readonly required: readonly ["provider", "provider_config"];
|
|
49
|
-
readonly additionalProperties: true;
|
|
50
|
-
};
|
|
51
|
-
export declare const OpenAiModelRecordSchema: {
|
|
52
|
-
readonly type: "object";
|
|
53
|
-
readonly properties: {
|
|
54
|
-
readonly model_id: {
|
|
55
|
-
readonly type: "string";
|
|
56
|
-
};
|
|
57
|
-
readonly capabilities: {
|
|
58
|
-
readonly type: "array";
|
|
59
|
-
readonly items: {
|
|
60
|
-
readonly type: "string";
|
|
61
|
-
};
|
|
62
|
-
readonly "x-ui-editor": "multiselect";
|
|
63
|
-
};
|
|
64
|
-
readonly title: {
|
|
65
|
-
readonly type: "string";
|
|
66
|
-
};
|
|
67
|
-
readonly description: {
|
|
68
|
-
readonly type: "string";
|
|
69
|
-
readonly "x-ui-editor": "textarea";
|
|
70
|
-
};
|
|
71
|
-
readonly metadata: {
|
|
72
|
-
readonly type: "object";
|
|
73
|
-
readonly default: {};
|
|
74
|
-
readonly "x-ui-hidden": true;
|
|
75
|
-
};
|
|
76
|
-
readonly provider: {
|
|
77
|
-
readonly const: "OPENAI";
|
|
78
|
-
readonly description: "Discriminator: OpenAI cloud provider.";
|
|
79
|
-
};
|
|
80
|
-
readonly provider_config: {
|
|
81
|
-
readonly type: "object";
|
|
82
|
-
readonly description: "OpenAI-specific configuration.";
|
|
83
|
-
readonly properties: {
|
|
84
|
-
readonly model_name: {
|
|
85
|
-
readonly type: "string";
|
|
86
|
-
readonly description: "The OpenAI model identifier (e.g., 'gpt-4o', 'text-embedding-3-small').";
|
|
87
|
-
};
|
|
88
|
-
readonly credential_key: {
|
|
89
|
-
readonly type: "string";
|
|
90
|
-
readonly format: "credential";
|
|
91
|
-
readonly description: "Key to look up in the credential store for the API key.";
|
|
92
|
-
readonly "x-ui-hidden": true;
|
|
93
|
-
};
|
|
94
|
-
readonly base_url: {
|
|
95
|
-
readonly type: "string";
|
|
96
|
-
readonly description: "Base URL for the OpenAI API. Useful for Azure OpenAI or proxy servers.";
|
|
97
|
-
readonly default: "https://api.openai.com/v1";
|
|
98
|
-
};
|
|
99
|
-
readonly trustedBaseUrl: {
|
|
100
|
-
readonly type: "boolean";
|
|
101
|
-
readonly description: "When true, accept a base_url whose hostname is not in the built-in allow-list. Use only for known-good custom enterprise gateways — otherwise an attacker can exfiltrate the API key by pointing base_url at their own server.";
|
|
102
|
-
readonly default: false;
|
|
103
|
-
readonly "x-ui-hidden": true;
|
|
104
|
-
};
|
|
105
|
-
readonly organization: {
|
|
106
|
-
readonly type: "string";
|
|
107
|
-
readonly description: "OpenAI organization ID (optional).";
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
readonly required: readonly ["model_name"];
|
|
111
|
-
readonly additionalProperties: false;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
readonly required: readonly ["model_id", "capabilities", "provider", "title", "description", "provider_config", "metadata", "provider", "provider_config"];
|
|
115
|
-
readonly additionalProperties: false;
|
|
116
|
-
};
|
|
117
|
-
export type OpenAiModelRecord = FromSchema<typeof OpenAiModelRecordSchema>;
|
|
118
|
-
export declare const OpenAiModelConfigSchema: {
|
|
119
|
-
readonly type: "object";
|
|
120
|
-
readonly properties: {
|
|
121
|
-
readonly model_id: {
|
|
122
|
-
readonly type: "string";
|
|
123
|
-
};
|
|
124
|
-
readonly capabilities: {
|
|
125
|
-
readonly type: "array";
|
|
126
|
-
readonly items: {
|
|
127
|
-
readonly type: "string";
|
|
128
|
-
};
|
|
129
|
-
readonly "x-ui-editor": "multiselect";
|
|
130
|
-
};
|
|
131
|
-
readonly title: {
|
|
132
|
-
readonly type: "string";
|
|
133
|
-
};
|
|
134
|
-
readonly description: {
|
|
135
|
-
readonly type: "string";
|
|
136
|
-
readonly "x-ui-editor": "textarea";
|
|
137
|
-
};
|
|
138
|
-
readonly metadata: {
|
|
139
|
-
readonly type: "object";
|
|
140
|
-
readonly default: {};
|
|
141
|
-
readonly "x-ui-hidden": true;
|
|
142
|
-
};
|
|
143
|
-
readonly provider: {
|
|
144
|
-
readonly const: "OPENAI";
|
|
145
|
-
readonly description: "Discriminator: OpenAI cloud provider.";
|
|
146
|
-
};
|
|
147
|
-
readonly provider_config: {
|
|
148
|
-
readonly type: "object";
|
|
149
|
-
readonly description: "OpenAI-specific configuration.";
|
|
150
|
-
readonly properties: {
|
|
151
|
-
readonly model_name: {
|
|
152
|
-
readonly type: "string";
|
|
153
|
-
readonly description: "The OpenAI model identifier (e.g., 'gpt-4o', 'text-embedding-3-small').";
|
|
154
|
-
};
|
|
155
|
-
readonly credential_key: {
|
|
156
|
-
readonly type: "string";
|
|
157
|
-
readonly format: "credential";
|
|
158
|
-
readonly description: "Key to look up in the credential store for the API key.";
|
|
159
|
-
readonly "x-ui-hidden": true;
|
|
160
|
-
};
|
|
161
|
-
readonly base_url: {
|
|
162
|
-
readonly type: "string";
|
|
163
|
-
readonly description: "Base URL for the OpenAI API. Useful for Azure OpenAI or proxy servers.";
|
|
164
|
-
readonly default: "https://api.openai.com/v1";
|
|
165
|
-
};
|
|
166
|
-
readonly trustedBaseUrl: {
|
|
167
|
-
readonly type: "boolean";
|
|
168
|
-
readonly description: "When true, accept a base_url whose hostname is not in the built-in allow-list. Use only for known-good custom enterprise gateways — otherwise an attacker can exfiltrate the API key by pointing base_url at their own server.";
|
|
169
|
-
readonly default: false;
|
|
170
|
-
readonly "x-ui-hidden": true;
|
|
171
|
-
};
|
|
172
|
-
readonly organization: {
|
|
173
|
-
readonly type: "string";
|
|
174
|
-
readonly description: "OpenAI organization ID (optional).";
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
readonly required: readonly ["model_name"];
|
|
178
|
-
readonly additionalProperties: false;
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
readonly required: readonly ["provider", "provider_config", "provider", "provider_config"];
|
|
182
|
-
readonly additionalProperties: false;
|
|
183
|
-
};
|
|
184
|
-
export type OpenAiModelConfig = FromSchema<typeof OpenAiModelConfigSchema>;
|
|
185
|
-
//# sourceMappingURL=OpenAI_ModelSchema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_ModelSchema.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_ModelSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAwB,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGzE,eAAO,MAAM,iBAAiB;mBACtB,QAAQ;;iBAEZ,QAAQ;qBACN,KAAK;qBACL,WAAW,EAAE,uCAAuC;;iBAEtD,eAAe;qBACb,IAAI,EAAE,QAAQ;qBACd,WAAW,EAAE,gCAAgC;qBAC7C,UAAU;yBACR,UAAU;6BACR,IAAI,EAAE,QAAQ;6BACd,WAAW,EAAE,yEAAyE;;yBAExF,cAAc;6BACZ,IAAI,EAAE,QAAQ;6BACd,MAAM,EAAE,YAAY;6BACpB,WAAW,EAAE,yDAAyD;6BACtE,aAAa;;yBAEf,QAAQ;6BACN,IAAI,EAAE,QAAQ;6BACd,WAAW,EAAE,wEAAwE;6BACrF,OAAO,EAAE,2BAA2B;;yBAEtC,cAAc;6BACZ,IAAI,EAAE,SAAS;6BACf,WAAW,EACT,gOAAgO;6BAClO,OAAO;6BACP,aAAa;;yBAEf,YAAY;6BACV,IAAI,EAAE,QAAQ;6BACd,WAAW,EAAE,oCAAoC;;;qBAGrD,QAAQ;qBACR,oBAAoB;;;;;CAKe,CAAC;AAE1C,eAAO,MAAM,uBAAuB;mBAC5B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;qBA3CV,KAAK;qBACL,WAAW,EAAE,uCAAuC;;;qBAGpD,IAAI,EAAE,QAAQ;qBACd,WAAW,EAAE,gCAAgC;qBAC7C,UAAU;yBACR,UAAU;6BACR,IAAI,EAAE,QAAQ;6BACd,WAAW,EAAE,yEAAyE;;yBAExF,cAAc;6BACZ,IAAI,EAAE,QAAQ;6BACd,MAAM,EAAE,YAAY;6BACpB,WAAW,EAAE,yDAAyD;6BACtE,aAAa;;yBAEf,QAAQ;6BACN,IAAI,EAAE,QAAQ;6BACd,WAAW,EAAE,wEAAwE;6BACrF,OAAO,EAAE,2BAA2B;;yBAEtC,cAAc;6BACZ,IAAI,EAAE,SAAS;6BACf,WAAW,EACT,gOAAgO;6BAClO,OAAO;6BACP,aAAa;;yBAEf,YAAY;6BACV,IAAI,EAAE,QAAQ;6BACd,WAAW,EAAE,oCAAoC;;;qBAGrD,QAAQ;qBACR,oBAAoB;;;;;CAee,CAAC;AAE1C,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE3E,eAAO,MAAM,uBAAuB;mBAC5B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;qBAvDV,KAAK;qBACL,WAAW,EAAE,uCAAuC;;;qBAGpD,IAAI,EAAE,QAAQ;qBACd,WAAW,EAAE,gCAAgC;qBAC7C,UAAU;yBACR,UAAU;6BACR,IAAI,EAAE,QAAQ;6BACd,WAAW,EAAE,yEAAyE;;yBAExF,cAAc;6BACZ,IAAI,EAAE,QAAQ;6BACd,MAAM,EAAE,YAAY;6BACpB,WAAW,EAAE,yDAAyD;6BACtE,aAAa;;yBAEf,QAAQ;6BACN,IAAI,EAAE,QAAQ;6BACd,WAAW,EAAE,wEAAwE;6BACrF,OAAO,EAAE,2BAA2B;;yBAEtC,cAAc;6BACZ,IAAI,EAAE,SAAS;6BACf,WAAW,EACT,gOAAgO;6BAClO,OAAO;6BACP,aAAa;;yBAEf,YAAY;6BACV,IAAI,EAAE,QAAQ;6BACd,WAAW,EAAE,oCAAoC;;;qBAGrD,QAAQ;qBACR,oBAAoB;;;;;CA2Be,CAAC;AAE1C,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -1,13 +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, ModelSearchTaskInput, ModelSearchTaskOutput } from "@workglow/ai";
|
|
7
|
-
/**
|
|
8
|
-
* One-shot run-fn for `["model.search"]`. Emits a
|
|
9
|
-
* single `finish` event with the search results. When no credential key is
|
|
10
|
-
* provided, falls back to a curated static list of well-known OpenAI models.
|
|
11
|
-
*/
|
|
12
|
-
export declare const OpenAI_ModelSearch_Stream: AiProviderRunFn<ModelSearchTaskInput, ModelSearchTaskOutput>;
|
|
13
|
-
//# sourceMappingURL=OpenAI_ModelSearch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_ModelSearch.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_ModelSearch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAuEtB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,oBAAoB,EACpB,qBAAqB,CAUtB,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 { AiProviderRunFn, StructuredGenerationTaskInput, StructuredGenerationTaskOutput } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* Streaming run-fn for `["text.generation", "json-mode"]`. Emits
|
|
10
|
-
* `object-delta` events with progressively-completed partial JSON snapshots
|
|
11
|
-
* on the `object` port, ending with a `finish` event carrying the parsed
|
|
12
|
-
* final object.
|
|
13
|
-
*/
|
|
14
|
-
export declare const OpenAI_StructuredGeneration_Stream: AiProviderRunFn<StructuredGenerationTaskInput, StructuredGenerationTaskOutput, OpenAiModelConfig>;
|
|
15
|
-
//# sourceMappingURL=OpenAI_StructuredGeneration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_StructuredGeneration.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_StructuredGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,6BAA6B,EAC7B,8BAA8B,EAC/B,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC,EAAE,eAAe,CAC9D,6BAA6B,EAC7B,8BAA8B,EAC9B,iBAAiB,CA6ClB,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, TextEmbeddingTaskInput, TextEmbeddingTaskOutput } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* One-shot run-fn for `["text.embedding"]`. Calls the OpenAI
|
|
10
|
-
* embeddings endpoint and emits a single `finish` event carrying the vector
|
|
11
|
-
* (or array of vectors when `input.text` is an array).
|
|
12
|
-
*/
|
|
13
|
-
export declare const OpenAI_TextEmbedding_Stream: AiProviderRunFn<TextEmbeddingTaskInput, TextEmbeddingTaskOutput, OpenAiModelConfig>;
|
|
14
|
-
//# sourceMappingURL=OpenAI_TextEmbedding.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_TextEmbedding.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_TextEmbedding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,eAAe,CACvD,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,CA6BlB,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, TextGenerationTaskInput, TextGenerationTaskOutput } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* Streaming run-fn for the `["text.generation"]` capability. Used by both
|
|
10
|
-
* {@link TextGenerationTask} (prompt-only input) and {@link AiChatTask}
|
|
11
|
-
* (full conversation history). Emits `text-delta` events on the `text` port
|
|
12
|
-
* and a final empty `finish` event per the streaming convention (consumer
|
|
13
|
-
* accumulates).
|
|
14
|
-
*/
|
|
15
|
-
export declare const OpenAI_TextGeneration_Stream: AiProviderRunFn<TextGenerationTaskInput, TextGenerationTaskOutput, OpenAiModelConfig>;
|
|
16
|
-
//# sourceMappingURL=OpenAI_TextGeneration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_TextGeneration.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_TextGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAgD9D;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,EAAE,eAAe,CACxD,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,CA0BlB,CAAC"}
|
|
@@ -1,13 +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, TextRewriterTaskInput, TextRewriterTaskOutput } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* Streaming run-fn for `["text.rewriter"]`. Emits `text-delta` events on
|
|
10
|
-
* the `text` port and a final empty `finish` event.
|
|
11
|
-
*/
|
|
12
|
-
export declare const OpenAI_TextRewriter_Stream: AiProviderRunFn<TextRewriterTaskInput, TextRewriterTaskOutput, OpenAiModelConfig>;
|
|
13
|
-
//# sourceMappingURL=OpenAI_TextRewriter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_TextRewriter.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_TextRewriter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,eAAe,CACtD,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,CAwBlB,CAAC"}
|
|
@@ -1,13 +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, TextSummaryTaskInput, TextSummaryTaskOutput } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* Streaming run-fn for `["text.summary"]`. Emits `text-delta` events on
|
|
10
|
-
* the `text` port and a final empty `finish` event.
|
|
11
|
-
*/
|
|
12
|
-
export declare const OpenAI_TextSummary_Stream: AiProviderRunFn<TextSummaryTaskInput, TextSummaryTaskOutput, OpenAiModelConfig>;
|
|
13
|
-
//# sourceMappingURL=OpenAI_TextSummary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_TextSummary.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_TextSummary.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAEjG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,CAwBlB,CAAC"}
|
|
@@ -1,18 +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, ToolCallingTaskInput, ToolCallingTaskOutput } from "@workglow/ai";
|
|
7
|
-
import type { OpenAiModelConfig } from "./OpenAI_ModelSchema";
|
|
8
|
-
/**
|
|
9
|
-
* Streaming run-fn for `["text.generation", "tool-use"]`. Calls the OpenAI
|
|
10
|
-
* chat-completions endpoint with `stream: true` and forwards delta events via
|
|
11
|
-
* {@link accumulateOpenAIStream}, which emits `text-delta` and tool-call
|
|
12
|
-
* `object-delta` events plus a final empty `finish`.
|
|
13
|
-
*
|
|
14
|
-
* Defence-in-depth: each tool-call `object-delta` is filtered against
|
|
15
|
-
* `input.tools` so a hallucinated function name never reaches the consumer.
|
|
16
|
-
*/
|
|
17
|
-
export declare const OpenAI_ToolCalling_Stream: AiProviderRunFn<ToolCallingTaskInput, ToolCallingTaskOutput, OpenAiModelConfig>;
|
|
18
|
-
//# sourceMappingURL=OpenAI_ToolCalling.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI_ToolCalling.d.ts","sourceRoot":"","sources":["../../../src/ai/common/OpenAI_ToolCalling.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EAEtB,MAAM,cAAc,CAAC;AAQtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,CAiClB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
export { OPENAI_ALLOWED_HOSTS } from "./common/OpenAI_Client";
|
|
7
|
-
export * from "./common/OpenAI_Constants";
|
|
8
|
-
export * from "./common/OpenAI_ModelSchema";
|
|
9
|
-
export * from "./registerOpenAi";
|
|
10
|
-
//# sourceMappingURL=index.browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../../src/ai/index.browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC"}
|
package/dist/ai/index.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
export { OPENAI_ALLOWED_HOSTS } from "./common/OpenAI_Client";
|
|
7
|
-
export * from "./common/OpenAI_Constants";
|
|
8
|
-
export * from "./common/OpenAI_ImageValidation";
|
|
9
|
-
export * from "./common/OpenAI_ModelSchema";
|
|
10
|
-
export * from "./common/OpenAI_ModelSearch";
|
|
11
|
-
export * from "./registerOpenAi";
|
|
12
|
-
import { OpenAiQueuedProvider } from "./OpenAiQueuedProvider";
|
|
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 OpenAiQueuedProvider: typeof OpenAiQueuedProvider;
|
|
18
|
-
readonly OPENAI_RUN_FN_SPECS: {
|
|
19
|
-
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"];
|
|
20
|
-
}[];
|
|
21
|
-
readonly OPENAI_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: "OPENAI";
|
|
29
|
-
provider_config: {
|
|
30
|
-
base_url?: string | undefined;
|
|
31
|
-
credential_key?: string | undefined;
|
|
32
|
-
model_name: string;
|
|
33
|
-
organization?: string | undefined;
|
|
34
|
-
trustedBaseUrl?: boolean | undefined;
|
|
35
|
-
};
|
|
36
|
-
title?: string | undefined;
|
|
37
|
-
}>[];
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/ai/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AAIjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;CAIZ,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { AiProviderRegisterOptions } from "@workglow/ai";
|
|
7
|
-
export declare function registerOpenAi(options: AiProviderRegisterOptions & {
|
|
8
|
-
worker: Worker | (() => Worker);
|
|
9
|
-
}): Promise<void>;
|
|
10
|
-
//# sourceMappingURL=registerOpenAi.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerOpenAi.d.ts","sourceRoot":"","sources":["../../src/ai/registerOpenAi.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAK9D,wBAAsB,cAAc,CAClC,OAAO,EAAE,yBAAyB,GAAG;IACnC,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;CACjC,GACA,OAAO,CAAC,IAAI,CAAC,CAGf"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { AiProviderRegisterOptions } from "@workglow/ai";
|
|
7
|
-
export declare function registerOpenAiInline(options?: AiProviderRegisterOptions): Promise<void>;
|
|
8
|
-
//# sourceMappingURL=registerOpenAiInline.browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerOpenAiInline.browser.d.ts","sourceRoot":"","sources":["../../src/ai/registerOpenAiInline.browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAK9D,wBAAsB,oBAAoB,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAM7F"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { AiProviderRegisterOptions } from "@workglow/ai";
|
|
7
|
-
export declare function registerOpenAiInline(options?: AiProviderRegisterOptions): Promise<void>;
|
|
8
|
-
//# sourceMappingURL=registerOpenAiInline.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerOpenAiInline.d.ts","sourceRoot":"","sources":["../../src/ai/registerOpenAiInline.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAM9D,wBAAsB,oBAAoB,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAO7F"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerOpenAiWorker.browser.d.ts","sourceRoot":"","sources":["../../src/ai/registerOpenAiWorker.browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAK1D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerOpenAiWorker.d.ts","sourceRoot":"","sources":["../../src/ai/registerOpenAiWorker.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAK1D"}
|
|
@@ -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
|
-
* Browser build for OpenAI runtime registration (uses `js-tiktoken` instead of WASM `tiktoken`).
|
|
8
|
-
* Import from `@workglow/openai/ai-runtime` — not from the main `openai` barrel.
|
|
9
|
-
*
|
|
10
|
-
* Use `export *` (not `export { … } from "…"`) so the Bun bundler keeps the module graph.
|
|
11
|
-
*/
|
|
12
|
-
export * from "./common/OpenAI_Client";
|
|
13
|
-
export * from "./registerOpenAiInline.browser";
|
|
14
|
-
export * from "./registerOpenAiWorker.browser";
|
|
15
|
-
//# sourceMappingURL=runtime.browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.browser.d.ts","sourceRoot":"","sources":["../../src/ai/runtime.browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAGH,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC"}
|
package/dist/ai/runtime.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Worker server and main-thread inline OpenAI registration (pulls in `OpenAI_JobRunFns`),
|
|
8
|
-
* plus SDK client helpers (`OpenAI_Client`).
|
|
9
|
-
* Import from `@workglow/openai/ai-runtime` — not from the main `openai` barrel.
|
|
10
|
-
*
|
|
11
|
-
* Use `export *` (not `export { … } from "…"`) so the Bun bundler keeps the module graph.
|
|
12
|
-
*/
|
|
13
|
-
export * from "./common/OpenAI_Client";
|
|
14
|
-
export * from "./registerOpenAiInline";
|
|
15
|
-
export * from "./registerOpenAiWorker";
|
|
16
|
-
//# sourceMappingURL=runtime.d.ts.map
|
package/dist/ai/runtime.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/ai/runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AAGH,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai-runtime.browser.d.ts","sourceRoot":"","sources":["../src/ai-runtime.browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,cAAc,sBAAsB,CAAC"}
|