@workglow/ai 0.2.14 → 0.2.16
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/README.md +11 -15
- package/dist/browser.js +522 -1016
- package/dist/browser.js.map +14 -17
- package/dist/bun.js +522 -1016
- package/dist/bun.js.map +14 -17
- package/dist/node.js +522 -1016
- package/dist/node.js.map +14 -17
- package/dist/task/AiChatTask.d.ts +150 -231
- package/dist/task/AiChatTask.d.ts.map +1 -1
- package/dist/task/ChatMessage.d.ts +110 -155
- package/dist/task/ChatMessage.d.ts.map +1 -1
- package/dist/task/ChunkRetrievalTask.d.ts +32 -49
- package/dist/task/ChunkRetrievalTask.d.ts.map +1 -1
- package/dist/task/ChunkVectorUpsertTask.d.ts +107 -24
- package/dist/task/ChunkVectorUpsertTask.d.ts.map +1 -1
- package/dist/task/HierarchyJoinTask.d.ts +44 -42
- package/dist/task/HierarchyJoinTask.d.ts.map +1 -1
- package/dist/task/QueryExpanderTask.d.ts +5 -31
- package/dist/task/QueryExpanderTask.d.ts.map +1 -1
- package/dist/task/RerankerTask.d.ts +7 -89
- package/dist/task/RerankerTask.d.ts.map +1 -1
- package/dist/task/StructuredGenerationTask.d.ts +1 -1
- package/dist/task/StructuredGenerationTask.d.ts.map +1 -1
- package/dist/task/TextChunkerTask.d.ts +139 -37
- package/dist/task/TextChunkerTask.d.ts.map +1 -1
- package/dist/task/ToolCallingTask.d.ts +50 -77
- package/dist/task/ToolCallingTask.d.ts.map +1 -1
- package/dist/task/base/AiVisionTask.d.ts.map +1 -1
- package/dist/task/index.d.ts +1 -7
- package/dist/task/index.d.ts.map +1 -1
- package/package.json +11 -11
- package/dist/task/ChunkToVectorTask.d.ts +0 -210
- package/dist/task/ChunkToVectorTask.d.ts.map +0 -1
- package/dist/task/ChunkVectorHybridSearchTask.d.ts +0 -167
- package/dist/task/ChunkVectorHybridSearchTask.d.ts.map +0 -1
- package/dist/task/ChunkVectorSearchTask.d.ts +0 -139
- package/dist/task/ChunkVectorSearchTask.d.ts.map +0 -1
|
@@ -18,10 +18,18 @@ export type ContentBlockToolUse = {
|
|
|
18
18
|
readonly name: string;
|
|
19
19
|
readonly input: Record<string, unknown>;
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Blocks that may appear in a `tool_result`'s `content` array. Provider payloads
|
|
23
|
+
* typically use text, image, and tool_use; nested `tool_result` is not modeled
|
|
24
|
+
* here so the JSON schema can be embedded in parent task schemas without a
|
|
25
|
+
* recursive `$ref` (which fails to resolve when `ContentBlockSchema` is nested
|
|
26
|
+
* under a larger document such as `ToolCallingInputSchema`).
|
|
27
|
+
*/
|
|
28
|
+
export type ContentBlockInToolResultBody = ContentBlockText | ContentBlockImage | ContentBlockToolUse;
|
|
21
29
|
export type ContentBlockToolResult = {
|
|
22
30
|
readonly type: "tool_result";
|
|
23
31
|
readonly tool_use_id: string;
|
|
24
|
-
readonly content: ReadonlyArray<
|
|
32
|
+
readonly content: ReadonlyArray<ContentBlockInToolResultBody>;
|
|
25
33
|
readonly is_error: boolean | undefined;
|
|
26
34
|
};
|
|
27
35
|
export type ContentBlock = ContentBlockText | ContentBlockImage | ContentBlockToolUse | ContentBlockToolResult;
|
|
@@ -93,7 +101,56 @@ export declare const ContentBlockSchema: {
|
|
|
93
101
|
readonly content: {
|
|
94
102
|
readonly type: "array";
|
|
95
103
|
readonly items: {
|
|
96
|
-
readonly
|
|
104
|
+
readonly oneOf: readonly [{
|
|
105
|
+
readonly type: "object";
|
|
106
|
+
readonly properties: {
|
|
107
|
+
readonly type: {
|
|
108
|
+
readonly type: "string";
|
|
109
|
+
readonly enum: readonly ["text"];
|
|
110
|
+
};
|
|
111
|
+
readonly text: {
|
|
112
|
+
readonly type: "string";
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
readonly required: readonly ["type", "text"];
|
|
116
|
+
readonly additionalProperties: false;
|
|
117
|
+
}, {
|
|
118
|
+
readonly type: "object";
|
|
119
|
+
readonly properties: {
|
|
120
|
+
readonly type: {
|
|
121
|
+
readonly type: "string";
|
|
122
|
+
readonly enum: readonly ["image"];
|
|
123
|
+
};
|
|
124
|
+
readonly mimeType: {
|
|
125
|
+
readonly type: "string";
|
|
126
|
+
};
|
|
127
|
+
readonly data: {
|
|
128
|
+
readonly type: "string";
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
readonly required: readonly ["type", "mimeType", "data"];
|
|
132
|
+
readonly additionalProperties: false;
|
|
133
|
+
}, {
|
|
134
|
+
readonly type: "object";
|
|
135
|
+
readonly properties: {
|
|
136
|
+
readonly type: {
|
|
137
|
+
readonly type: "string";
|
|
138
|
+
readonly enum: readonly ["tool_use"];
|
|
139
|
+
};
|
|
140
|
+
readonly id: {
|
|
141
|
+
readonly type: "string";
|
|
142
|
+
};
|
|
143
|
+
readonly name: {
|
|
144
|
+
readonly type: "string";
|
|
145
|
+
};
|
|
146
|
+
readonly input: {
|
|
147
|
+
readonly type: "object";
|
|
148
|
+
readonly additionalProperties: true;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
readonly required: readonly ["type", "id", "name", "input"];
|
|
152
|
+
readonly additionalProperties: false;
|
|
153
|
+
}];
|
|
97
154
|
};
|
|
98
155
|
};
|
|
99
156
|
readonly is_error: {
|
|
@@ -103,82 +160,6 @@ export declare const ContentBlockSchema: {
|
|
|
103
160
|
readonly required: readonly ["type", "tool_use_id", "content"];
|
|
104
161
|
readonly additionalProperties: false;
|
|
105
162
|
}];
|
|
106
|
-
readonly definitions: {
|
|
107
|
-
readonly ContentBlock: {
|
|
108
|
-
readonly oneOf: readonly [{
|
|
109
|
-
readonly type: "object";
|
|
110
|
-
readonly properties: {
|
|
111
|
-
readonly type: {
|
|
112
|
-
readonly type: "string";
|
|
113
|
-
readonly enum: readonly ["text"];
|
|
114
|
-
};
|
|
115
|
-
readonly text: {
|
|
116
|
-
readonly type: "string";
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
readonly required: readonly ["type", "text"];
|
|
120
|
-
readonly additionalProperties: false;
|
|
121
|
-
}, {
|
|
122
|
-
readonly type: "object";
|
|
123
|
-
readonly properties: {
|
|
124
|
-
readonly type: {
|
|
125
|
-
readonly type: "string";
|
|
126
|
-
readonly enum: readonly ["image"];
|
|
127
|
-
};
|
|
128
|
-
readonly mimeType: {
|
|
129
|
-
readonly type: "string";
|
|
130
|
-
};
|
|
131
|
-
readonly data: {
|
|
132
|
-
readonly type: "string";
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
readonly required: readonly ["type", "mimeType", "data"];
|
|
136
|
-
readonly additionalProperties: false;
|
|
137
|
-
}, {
|
|
138
|
-
readonly type: "object";
|
|
139
|
-
readonly properties: {
|
|
140
|
-
readonly type: {
|
|
141
|
-
readonly type: "string";
|
|
142
|
-
readonly enum: readonly ["tool_use"];
|
|
143
|
-
};
|
|
144
|
-
readonly id: {
|
|
145
|
-
readonly type: "string";
|
|
146
|
-
};
|
|
147
|
-
readonly name: {
|
|
148
|
-
readonly type: "string";
|
|
149
|
-
};
|
|
150
|
-
readonly input: {
|
|
151
|
-
readonly type: "object";
|
|
152
|
-
readonly additionalProperties: true;
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
readonly required: readonly ["type", "id", "name", "input"];
|
|
156
|
-
readonly additionalProperties: false;
|
|
157
|
-
}, {
|
|
158
|
-
readonly type: "object";
|
|
159
|
-
readonly properties: {
|
|
160
|
-
readonly type: {
|
|
161
|
-
readonly type: "string";
|
|
162
|
-
readonly enum: readonly ["tool_result"];
|
|
163
|
-
};
|
|
164
|
-
readonly tool_use_id: {
|
|
165
|
-
readonly type: "string";
|
|
166
|
-
};
|
|
167
|
-
readonly content: {
|
|
168
|
-
readonly type: "array";
|
|
169
|
-
readonly items: {
|
|
170
|
-
readonly $ref: "#/definitions/ContentBlock";
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
readonly is_error: {
|
|
174
|
-
readonly type: "boolean";
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
readonly required: readonly ["type", "tool_use_id", "content"];
|
|
178
|
-
readonly additionalProperties: false;
|
|
179
|
-
}];
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
163
|
readonly title: "ContentBlock";
|
|
183
164
|
readonly description: "A single content block within a chat message";
|
|
184
165
|
};
|
|
@@ -254,7 +235,56 @@ export declare const ChatMessageSchema: {
|
|
|
254
235
|
readonly content: {
|
|
255
236
|
readonly type: "array";
|
|
256
237
|
readonly items: {
|
|
257
|
-
readonly
|
|
238
|
+
readonly oneOf: readonly [{
|
|
239
|
+
readonly type: "object";
|
|
240
|
+
readonly properties: {
|
|
241
|
+
readonly type: {
|
|
242
|
+
readonly type: "string";
|
|
243
|
+
readonly enum: readonly ["text"];
|
|
244
|
+
};
|
|
245
|
+
readonly text: {
|
|
246
|
+
readonly type: "string";
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
readonly required: readonly ["type", "text"];
|
|
250
|
+
readonly additionalProperties: false;
|
|
251
|
+
}, {
|
|
252
|
+
readonly type: "object";
|
|
253
|
+
readonly properties: {
|
|
254
|
+
readonly type: {
|
|
255
|
+
readonly type: "string";
|
|
256
|
+
readonly enum: readonly ["image"];
|
|
257
|
+
};
|
|
258
|
+
readonly mimeType: {
|
|
259
|
+
readonly type: "string";
|
|
260
|
+
};
|
|
261
|
+
readonly data: {
|
|
262
|
+
readonly type: "string";
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
readonly required: readonly ["type", "mimeType", "data"];
|
|
266
|
+
readonly additionalProperties: false;
|
|
267
|
+
}, {
|
|
268
|
+
readonly type: "object";
|
|
269
|
+
readonly properties: {
|
|
270
|
+
readonly type: {
|
|
271
|
+
readonly type: "string";
|
|
272
|
+
readonly enum: readonly ["tool_use"];
|
|
273
|
+
};
|
|
274
|
+
readonly id: {
|
|
275
|
+
readonly type: "string";
|
|
276
|
+
};
|
|
277
|
+
readonly name: {
|
|
278
|
+
readonly type: "string";
|
|
279
|
+
};
|
|
280
|
+
readonly input: {
|
|
281
|
+
readonly type: "object";
|
|
282
|
+
readonly additionalProperties: true;
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
readonly required: readonly ["type", "id", "name", "input"];
|
|
286
|
+
readonly additionalProperties: false;
|
|
287
|
+
}];
|
|
258
288
|
};
|
|
259
289
|
};
|
|
260
290
|
readonly is_error: {
|
|
@@ -264,82 +294,6 @@ export declare const ChatMessageSchema: {
|
|
|
264
294
|
readonly required: readonly ["type", "tool_use_id", "content"];
|
|
265
295
|
readonly additionalProperties: false;
|
|
266
296
|
}];
|
|
267
|
-
readonly definitions: {
|
|
268
|
-
readonly ContentBlock: {
|
|
269
|
-
readonly oneOf: readonly [{
|
|
270
|
-
readonly type: "object";
|
|
271
|
-
readonly properties: {
|
|
272
|
-
readonly type: {
|
|
273
|
-
readonly type: "string";
|
|
274
|
-
readonly enum: readonly ["text"];
|
|
275
|
-
};
|
|
276
|
-
readonly text: {
|
|
277
|
-
readonly type: "string";
|
|
278
|
-
};
|
|
279
|
-
};
|
|
280
|
-
readonly required: readonly ["type", "text"];
|
|
281
|
-
readonly additionalProperties: false;
|
|
282
|
-
}, {
|
|
283
|
-
readonly type: "object";
|
|
284
|
-
readonly properties: {
|
|
285
|
-
readonly type: {
|
|
286
|
-
readonly type: "string";
|
|
287
|
-
readonly enum: readonly ["image"];
|
|
288
|
-
};
|
|
289
|
-
readonly mimeType: {
|
|
290
|
-
readonly type: "string";
|
|
291
|
-
};
|
|
292
|
-
readonly data: {
|
|
293
|
-
readonly type: "string";
|
|
294
|
-
};
|
|
295
|
-
};
|
|
296
|
-
readonly required: readonly ["type", "mimeType", "data"];
|
|
297
|
-
readonly additionalProperties: false;
|
|
298
|
-
}, {
|
|
299
|
-
readonly type: "object";
|
|
300
|
-
readonly properties: {
|
|
301
|
-
readonly type: {
|
|
302
|
-
readonly type: "string";
|
|
303
|
-
readonly enum: readonly ["tool_use"];
|
|
304
|
-
};
|
|
305
|
-
readonly id: {
|
|
306
|
-
readonly type: "string";
|
|
307
|
-
};
|
|
308
|
-
readonly name: {
|
|
309
|
-
readonly type: "string";
|
|
310
|
-
};
|
|
311
|
-
readonly input: {
|
|
312
|
-
readonly type: "object";
|
|
313
|
-
readonly additionalProperties: true;
|
|
314
|
-
};
|
|
315
|
-
};
|
|
316
|
-
readonly required: readonly ["type", "id", "name", "input"];
|
|
317
|
-
readonly additionalProperties: false;
|
|
318
|
-
}, {
|
|
319
|
-
readonly type: "object";
|
|
320
|
-
readonly properties: {
|
|
321
|
-
readonly type: {
|
|
322
|
-
readonly type: "string";
|
|
323
|
-
readonly enum: readonly ["tool_result"];
|
|
324
|
-
};
|
|
325
|
-
readonly tool_use_id: {
|
|
326
|
-
readonly type: "string";
|
|
327
|
-
};
|
|
328
|
-
readonly content: {
|
|
329
|
-
readonly type: "array";
|
|
330
|
-
readonly items: {
|
|
331
|
-
readonly $ref: "#/definitions/ContentBlock";
|
|
332
|
-
};
|
|
333
|
-
};
|
|
334
|
-
readonly is_error: {
|
|
335
|
-
readonly type: "boolean";
|
|
336
|
-
};
|
|
337
|
-
};
|
|
338
|
-
readonly required: readonly ["type", "tool_use_id", "content"];
|
|
339
|
-
readonly additionalProperties: false;
|
|
340
|
-
}];
|
|
341
|
-
};
|
|
342
|
-
};
|
|
343
297
|
readonly title: "ContentBlock";
|
|
344
298
|
readonly description: "A single content block within a chat message";
|
|
345
299
|
};
|
|
@@ -350,6 +304,7 @@ export declare const ChatMessageSchema: {
|
|
|
350
304
|
readonly title: "ChatMessage";
|
|
351
305
|
readonly description: "A single chat message with role and structured content blocks";
|
|
352
306
|
};
|
|
307
|
+
export declare function isContentBlockInToolResultBody(value: unknown): value is ContentBlockInToolResultBody;
|
|
353
308
|
export declare function isContentBlock(value: unknown): value is ContentBlock;
|
|
354
309
|
export declare function isChatMessage(value: unknown): value is ChatMessage;
|
|
355
310
|
export declare function textMessage(role: ChatRole, text: string): ChatMessage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../src/task/ChatMessage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,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,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../src/task/ChatMessage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAA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ACR,8CAA8C;;;;;;oBAcpD,aAAa;0BACP,+DAA+D;CAC3C,CAAC;AAMpC,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,4BAA4B,CAkBvC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAwBpE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAMlE;AAMD,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAErE"}
|
|
@@ -26,32 +26,16 @@ declare const inputSchema: {
|
|
|
26
26
|
}];
|
|
27
27
|
};
|
|
28
28
|
readonly query: {
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly type: "string";
|
|
32
|
-
}, {
|
|
33
|
-
readonly type: "array";
|
|
34
|
-
readonly format: "TypedArray";
|
|
35
|
-
readonly title: "Typed Array";
|
|
36
|
-
readonly description: "A typed array (Float32Array, Int8Array, etc.)";
|
|
37
|
-
}];
|
|
38
|
-
readonly title: "Query";
|
|
39
|
-
readonly description: "Query string or pre-computed query vector";
|
|
29
|
+
readonly oneOf: readonly [{
|
|
30
|
+
readonly type: "string";
|
|
40
31
|
}, {
|
|
41
32
|
readonly type: "array";
|
|
42
|
-
readonly
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, {
|
|
46
|
-
readonly type: "array";
|
|
47
|
-
readonly format: "TypedArray";
|
|
48
|
-
readonly title: "Typed Array";
|
|
49
|
-
readonly description: "A typed array (Float32Array, Int8Array, etc.)";
|
|
50
|
-
}];
|
|
51
|
-
readonly title: "Query";
|
|
52
|
-
readonly description: "Query string or pre-computed query vector";
|
|
53
|
-
};
|
|
33
|
+
readonly format: "TypedArray";
|
|
34
|
+
readonly title: "Typed Array";
|
|
35
|
+
readonly description: "A typed array (Float32Array, Int8Array, etc.)";
|
|
54
36
|
}];
|
|
37
|
+
readonly title: "Query";
|
|
38
|
+
readonly description: "Query string (requires `model`) or pre-computed query vector";
|
|
55
39
|
};
|
|
56
40
|
readonly model: {
|
|
57
41
|
readonly oneOf: readonly [{
|
|
@@ -127,6 +111,13 @@ declare const inputSchema: {
|
|
|
127
111
|
} & {
|
|
128
112
|
readonly format: import("./base/AiTaskSchemas").TypeModelSemantic;
|
|
129
113
|
};
|
|
114
|
+
readonly method: {
|
|
115
|
+
readonly type: "string";
|
|
116
|
+
readonly enum: readonly ["similarity", "hybrid"];
|
|
117
|
+
readonly title: "Retrieval Method";
|
|
118
|
+
readonly description: "Retrieval strategy: 'similarity' (vector only) or 'hybrid' (vector + full-text).";
|
|
119
|
+
readonly default: "similarity";
|
|
120
|
+
};
|
|
130
121
|
readonly topK: {
|
|
131
122
|
readonly type: "number";
|
|
132
123
|
readonly title: "Top K";
|
|
@@ -147,6 +138,14 @@ declare const inputSchema: {
|
|
|
147
138
|
readonly maximum: 1;
|
|
148
139
|
readonly default: 0;
|
|
149
140
|
};
|
|
141
|
+
readonly vectorWeight: {
|
|
142
|
+
readonly type: "number";
|
|
143
|
+
readonly title: "Vector Weight";
|
|
144
|
+
readonly description: "For hybrid method: weight for vector similarity (0-1), remainder goes to text relevance";
|
|
145
|
+
readonly minimum: 0;
|
|
146
|
+
readonly maximum: 1;
|
|
147
|
+
readonly default: 0.7;
|
|
148
|
+
};
|
|
150
149
|
readonly returnVectors: {
|
|
151
150
|
readonly type: "boolean";
|
|
152
151
|
readonly title: "Return Vectors";
|
|
@@ -222,32 +221,16 @@ declare const outputSchema: {
|
|
|
222
221
|
readonly description: "Number of results returned";
|
|
223
222
|
};
|
|
224
223
|
readonly query: {
|
|
225
|
-
readonly
|
|
226
|
-
readonly
|
|
227
|
-
readonly type: "string";
|
|
228
|
-
}, {
|
|
229
|
-
readonly type: "array";
|
|
230
|
-
readonly format: "TypedArray";
|
|
231
|
-
readonly title: "Typed Array";
|
|
232
|
-
readonly description: "A typed array (Float32Array, Int8Array, etc.)";
|
|
233
|
-
}];
|
|
234
|
-
readonly title: "Query";
|
|
235
|
-
readonly description: "The query used for retrieval (pass-through)";
|
|
224
|
+
readonly oneOf: readonly [{
|
|
225
|
+
readonly type: "string";
|
|
236
226
|
}, {
|
|
237
227
|
readonly type: "array";
|
|
238
|
-
readonly
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}, {
|
|
242
|
-
readonly type: "array";
|
|
243
|
-
readonly format: "TypedArray";
|
|
244
|
-
readonly title: "Typed Array";
|
|
245
|
-
readonly description: "A typed array (Float32Array, Int8Array, etc.)";
|
|
246
|
-
}];
|
|
247
|
-
readonly title: "Query";
|
|
248
|
-
readonly description: "The query used for retrieval (pass-through)";
|
|
249
|
-
};
|
|
228
|
+
readonly format: "TypedArray";
|
|
229
|
+
readonly title: "Typed Array";
|
|
230
|
+
readonly description: "A typed array (Float32Array, Int8Array, etc.)";
|
|
250
231
|
}];
|
|
232
|
+
readonly title: "Query";
|
|
233
|
+
readonly description: "The query used for retrieval (pass-through)";
|
|
251
234
|
};
|
|
252
235
|
};
|
|
253
236
|
readonly required: readonly ["chunks", "chunk_ids", "metadata", "scores", "count", "query"];
|
|
@@ -257,8 +240,8 @@ export type ChunkRetrievalTaskInput = FromSchema<typeof inputSchema, TypedArrayS
|
|
|
257
240
|
export type ChunkRetrievalTaskOutput = FromSchema<typeof outputSchema, TypedArraySchemaOptions>;
|
|
258
241
|
export type ChunkRetrievalTaskConfig = TaskConfig<ChunkRetrievalTaskInput>;
|
|
259
242
|
/**
|
|
260
|
-
* End-to-end retrieval task that combines embedding
|
|
261
|
-
*
|
|
243
|
+
* End-to-end retrieval task that combines query embedding (if needed), vector
|
|
244
|
+
* search, and optional hybrid full-text search in a single step.
|
|
262
245
|
*/
|
|
263
246
|
export declare class ChunkRetrievalTask extends Task<ChunkRetrievalTaskInput, ChunkRetrievalTaskOutput, ChunkRetrievalTaskConfig> {
|
|
264
247
|
static type: string;
|
|
@@ -277,7 +260,7 @@ export declare const chunkRetrieval: (input: ChunkRetrievalTaskInput, config?: C
|
|
|
277
260
|
metadata: {
|
|
278
261
|
[x: string]: unknown;
|
|
279
262
|
}[];
|
|
280
|
-
query: string |
|
|
263
|
+
query: string | TypedArray;
|
|
281
264
|
scores: number[];
|
|
282
265
|
vectors?: TypedArray[] | undefined;
|
|
283
266
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChunkRetrievalTask.d.ts","sourceRoot":"","sources":["../../src/task/ChunkRetrievalTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,IAAI,EAAY,MAAM,sBAAsB,CAAC;AACvF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,cAAc,EACd,UAAU,EAEV,UAAU,EAEV,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAK/B,QAAA,MAAM,WAAW;mBACT,QAAQ
|
|
1
|
+
{"version":3,"file":"ChunkRetrievalTask.d.ts","sourceRoot":"","sources":["../../src/task/ChunkRetrievalTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,IAAI,EAAY,MAAM,sBAAsB,CAAC;AACvF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,cAAc,EACd,UAAU,EAEV,UAAU,EAEV,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAK/B,QAAA,MAAM,WAAW;mBACT,QAAQ;;;;;;;;;;;;;;;;;;;;+BAQA,QAAQ;;;;;;;4BAMX,OAAO;kCACD,8DAA8D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAQ3E,IAAI,EAAE,QAAQ;qBACd,IAAI;qBACJ,KAAK,EAAE,kBAAkB;qBACzB,WAA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|
@@ -25,12 +25,105 @@ declare const inputSchema: {
|
|
|
25
25
|
readonly additionalProperties: true;
|
|
26
26
|
}];
|
|
27
27
|
};
|
|
28
|
-
readonly
|
|
29
|
-
readonly type: "
|
|
30
|
-
readonly
|
|
31
|
-
|
|
28
|
+
readonly chunks: {
|
|
29
|
+
readonly type: "array";
|
|
30
|
+
readonly items: {
|
|
31
|
+
readonly type: "object";
|
|
32
|
+
readonly properties: {
|
|
33
|
+
readonly chunkId: {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
readonly title: "Chunk ID";
|
|
36
|
+
readonly description: "Unique identifier for this chunk";
|
|
37
|
+
};
|
|
38
|
+
readonly doc_id: {
|
|
39
|
+
readonly type: "string";
|
|
40
|
+
readonly title: "Document ID";
|
|
41
|
+
readonly description: "ID of the parent document";
|
|
42
|
+
};
|
|
43
|
+
readonly text: {
|
|
44
|
+
readonly type: "string";
|
|
45
|
+
readonly title: "Text";
|
|
46
|
+
readonly description: "Text content of the chunk";
|
|
47
|
+
};
|
|
48
|
+
readonly nodePath: {
|
|
49
|
+
readonly type: "array";
|
|
50
|
+
readonly items: {
|
|
51
|
+
readonly type: "string";
|
|
52
|
+
};
|
|
53
|
+
readonly title: "Node Path";
|
|
54
|
+
readonly description: "Node IDs from root to leaf";
|
|
55
|
+
};
|
|
56
|
+
readonly depth: {
|
|
57
|
+
readonly type: "integer";
|
|
58
|
+
readonly title: "Depth";
|
|
59
|
+
readonly description: "Depth in the document tree";
|
|
60
|
+
};
|
|
61
|
+
readonly leafNodeId: {
|
|
62
|
+
readonly type: "string";
|
|
63
|
+
readonly title: "Leaf Node ID";
|
|
64
|
+
readonly description: "ID of the leaf node this chunk belongs to";
|
|
65
|
+
};
|
|
66
|
+
readonly summary: {
|
|
67
|
+
readonly type: "string";
|
|
68
|
+
readonly title: "Summary";
|
|
69
|
+
readonly description: "Summary of the chunk content";
|
|
70
|
+
};
|
|
71
|
+
readonly entities: {
|
|
72
|
+
readonly type: "array";
|
|
73
|
+
readonly items: {
|
|
74
|
+
readonly type: "object";
|
|
75
|
+
readonly properties: {
|
|
76
|
+
readonly text: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
readonly title: "Text";
|
|
79
|
+
readonly description: "Entity text";
|
|
80
|
+
};
|
|
81
|
+
readonly type: {
|
|
82
|
+
readonly type: "string";
|
|
83
|
+
readonly title: "Type";
|
|
84
|
+
readonly description: "Entity type (e.g., PERSON, ORG, LOC)";
|
|
85
|
+
};
|
|
86
|
+
readonly score: {
|
|
87
|
+
readonly type: "number";
|
|
88
|
+
readonly title: "Score";
|
|
89
|
+
readonly description: "Confidence score";
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
readonly required: readonly ["text", "type", "score"];
|
|
93
|
+
readonly additionalProperties: false;
|
|
94
|
+
};
|
|
95
|
+
readonly title: "Entities";
|
|
96
|
+
readonly description: "Named entities extracted from the chunk";
|
|
97
|
+
};
|
|
98
|
+
readonly parentSummaries: {
|
|
99
|
+
readonly type: "array";
|
|
100
|
+
readonly items: {
|
|
101
|
+
readonly type: "string";
|
|
102
|
+
};
|
|
103
|
+
readonly title: "Parent Summaries";
|
|
104
|
+
readonly description: "Summaries from ancestor nodes";
|
|
105
|
+
};
|
|
106
|
+
readonly sectionTitles: {
|
|
107
|
+
readonly type: "array";
|
|
108
|
+
readonly items: {
|
|
109
|
+
readonly type: "string";
|
|
110
|
+
};
|
|
111
|
+
readonly title: "Section Titles";
|
|
112
|
+
readonly description: "Titles of ancestor section nodes";
|
|
113
|
+
};
|
|
114
|
+
readonly doc_title: {
|
|
115
|
+
readonly type: "string";
|
|
116
|
+
readonly title: "Document Title";
|
|
117
|
+
readonly description: "Title of the parent document";
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
readonly required: readonly ["chunkId", "doc_id", "text", "nodePath", "depth"];
|
|
121
|
+
readonly additionalProperties: true;
|
|
122
|
+
};
|
|
123
|
+
readonly title: "Chunk Records";
|
|
124
|
+
readonly description: "Array of chunk records";
|
|
32
125
|
};
|
|
33
|
-
readonly
|
|
126
|
+
readonly vector: {
|
|
34
127
|
readonly anyOf: readonly [{
|
|
35
128
|
readonly type: "array";
|
|
36
129
|
readonly format: "TypedArray";
|
|
@@ -46,24 +139,13 @@ declare const inputSchema: {
|
|
|
46
139
|
};
|
|
47
140
|
}];
|
|
48
141
|
};
|
|
49
|
-
readonly
|
|
50
|
-
readonly
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
readonly description: "Metadata associated with the vector";
|
|
54
|
-
readonly additionalProperties: true;
|
|
55
|
-
}, {
|
|
56
|
-
readonly type: "array";
|
|
57
|
-
readonly items: {
|
|
58
|
-
readonly type: "object";
|
|
59
|
-
readonly title: "Metadata";
|
|
60
|
-
readonly description: "Metadata associated with the vector";
|
|
61
|
-
readonly additionalProperties: true;
|
|
62
|
-
};
|
|
63
|
-
}];
|
|
142
|
+
readonly doc_title: {
|
|
143
|
+
readonly type: "string";
|
|
144
|
+
readonly title: "Document Title";
|
|
145
|
+
readonly description: "Optional human-readable title stamped onto each chunk's metadata";
|
|
64
146
|
};
|
|
65
147
|
};
|
|
66
|
-
readonly required: readonly ["knowledgeBase", "
|
|
148
|
+
readonly required: readonly ["knowledgeBase", "chunks", "vector"];
|
|
67
149
|
readonly additionalProperties: false;
|
|
68
150
|
};
|
|
69
151
|
declare const outputSchema: {
|
|
@@ -77,7 +159,7 @@ declare const outputSchema: {
|
|
|
77
159
|
readonly doc_id: {
|
|
78
160
|
readonly type: "string";
|
|
79
161
|
readonly title: "Document ID";
|
|
80
|
-
readonly description: "The document ID";
|
|
162
|
+
readonly description: "The document ID (read from the first chunk)";
|
|
81
163
|
};
|
|
82
164
|
readonly chunk_ids: {
|
|
83
165
|
readonly type: "array";
|
|
@@ -95,8 +177,9 @@ export type VectorStoreUpsertTaskInput = FromSchema<typeof inputSchema, TypedArr
|
|
|
95
177
|
export type VectorStoreUpsertTaskOutput = FromSchema<typeof outputSchema>;
|
|
96
178
|
export type ChunkVectorUpsertTaskConfig = TaskConfig<VectorStoreUpsertTaskInput>;
|
|
97
179
|
/**
|
|
98
|
-
*
|
|
99
|
-
*
|
|
180
|
+
* Upsert chunks + their embeddings into a knowledge base in a single step.
|
|
181
|
+
* Consumes the output of `HierarchicalChunkerTask` (chunks) and
|
|
182
|
+
* `TextEmbeddingTask` (vector) directly — no intermediate transform task needed.
|
|
100
183
|
*/
|
|
101
184
|
export declare class ChunkVectorUpsertTask extends Task<VectorStoreUpsertTaskInput, VectorStoreUpsertTaskOutput, ChunkVectorUpsertTaskConfig> {
|
|
102
185
|
static type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChunkVectorUpsertTask.d.ts","sourceRoot":"","sources":["../../src/task/ChunkVectorUpsertTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"ChunkVectorUpsertTask.d.ts","sourceRoot":"","sources":["../../src/task/ChunkVectorUpsertTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,IAAI,EAAY,MAAM,sBAAsB,CAAC;AACvF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,cAAc,EACd,UAAU,EAGV,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAG/B,QAAA,MAAM,WAAW;mBACT,QAAQ;;iBAEZ,aAAa;;;;;;;;;;;;;;;;iBAIb,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACN,MAAM;;;;;;;;;;;;;;;;iBAMN,SAAS;qBACP,IAAI,EAAE,QAAQ;qBACd,KAAK,EAAE,gBAAgB;qBACvB,WAAW,EAAE,kEAAkE;;;;;CAKlD,CAAC;AAEpC,QAAA,MAAM,YAAY;mBACV,QAAQ;;iBAEZ,KAAK;q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