@workglow/ai 0.0.109 → 0.0.110
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/browser.js +57 -51
- package/dist/browser.js.map +20 -20
- package/dist/bun.js +57 -51
- package/dist/bun.js.map +20 -20
- package/dist/node.js +57 -51
- package/dist/node.js.map +20 -20
- package/dist/task/CountTokensTask.d.ts +25 -7
- package/dist/task/CountTokensTask.d.ts.map +1 -1
- package/dist/task/DocumentEnricherTask.d.ts.map +1 -1
- package/dist/task/ModelInfoTask.d.ts +5 -0
- package/dist/task/ModelInfoTask.d.ts.map +1 -1
- package/dist/task/RerankerTask.d.ts.map +1 -1
- package/dist/task/TextClassificationTask.d.ts +59 -21
- package/dist/task/TextClassificationTask.d.ts.map +1 -1
- package/dist/task/TextFillMaskTask.d.ts +70 -26
- package/dist/task/TextFillMaskTask.d.ts.map +1 -1
- package/dist/task/TextGenerationTask.d.ts +27 -8
- package/dist/task/TextGenerationTask.d.ts.map +1 -1
- package/dist/task/TextLanguageDetectionTask.d.ts +59 -21
- package/dist/task/TextLanguageDetectionTask.d.ts.map +1 -1
- package/dist/task/TextNamedEntityRecognitionTask.d.ts +70 -26
- package/dist/task/TextNamedEntityRecognitionTask.d.ts.map +1 -1
- package/dist/task/TextQuestionAnswerTask.d.ts +39 -11
- package/dist/task/TextQuestionAnswerTask.d.ts.map +1 -1
- package/dist/task/TextRewriterTask.d.ts +27 -8
- package/dist/task/TextRewriterTask.d.ts.map +1 -1
- package/dist/task/TextSummaryTask.d.ts +27 -8
- package/dist/task/TextSummaryTask.d.ts.map +1 -1
- package/dist/task/TextTranslationTask.d.ts +27 -8
- package/dist/task/TextTranslationTask.d.ts.map +1 -1
- package/dist/task/ToolCallingTask.d.ts +45 -13
- package/dist/task/ToolCallingTask.d.ts.map +1 -1
- package/dist/task/base/AiTask.d.ts.map +1 -1
- package/package.json +13 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextNamedEntityRecognitionTask.d.ts","sourceRoot":"","sources":["../../src/task/TextNamedEntityRecognitionTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAY,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAKvC,eAAO,MAAM,qCAAqC
|
|
1
|
+
{"version":3,"file":"TextNamedEntityRecognitionTask.d.ts","sourceRoot":"","sources":["../../src/task/TextNamedEntityRecognitionTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAY,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAKvC,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBf,CAAC;AAEpC,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiChB,CAAC;AAEpC,MAAM,MAAM,mCAAmC,GAAG,UAAU,CAC1D,OAAO,qCAAqC,CAC7C,CAAC;AACF,MAAM,MAAM,oCAAoC,GAAG,UAAU,CAC3D,OAAO,sCAAsC,CAC9C,CAAC;AAEF;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,MAAM,CACxD,mCAAmC,EACnC,oCAAoC,CACrC;IACC,OAAc,IAAI,SAAoC;IACtD,OAAc,QAAQ,SAAmB;IACzC,OAAc,KAAK,SAA8B;IACjD,OAAc,WAAW,SAAuC;WAClD,WAAW,IAAI,cAAc;WAG7B,YAAY,IAAI,cAAc;CAG7C;AAED;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,GACrC,OAAO,mCAAmC,EAC1C,SAAS,kBAAkB;;;;;;;;;;EAK5B,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,0BAA0B,EAAE,cAAc,CACxC,mCAAmC,EACnC,oCAAoC,EACpC,kBAAkB,CACnB,CAAC;KACH;CACF"}
|
|
@@ -10,14 +10,32 @@ export declare const TextQuestionAnswerInputSchema: {
|
|
|
10
10
|
readonly type: "object";
|
|
11
11
|
readonly properties: {
|
|
12
12
|
readonly context: {
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
readonly anyOf: readonly [{
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly title: "Context";
|
|
16
|
+
readonly description: "The context of the question";
|
|
17
|
+
}, {
|
|
18
|
+
readonly type: "array";
|
|
19
|
+
readonly items: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly title: "Context";
|
|
22
|
+
readonly description: "The context of the question";
|
|
23
|
+
};
|
|
24
|
+
}];
|
|
16
25
|
};
|
|
17
26
|
readonly question: {
|
|
18
|
-
readonly
|
|
19
|
-
|
|
20
|
-
|
|
27
|
+
readonly anyOf: readonly [{
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
readonly title: "Question";
|
|
30
|
+
readonly description: "The question to answer";
|
|
31
|
+
}, {
|
|
32
|
+
readonly type: "array";
|
|
33
|
+
readonly items: {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
readonly title: "Question";
|
|
36
|
+
readonly description: "The question to answer";
|
|
37
|
+
};
|
|
38
|
+
}];
|
|
21
39
|
};
|
|
22
40
|
readonly model: {
|
|
23
41
|
readonly oneOf: readonly [{
|
|
@@ -84,10 +102,20 @@ export declare const TextQuestionAnswerOutputSchema: {
|
|
|
84
102
|
readonly type: "object";
|
|
85
103
|
readonly properties: {
|
|
86
104
|
readonly text: {
|
|
87
|
-
readonly
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
105
|
+
readonly anyOf: readonly [{
|
|
106
|
+
readonly type: "string";
|
|
107
|
+
readonly title: "Text";
|
|
108
|
+
readonly description: "The generated text";
|
|
109
|
+
readonly "x-stream": "append";
|
|
110
|
+
}, {
|
|
111
|
+
readonly type: "array";
|
|
112
|
+
readonly items: {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
readonly title: "Text";
|
|
115
|
+
readonly description: "The generated text";
|
|
116
|
+
readonly "x-stream": "append";
|
|
117
|
+
};
|
|
118
|
+
}];
|
|
91
119
|
};
|
|
92
120
|
};
|
|
93
121
|
readonly required: readonly ["text"];
|
|
@@ -113,7 +141,7 @@ export declare class TextQuestionAnswerTask extends StreamingAiTask<TextQuestion
|
|
|
113
141
|
* @returns Promise resolving to the generated answer(s)
|
|
114
142
|
*/
|
|
115
143
|
export declare const textQuestionAnswer: (input: TextQuestionAnswerTaskInput, config?: JobQueueTaskConfig) => Promise<{
|
|
116
|
-
text: string;
|
|
144
|
+
text: string | string[];
|
|
117
145
|
}>;
|
|
118
146
|
declare module "@workglow/task-graph" {
|
|
119
147
|
interface Workflow {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextQuestionAnswerTask.d.ts","sourceRoot":"","sources":["../../src/task/TextQuestionAnswerTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAY,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAuBzD,eAAO,MAAM,6BAA6B
|
|
1
|
+
{"version":3,"file":"TextQuestionAnswerTask.d.ts","sourceRoot":"","sources":["../../src/task/TextQuestionAnswerTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAY,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAuBzD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASP,CAAC;AAEpC,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;CAOR,CAAC;AAEpC,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAC3F,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAE7F;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,eAAe,CACzD,2BAA2B,EAC3B,4BAA4B,EAC5B,kBAAkB,CACnB;IACC,OAAc,IAAI,SAA4B;IAC9C,OAAc,QAAQ,SAAmB;IACzC,OAAc,KAAK,SAA0B;IAC7C,OAAc,WAAW,SAAuE;WAClF,WAAW,IAAI,cAAc;WAG7B,YAAY,IAAI,cAAc;CAG7C;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,2BAA2B,EAClC,SAAS,kBAAkB;;EAG5B,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,kBAAkB,EAAE,cAAc,CAChC,2BAA2B,EAC3B,4BAA4B,EAC5B,kBAAkB,CACnB,CAAC;KACH;CACF"}
|
|
@@ -10,9 +10,18 @@ export declare const TextRewriterInputSchema: {
|
|
|
10
10
|
readonly type: "object";
|
|
11
11
|
readonly properties: {
|
|
12
12
|
readonly text: {
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
readonly anyOf: readonly [{
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly title: "Text";
|
|
16
|
+
readonly description: "The text to rewrite";
|
|
17
|
+
}, {
|
|
18
|
+
readonly type: "array";
|
|
19
|
+
readonly items: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly title: "Text";
|
|
22
|
+
readonly description: "The text to rewrite";
|
|
23
|
+
};
|
|
24
|
+
}];
|
|
16
25
|
};
|
|
17
26
|
readonly prompt: {
|
|
18
27
|
readonly type: "string";
|
|
@@ -84,10 +93,20 @@ export declare const TextRewriterOutputSchema: {
|
|
|
84
93
|
readonly type: "object";
|
|
85
94
|
readonly properties: {
|
|
86
95
|
readonly text: {
|
|
87
|
-
readonly
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
96
|
+
readonly anyOf: readonly [{
|
|
97
|
+
readonly type: "string";
|
|
98
|
+
readonly title: "Text";
|
|
99
|
+
readonly description: "The rewritten text";
|
|
100
|
+
readonly "x-stream": "append";
|
|
101
|
+
}, {
|
|
102
|
+
readonly type: "array";
|
|
103
|
+
readonly items: {
|
|
104
|
+
readonly type: "string";
|
|
105
|
+
readonly title: "Text";
|
|
106
|
+
readonly description: "The rewritten text";
|
|
107
|
+
readonly "x-stream": "append";
|
|
108
|
+
};
|
|
109
|
+
}];
|
|
91
110
|
};
|
|
92
111
|
};
|
|
93
112
|
readonly required: readonly ["text"];
|
|
@@ -113,7 +132,7 @@ export declare class TextRewriterTask extends StreamingAiTask<TextRewriterTaskIn
|
|
|
113
132
|
* @returns Promise resolving to the rewritten text output(s)
|
|
114
133
|
*/
|
|
115
134
|
export declare const textRewriter: (input: TextRewriterTaskInput, config?: JobQueueTaskConfig) => Promise<{
|
|
116
|
-
text: string;
|
|
135
|
+
text: string | string[];
|
|
117
136
|
}>;
|
|
118
137
|
declare module "@workglow/task-graph" {
|
|
119
138
|
interface Workflow {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextRewriterTask.d.ts","sourceRoot":"","sources":["../../src/task/TextRewriterTask.ts"],"names":[],"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ACpC,UAAU,QAAQ;QAChB,YAAY,EAAE,cAAc,CAAC,qBAAqB,EAAE,sBAAsB,EAAE,kBAAkB,CAAC,CAAC;KACjG;CACF"}
|
|
@@ -10,9 +10,18 @@ export declare const TextSummaryInputSchema: {
|
|
|
10
10
|
readonly type: "object";
|
|
11
11
|
readonly properties: {
|
|
12
12
|
readonly text: {
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
readonly anyOf: readonly [{
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly title: "Text";
|
|
16
|
+
readonly description: "The text to summarize";
|
|
17
|
+
}, {
|
|
18
|
+
readonly type: "array";
|
|
19
|
+
readonly items: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly title: "Text";
|
|
22
|
+
readonly description: "The text to summarize";
|
|
23
|
+
};
|
|
24
|
+
}];
|
|
16
25
|
};
|
|
17
26
|
readonly model: {
|
|
18
27
|
readonly oneOf: readonly [{
|
|
@@ -79,10 +88,20 @@ export declare const TextSummaryOutputSchema: {
|
|
|
79
88
|
readonly type: "object";
|
|
80
89
|
readonly properties: {
|
|
81
90
|
readonly text: {
|
|
82
|
-
readonly
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
readonly anyOf: readonly [{
|
|
92
|
+
readonly type: "string";
|
|
93
|
+
readonly title: "Text";
|
|
94
|
+
readonly description: "The summarized text";
|
|
95
|
+
readonly "x-stream": "append";
|
|
96
|
+
}, {
|
|
97
|
+
readonly type: "array";
|
|
98
|
+
readonly items: {
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
readonly title: "Text";
|
|
101
|
+
readonly description: "The summarized text";
|
|
102
|
+
readonly "x-stream": "append";
|
|
103
|
+
};
|
|
104
|
+
}];
|
|
86
105
|
};
|
|
87
106
|
};
|
|
88
107
|
readonly required: readonly ["text"];
|
|
@@ -108,7 +127,7 @@ export declare class TextSummaryTask extends StreamingAiTask<TextSummaryTaskInpu
|
|
|
108
127
|
* @returns Promise resolving to the summarized text output(s)
|
|
109
128
|
*/
|
|
110
129
|
export declare const textSummary: (input: TextSummaryTaskInput, config?: JobQueueTaskConfig) => Promise<{
|
|
111
|
-
text: string;
|
|
130
|
+
text: string | string[];
|
|
112
131
|
}>;
|
|
113
132
|
declare module "@workglow/task-graph" {
|
|
114
133
|
interface Workflow {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextSummaryTask.d.ts","sourceRoot":"","sources":["../../src/task/TextSummaryTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAY,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"TextSummaryTask.d.ts","sourceRoot":"","sources":["../../src/task/TextSummaryTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAY,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYA,CAAC;AAEpC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;CAYD,CAAC;AAEpC,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC7E,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE/E;;GAEG;AAEH,qBAAa,eAAgB,SAAQ,eAAe,CAAC,oBAAoB,EAAE,qBAAqB,CAAC;IAC/F,OAAc,IAAI,SAAqB;IACvC,OAAc,QAAQ,SAAmB;IACzC,OAAc,KAAK,SAAkB;IACrC,OAAc,WAAW,SACgD;WAC3D,WAAW,IAAI,cAAc;WAG7B,YAAY,IAAI,cAAc;CAG7C;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAU,OAAO,oBAAoB,EAAE,SAAS,kBAAkB;;EAEzF,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,WAAW,EAAE,cAAc,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,kBAAkB,CAAC,CAAC;KAC9F;CACF"}
|
|
@@ -10,9 +10,18 @@ export declare const TextTranslationInputSchema: {
|
|
|
10
10
|
readonly type: "object";
|
|
11
11
|
readonly properties: {
|
|
12
12
|
readonly text: {
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
readonly anyOf: readonly [{
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly title: "Text";
|
|
16
|
+
readonly description: "The text to translate";
|
|
17
|
+
}, {
|
|
18
|
+
readonly type: "array";
|
|
19
|
+
readonly items: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly title: "Text";
|
|
22
|
+
readonly description: "The text to translate";
|
|
23
|
+
};
|
|
24
|
+
}];
|
|
16
25
|
};
|
|
17
26
|
readonly source_lang: {
|
|
18
27
|
readonly type: "string";
|
|
@@ -93,10 +102,20 @@ export declare const TextTranslationOutputSchema: {
|
|
|
93
102
|
readonly type: "object";
|
|
94
103
|
readonly properties: {
|
|
95
104
|
readonly text: {
|
|
96
|
-
readonly
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
105
|
+
readonly anyOf: readonly [{
|
|
106
|
+
readonly type: "string";
|
|
107
|
+
readonly title: "Text";
|
|
108
|
+
readonly description: "The translated text";
|
|
109
|
+
readonly "x-stream": "replace";
|
|
110
|
+
}, {
|
|
111
|
+
readonly type: "array";
|
|
112
|
+
readonly items: {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
readonly title: "Text";
|
|
115
|
+
readonly description: "The translated text";
|
|
116
|
+
readonly "x-stream": "replace";
|
|
117
|
+
};
|
|
118
|
+
}];
|
|
100
119
|
};
|
|
101
120
|
readonly target_lang: {
|
|
102
121
|
readonly type: "string";
|
|
@@ -129,7 +148,7 @@ export declare class TextTranslationTask extends StreamingAiTask<TextTranslation
|
|
|
129
148
|
* @returns Promise resolving to the translated text output(s)
|
|
130
149
|
*/
|
|
131
150
|
export declare const textTranslation: (input: TextTranslationTaskInput, config?: JobQueueTaskConfig) => Promise<{
|
|
132
|
-
text: string;
|
|
151
|
+
text: string | string[];
|
|
133
152
|
target_lang: string;
|
|
134
153
|
}>;
|
|
135
154
|
declare module "@workglow/task-graph" {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextTranslationTask.d.ts","sourceRoot":"","sources":["../../src/task/TextTranslationTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAY,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAWzD,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"TextTranslationTask.d.ts","sourceRoot":"","sources":["../../src/task/TextTranslationTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAY,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAWzD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBJ,CAAC;AAEpC,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaL,CAAC;AAEpC,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACrF,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEvF;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,eAAe,CACtD,wBAAwB,EACxB,yBAAyB,CAC1B;IACC,OAAc,IAAI,SAAyB;IAC3C,OAAc,QAAQ,SAAmB;IACzC,OAAc,KAAK,SAAsB;IACzC,OAAc,WAAW,SAAwE;WACnF,WAAW,IAAI,cAAc;WAG7B,YAAY,IAAI,cAAc;CAG7C;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,wBAAwB,EAAE,SAAS,kBAAkB;;;EAE3F,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,eAAe,EAAE,cAAc,CAC7B,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,CACnB,CAAC;KACH;CACF"}
|
|
@@ -120,9 +120,18 @@ export declare const ToolCallingInputSchema: {
|
|
|
120
120
|
readonly format: import(".").TypeModelSemantic;
|
|
121
121
|
};
|
|
122
122
|
readonly prompt: {
|
|
123
|
-
readonly
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
readonly anyOf: readonly [{
|
|
124
|
+
readonly type: "string";
|
|
125
|
+
readonly title: "Prompt";
|
|
126
|
+
readonly description: "The prompt to send to the model";
|
|
127
|
+
}, {
|
|
128
|
+
readonly type: "array";
|
|
129
|
+
readonly items: {
|
|
130
|
+
readonly type: "string";
|
|
131
|
+
readonly title: "Prompt";
|
|
132
|
+
readonly description: "The prompt to send to the model";
|
|
133
|
+
};
|
|
134
|
+
}];
|
|
126
135
|
};
|
|
127
136
|
readonly systemPrompt: {
|
|
128
137
|
readonly type: "string";
|
|
@@ -192,17 +201,38 @@ export declare const ToolCallingOutputSchema: {
|
|
|
192
201
|
readonly type: "object";
|
|
193
202
|
readonly properties: {
|
|
194
203
|
readonly text: {
|
|
195
|
-
readonly
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
204
|
+
readonly anyOf: readonly [{
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
readonly title: "Text";
|
|
207
|
+
readonly description: "Any text content generated by the model";
|
|
208
|
+
readonly "x-stream": "append";
|
|
209
|
+
}, {
|
|
210
|
+
readonly type: "array";
|
|
211
|
+
readonly items: {
|
|
212
|
+
readonly type: "string";
|
|
213
|
+
readonly title: "Text";
|
|
214
|
+
readonly description: "Any text content generated by the model";
|
|
215
|
+
readonly "x-stream": "append";
|
|
216
|
+
};
|
|
217
|
+
}];
|
|
199
218
|
};
|
|
200
219
|
readonly toolCalls: {
|
|
201
|
-
readonly
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
220
|
+
readonly anyOf: readonly [{
|
|
221
|
+
readonly type: "object";
|
|
222
|
+
readonly title: "Tool Calls";
|
|
223
|
+
readonly description: "Tool invocations requested by the model, keyed by call id";
|
|
224
|
+
readonly additionalProperties: true;
|
|
225
|
+
readonly "x-stream": "object";
|
|
226
|
+
}, {
|
|
227
|
+
readonly type: "array";
|
|
228
|
+
readonly items: {
|
|
229
|
+
readonly type: "object";
|
|
230
|
+
readonly title: "Tool Calls";
|
|
231
|
+
readonly description: "Tool invocations requested by the model, keyed by call id";
|
|
232
|
+
readonly additionalProperties: true;
|
|
233
|
+
readonly "x-stream": "object";
|
|
234
|
+
};
|
|
235
|
+
}];
|
|
206
236
|
};
|
|
207
237
|
};
|
|
208
238
|
readonly required: readonly ["text", "toolCalls"];
|
|
@@ -222,9 +252,11 @@ export declare class ToolCallingTask extends StreamingAiTask<ToolCallingTaskInpu
|
|
|
222
252
|
* Convenience function to run a tool calling task.
|
|
223
253
|
*/
|
|
224
254
|
export declare const toolCalling: (input: ToolCallingTaskInput, config?: JobQueueTaskConfig) => Promise<{
|
|
225
|
-
text: string;
|
|
255
|
+
text: string | string[];
|
|
226
256
|
toolCalls: {
|
|
227
257
|
[x: string]: unknown;
|
|
258
|
+
}[] | {
|
|
259
|
+
[x: string]: unknown;
|
|
228
260
|
};
|
|
229
261
|
}>;
|
|
230
262
|
declare module "@workglow/task-graph" {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolCallingTask.d.ts","sourceRoot":"","sources":["../../src/task/ToolCallingTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAA0B,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAa,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAMzD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,YAAY,CAAC,EAAE,UAAU,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAM5E;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,C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;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,oBAAoB,EAAE,SAAS,kBAAkB;;;;;;;EAEnF,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,WAAW,EAAE,cAAc,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,kBAAkB,CAAC,CAAC;KAC9F;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiTask.d.ts","sourceRoot":"","sources":["../../../src/task/base/AiTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AAEH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"AiTask.d.ts","sourceRoot":"","sources":["../../../src/task/base/AiTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAY,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,KAAK,uBAAuB,EAC5B,YAAY,EACZ,kBAAkB,EAElB,SAAS,EACT,KAAK,UAAU,EAEhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEvE,OAAO,EAAS,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAS3D,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,qBAAa,MAAM,CACjB,KAAK,SAAS,iBAAiB,GAAG,iBAAiB,EACnD,MAAM,SAAS,UAAU,GAAG,UAAU,EACtC,MAAM,SAAS,kBAAkB,GAAG,kBAAkB,CACtD,SAAQ,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IAC3C,OAAc,IAAI,EAAE,MAAM,CAAY;IAEtC;;;OAGG;gBACS,KAAK,GAAE,OAAO,CAAC,KAAK,CAAM,EAAE,MAAM,GAAE,MAAqB;IAkBrE;;;;;;;;;OASG;cACsB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAkC9E;;;;;OAKG;IACY,SAAS,CACtB,KAAK,EAAE,KAAK,EACZ,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;IAc1C;;;OAGG;cACsB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAKvF;;;;;;OAMG;IACY,eAAe,CAC5B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAe9B;;;;;;;;OAQG;IACG,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;IAmD7C,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,KAAK,CAAC;CAoC3E"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workglow/ai",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.110",
|
|
5
5
|
"description": "Core AI functionality for Workglow, including task execution, model management, and AI pipeline orchestration.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"watch": "concurrently -c 'auto' 'bun:watch-*'",
|
|
8
|
+
"watch-js": "concurrently -c 'auto' -n 'browser,node,bun' 'bun run watch-browser' 'bun run watch-node' 'bun run watch-bun'",
|
|
8
9
|
"watch-browser": "bun build --splitting --watch --no-clear-screen --target=browser --sourcemap=external --packages=external --outdir ./dist ./src/browser.ts",
|
|
9
10
|
"watch-node": "bun build --splitting --watch --no-clear-screen --target=node --sourcemap=external --packages=external --outdir ./dist ./src/node.ts",
|
|
10
11
|
"watch-bun": "bun build --splitting --watch --no-clear-screen --target=bun --sourcemap=external --packages=external --outdir ./dist ./src/bun.ts",
|
|
11
12
|
"watch-types": "tsc --watch --preserveWatchOutput",
|
|
12
13
|
"build-package": "concurrently -c 'auto' -n 'browser,node,bun,types' 'bun run build-browser' 'bun run build-node' 'bun run build-bun' 'bun run build-types'",
|
|
14
|
+
"build-js": "concurrently -c 'auto' -n 'browser,node,bun' 'bun run build-browser' 'bun run build-node' 'bun run build-bun'",
|
|
13
15
|
"build-clean": "rm -fr dist/* tsconfig.tsbuildinfo",
|
|
14
16
|
"build-browser": "bun build --splitting --target=browser --sourcemap=external --packages=external --outdir ./dist ./src/browser.ts",
|
|
15
17
|
"build-node": "bun build --splitting --target=node --sourcemap=external --packages=external --outdir ./dist ./src/node.ts",
|
|
@@ -35,11 +37,11 @@
|
|
|
35
37
|
"access": "public"
|
|
36
38
|
},
|
|
37
39
|
"peerDependencies": {
|
|
38
|
-
"@workglow/dataset": "0.0.
|
|
39
|
-
"@workglow/job-queue": "0.0.
|
|
40
|
-
"@workglow/storage": "0.0.
|
|
41
|
-
"@workglow/task-graph": "0.0.
|
|
42
|
-
"@workglow/util": "0.0.
|
|
40
|
+
"@workglow/dataset": "0.0.110",
|
|
41
|
+
"@workglow/job-queue": "0.0.110",
|
|
42
|
+
"@workglow/storage": "0.0.110",
|
|
43
|
+
"@workglow/task-graph": "0.0.110",
|
|
44
|
+
"@workglow/util": "0.0.110"
|
|
43
45
|
},
|
|
44
46
|
"peerDependenciesMeta": {
|
|
45
47
|
"@workglow/dataset": {
|
|
@@ -59,10 +61,10 @@
|
|
|
59
61
|
}
|
|
60
62
|
},
|
|
61
63
|
"devDependencies": {
|
|
62
|
-
"@workglow/dataset": "0.0.
|
|
63
|
-
"@workglow/job-queue": "0.0.
|
|
64
|
-
"@workglow/storage": "0.0.
|
|
65
|
-
"@workglow/task-graph": "0.0.
|
|
66
|
-
"@workglow/util": "0.0.
|
|
64
|
+
"@workglow/dataset": "0.0.110",
|
|
65
|
+
"@workglow/job-queue": "0.0.110",
|
|
66
|
+
"@workglow/storage": "0.0.110",
|
|
67
|
+
"@workglow/task-graph": "0.0.110",
|
|
68
|
+
"@workglow/util": "0.0.110"
|
|
67
69
|
}
|
|
68
70
|
}
|