@workglow/ai 0.2.28 → 0.2.30

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 CHANGED
@@ -35,8 +35,12 @@ import {
35
35
  AiJobInput,
36
36
  } from "@workglow/ai";
37
37
  import { Workflow, getTaskQueueRegistry, TaskInput, TaskOutput } from "@workglow/task-graph";
38
- import { ConcurrencyLimiter, JobQueueClient, JobQueueServer } from "@workglow/job-queue";
39
- import { InMemoryQueueStorage } from "@workglow/storage";
38
+ import {
39
+ ConcurrencyLimiter,
40
+ InMemoryQueueStorage,
41
+ JobQueueClient,
42
+ JobQueueServer,
43
+ } from "@workglow/job-queue";
40
44
  import { HF_TRANSFORMERS_ONNX } from "@workglow/ai-provider/hf-transformers";
41
45
  import { registerHuggingFaceTransformersInline } from "@workglow/ai-provider/hf-transformers/runtime";
42
46
 
@@ -438,8 +442,12 @@ Each provider needs a job queue for task execution:
438
442
 
439
443
  ```typescript
440
444
  import { getTaskQueueRegistry, TaskInput, TaskOutput } from "@workglow/task-graph";
441
- import { ConcurrencyLimiter, JobQueueClient, JobQueueServer } from "@workglow/job-queue";
442
- import { InMemoryQueueStorage } from "@workglow/storage";
445
+ import {
446
+ ConcurrencyLimiter,
447
+ InMemoryQueueStorage,
448
+ JobQueueClient,
449
+ JobQueueServer,
450
+ } from "@workglow/job-queue";
443
451
  import { AiJob, AiJobInput } from "@workglow/ai";
444
452
  import { HF_TRANSFORMERS_ONNX } from "@workglow/ai-provider/hf-transformers";
445
453
 
@@ -527,20 +535,20 @@ The AI package provides a comprehensive set of tasks for building RAG pipelines.
527
535
 
528
536
  ### Vector and Storage Tasks
529
537
 
530
- | Task | Description |
531
- | ----------------------- | --------------------------------------------------------------------------------- |
532
- | `ChunkVectorUpsertTask` | Stores chunks + their embeddings in a KnowledgeBase (input: `chunks` + `vector`) |
533
- | `VectorQuantizeTask` | Quantizes vectors for storage efficiency |
538
+ | Task | Description |
539
+ | ----------------------- | -------------------------------------------------------------------------------- |
540
+ | `ChunkVectorUpsertTask` | Stores chunks + their embeddings in a KnowledgeBase (input: `chunks` + `vector`) |
541
+ | `VectorQuantizeTask` | Quantizes vectors for storage efficiency |
534
542
 
535
543
  ### Retrieval and Generation Tasks
536
544
 
537
- | Task | Description |
538
- | -------------------- | ------------------------------------------------------------------------ |
539
- | `ChunkRetrievalTask` | End-to-end retrieval: embeds the query, runs similarity or hybrid search |
540
- | `QueryExpanderTask` | Expands queries (multi-query / synonyms) for better retrieval coverage |
541
- | `RerankerTask` | Reranks search results (simple heuristic or reciprocal-rank-fusion) |
545
+ | Task | Description |
546
+ | -------------------- | --------------------------------------------------------------------------- |
547
+ | `ChunkRetrievalTask` | End-to-end retrieval: embeds the query, runs similarity or hybrid search |
548
+ | `QueryExpanderTask` | Expands queries (multi-query / synonyms) for better retrieval coverage |
549
+ | `RerankerTask` | Reranks search results (simple heuristic or reciprocal-rank-fusion) |
542
550
  | `HierarchyJoinTask` | Enriches retrieved metadata with parent summaries, section titles, entities |
543
- | `ContextBuilderTask` | Builds formatted context for LLM prompts |
551
+ | `ContextBuilderTask` | Builds formatted context for LLM prompts |
544
552
 
545
553
  ### Complete RAG Workflow Example
546
554
 
package/dist/browser.js CHANGED
@@ -1971,7 +1971,7 @@ var outputSchema2 = {
1971
1971
 
1972
1972
  class ChunkVectorUpsertTask extends Task3 {
1973
1973
  static type = "ChunkVectorUpsertTask";
1974
- static category = "Vector Store";
1974
+ static category = "Document";
1975
1975
  static title = "Add to Vector Store";
1976
1976
  static description = "Store chunks + their embeddings in a knowledge base (1:1 aligned)";
1977
1977
  static cacheable = false;
@@ -2748,8 +2748,11 @@ var documentEnricher = (input, config) => {
2748
2748
  Workflow9.prototype.documentEnricher = CreateWorkflow9(DocumentEnricherTask);
2749
2749
 
2750
2750
  // src/task/DocumentUpsertTask.ts
2751
- import { Document, TypeKnowledgeBase as TypeKnowledgeBase3 } from "@workglow/knowledge-base";
2752
- import { DocumentMetadataSchema } from "@workglow/knowledge-base";
2751
+ import {
2752
+ Document,
2753
+ DocumentMetadataSchema,
2754
+ TypeKnowledgeBase as TypeKnowledgeBase3
2755
+ } from "@workglow/knowledge-base";
2753
2756
  import { CreateWorkflow as CreateWorkflow10, Task as Task6, Workflow as Workflow10 } from "@workglow/task-graph";
2754
2757
  var inputSchema5 = {
2755
2758
  type: "object",
@@ -2797,7 +2800,7 @@ var outputSchema5 = {
2797
2800
 
2798
2801
  class DocumentUpsertTask extends Task6 {
2799
2802
  static type = "DocumentUpsertTask";
2800
- static category = "Vector Store";
2803
+ static category = "Document";
2801
2804
  static title = "Add Document";
2802
2805
  static description = "Persist a parsed document tree to a knowledge base";
2803
2806
  static cacheable = false;
@@ -4133,7 +4136,7 @@ var outputSchema8 = {
4133
4136
 
4134
4137
  class KbToDocumentsTask extends Task9 {
4135
4138
  static type = "KbToDocumentsTask";
4136
- static category = "Vector Store";
4139
+ static category = "Document";
4137
4140
  static title = "Knowledge Base to Documents";
4138
4141
  static description = "List documents from a knowledge base, optionally filtering to only those that need embedding";
4139
4142
  static cacheable = false;
@@ -7444,4 +7447,4 @@ export {
7444
7447
  AiChatInputSchema
7445
7448
  };
7446
7449
 
7447
- //# debugId=D9E399F9E044625464756E2164756E21
7450
+ //# debugId=1FAA7D33B0300A0064756E2164756E21