@workglow/ai 0.0.114 → 0.0.116

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
@@ -445,7 +445,7 @@ The AI package provides a comprehensive set of tasks for building RAG pipelines.
445
445
 
446
446
  ```typescript
447
447
  import { Workflow } from "@workglow/task-graph";
448
- import { createKnowledgeBase } from "@workglow/dataset";
448
+ import { createKnowledgeBase } from "@workglow/knowledge-base";
449
449
 
450
450
  // Create a KnowledgeBase (auto-registers globally as "my-kb")
451
451
  const kb = await createKnowledgeBase({
package/dist/browser.js CHANGED
@@ -597,8 +597,6 @@ function schemaFormat(schema) {
597
597
  class AiTask extends JobQueueTask {
598
598
  static type = "AiTask";
599
599
  constructor(input = {}, config = {}) {
600
- const modelLabel = typeof input.model === "string" ? input.model : typeof input.model === "object" && input.model ? input.model.model_id || input.model.title || input.model.provider : undefined;
601
- config.title ||= `${new.target.type || new.target.name}${modelLabel ? " with model " + modelLabel : ""}`;
602
600
  super(input, config);
603
601
  this.jobClass = AiJob;
604
602
  }
@@ -779,7 +777,7 @@ var backgroundRemoval = (input, config) => {
779
777
  Workflow.prototype.backgroundRemoval = CreateWorkflow(BackgroundRemovalTask);
780
778
 
781
779
  // src/task/ChunkRetrievalTask.ts
782
- import { TypeKnowledgeBase } from "@workglow/dataset";
780
+ import { TypeKnowledgeBase } from "@workglow/knowledge-base";
783
781
  import {
784
782
  CreateWorkflow as CreateWorkflow3,
785
783
  Task,
@@ -1031,7 +1029,7 @@ var chunkRetrieval = (input, config) => {
1031
1029
  Workflow3.prototype.chunkRetrieval = CreateWorkflow3(ChunkRetrievalTask);
1032
1030
 
1033
1031
  // src/task/ChunkToVectorTask.ts
1034
- import { ChunkRecordSchema } from "@workglow/dataset";
1032
+ import { ChunkRecordSchema } from "@workglow/knowledge-base";
1035
1033
  import {
1036
1034
  CreateWorkflow as CreateWorkflow4,
1037
1035
  Task as Task2,
@@ -1165,7 +1163,7 @@ var chunkToVector = (input, config) => {
1165
1163
  Workflow4.prototype.chunkToVector = CreateWorkflow4(ChunkToVectorTask);
1166
1164
 
1167
1165
  // src/task/ChunkVectorHybridSearchTask.ts
1168
- import { TypeKnowledgeBase as TypeKnowledgeBase2 } from "@workglow/dataset";
1166
+ import { TypeKnowledgeBase as TypeKnowledgeBase2 } from "@workglow/knowledge-base";
1169
1167
  import {
1170
1168
  CreateWorkflow as CreateWorkflow5,
1171
1169
  Task as Task3,
@@ -1339,7 +1337,7 @@ var hybridSearch = async (input, config) => {
1339
1337
  Workflow5.prototype.hybridSearch = CreateWorkflow5(ChunkVectorHybridSearchTask);
1340
1338
 
1341
1339
  // src/task/ChunkVectorSearchTask.ts
1342
- import { TypeKnowledgeBase as TypeKnowledgeBase3 } from "@workglow/dataset";
1340
+ import { TypeKnowledgeBase as TypeKnowledgeBase3 } from "@workglow/knowledge-base";
1343
1341
  import {
1344
1342
  CreateWorkflow as CreateWorkflow6,
1345
1343
  Task as Task4,
@@ -1439,7 +1437,7 @@ class ChunkVectorSearchTask extends Task4 {
1439
1437
  static outputSchema() {
1440
1438
  return outputSchema4;
1441
1439
  }
1442
- async execute(input, context) {
1440
+ async execute(input, _context) {
1443
1441
  const { knowledgeBase, query, topK = 10, filter, scoreThreshold = 0 } = input;
1444
1442
  const kb = knowledgeBase;
1445
1443
  const results = await kb.similaritySearch(query, {
@@ -1462,7 +1460,7 @@ var vectorStoreSearch = (input, config) => {
1462
1460
  Workflow6.prototype.vectorStoreSearch = CreateWorkflow6(ChunkVectorSearchTask);
1463
1461
 
1464
1462
  // src/task/ChunkVectorUpsertTask.ts
1465
- import { TypeKnowledgeBase as TypeKnowledgeBase4 } from "@workglow/dataset";
1463
+ import { TypeKnowledgeBase as TypeKnowledgeBase4 } from "@workglow/knowledge-base";
1466
1464
  import {
1467
1465
  CreateWorkflow as CreateWorkflow7,
1468
1466
  Task as Task5,
@@ -1584,7 +1582,7 @@ var chunkVectorUpsert = (input, config) => {
1584
1582
  Workflow7.prototype.chunkVectorUpsert = CreateWorkflow7(ChunkVectorUpsertTask);
1585
1583
 
1586
1584
  // src/task/ContextBuilderTask.ts
1587
- import { estimateTokens } from "@workglow/dataset";
1585
+ import { estimateTokens } from "@workglow/knowledge-base";
1588
1586
  import {
1589
1587
  CreateWorkflow as CreateWorkflow9,
1590
1588
  Task as Task6,
@@ -1942,7 +1940,7 @@ Workflow9.prototype.contextBuilder = CreateWorkflow9(ContextBuilderTask);
1942
1940
  import {
1943
1941
  getChildren,
1944
1942
  hasChildren
1945
- } from "@workglow/dataset";
1943
+ } from "@workglow/knowledge-base";
1946
1944
  import {
1947
1945
  CreateWorkflow as CreateWorkflow12,
1948
1946
  Task as Task7,
@@ -3009,7 +3007,7 @@ import {
3009
3007
  estimateTokens as estimateTokens2,
3010
3008
  getChildren as getChildren2,
3011
3009
  hasChildren as hasChildren2
3012
- } from "@workglow/dataset";
3010
+ } from "@workglow/knowledge-base";
3013
3011
  import {
3014
3012
  CreateWorkflow as CreateWorkflow18,
3015
3013
  Task as Task8,
@@ -3245,7 +3243,7 @@ Workflow18.prototype.hierarchicalChunker = CreateWorkflow18(HierarchicalChunkerT
3245
3243
  import {
3246
3244
  ChunkRecordArraySchema,
3247
3245
  TypeKnowledgeBase as TypeKnowledgeBase5
3248
- } from "@workglow/dataset";
3246
+ } from "@workglow/knowledge-base";
3249
3247
  import {
3250
3248
  CreateWorkflow as CreateWorkflow19,
3251
3249
  Task as Task9,
@@ -4506,7 +4504,7 @@ var reranker = (input, config) => {
4506
4504
  Workflow29.prototype.reranker = CreateWorkflow29(RerankerTask);
4507
4505
 
4508
4506
  // src/task/StructuralParserTask.ts
4509
- import { StructuralParser } from "@workglow/dataset";
4507
+ import { StructuralParser } from "@workglow/knowledge-base";
4510
4508
  import {
4511
4509
  CreateWorkflow as CreateWorkflow30,
4512
4510
  Task as Task12,
@@ -6348,4 +6346,4 @@ export {
6348
6346
  AiJob
6349
6347
  };
6350
6348
 
6351
- //# debugId=0E9DD67701C6DF9264756E2164756E21
6349
+ //# debugId=FA713AFFB061070264756E2164756E21