@okf/ootils 1.6.11 → 1.6.13
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.d.mts +18 -1
- package/dist/browser.d.ts +18 -1
- package/dist/browser.js +30 -4
- package/dist/browser.mjs +29 -4
- package/dist/node.d.mts +18 -1
- package/dist/node.d.ts +18 -1
- package/dist/node.js +30 -4
- package/dist/node.mjs +29 -4
- package/dist/universal.d.mts +18 -1
- package/dist/universal.d.ts +18 -1
- package/dist/universal.js +30 -4
- package/dist/universal.mjs +29 -4
- package/package.json +1 -1
package/dist/browser.d.mts
CHANGED
|
@@ -481,4 +481,21 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
|
|
484
|
+
interface PlatformContextContentItem {
|
|
485
|
+
markdownText?: string;
|
|
486
|
+
[key: string]: any;
|
|
487
|
+
}
|
|
488
|
+
interface PlatformContextObject {
|
|
489
|
+
content?: Record<string, PlatformContextContentItem>;
|
|
490
|
+
[key: string]: any;
|
|
491
|
+
}
|
|
492
|
+
interface PlatformConfigsAI {
|
|
493
|
+
platformContext?: string | PlatformContextObject;
|
|
494
|
+
[key: string]: any;
|
|
495
|
+
}
|
|
496
|
+
interface GetPlatformContextContentParams {
|
|
497
|
+
platformConfigs_ai: PlatformConfigsAI;
|
|
498
|
+
}
|
|
499
|
+
declare const getPlatformContextContent: ({ platformConfigs_ai, }: GetPlatformContextContentParams) => string;
|
|
500
|
+
|
|
501
|
+
export { BASE_BULLMQ_CONFIG, deleteVal, extractAllBlocksFromTpl, genTagId, getPlatformContextContent, getVal, _recursExtractBlocks as recursivelyExtractBlocks, setVal, toArray };
|
package/dist/browser.d.ts
CHANGED
|
@@ -481,4 +481,21 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
|
|
484
|
+
interface PlatformContextContentItem {
|
|
485
|
+
markdownText?: string;
|
|
486
|
+
[key: string]: any;
|
|
487
|
+
}
|
|
488
|
+
interface PlatformContextObject {
|
|
489
|
+
content?: Record<string, PlatformContextContentItem>;
|
|
490
|
+
[key: string]: any;
|
|
491
|
+
}
|
|
492
|
+
interface PlatformConfigsAI {
|
|
493
|
+
platformContext?: string | PlatformContextObject;
|
|
494
|
+
[key: string]: any;
|
|
495
|
+
}
|
|
496
|
+
interface GetPlatformContextContentParams {
|
|
497
|
+
platformConfigs_ai: PlatformConfigsAI;
|
|
498
|
+
}
|
|
499
|
+
declare const getPlatformContextContent: ({ platformConfigs_ai, }: GetPlatformContextContentParams) => string;
|
|
500
|
+
|
|
501
|
+
export { BASE_BULLMQ_CONFIG, deleteVal, extractAllBlocksFromTpl, genTagId, getPlatformContextContent, getVal, _recursExtractBlocks as recursivelyExtractBlocks, setVal, toArray };
|
package/dist/browser.js
CHANGED
|
@@ -24,6 +24,7 @@ __export(browser_exports, {
|
|
|
24
24
|
deleteVal: () => deleteVal,
|
|
25
25
|
extractAllBlocksFromTpl: () => extractAllBlocksFromTpl,
|
|
26
26
|
genTagId: () => genTagId,
|
|
27
|
+
getPlatformContextContent: () => getPlatformContextContent,
|
|
27
28
|
getVal: () => getVal,
|
|
28
29
|
recursivelyExtractBlocks: () => _recursExtractBlocks,
|
|
29
30
|
setVal: () => setVal,
|
|
@@ -362,7 +363,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
362
363
|
concurrency: 10,
|
|
363
364
|
// Process 10 jobs at once for chunk processing
|
|
364
365
|
limiter: {
|
|
365
|
-
max:
|
|
366
|
+
max: 200,
|
|
366
367
|
// Max 5 jobs per...
|
|
367
368
|
duration: 6e4
|
|
368
369
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -421,7 +422,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
421
422
|
workerConfig: {
|
|
422
423
|
concurrency: 1,
|
|
423
424
|
limiter: {
|
|
424
|
-
max:
|
|
425
|
+
max: 200,
|
|
425
426
|
// Max 50 jobs per...
|
|
426
427
|
duration: 6e4
|
|
427
428
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -450,7 +451,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
450
451
|
workerConfig: {
|
|
451
452
|
concurrency: 1,
|
|
452
453
|
limiter: {
|
|
453
|
-
max:
|
|
454
|
+
max: 20,
|
|
454
455
|
// Max 5 jobs per...
|
|
455
456
|
duration: 6e4
|
|
456
457
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -537,7 +538,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
537
538
|
workerConfig: {
|
|
538
539
|
concurrency: 5,
|
|
539
540
|
limiter: {
|
|
540
|
-
max:
|
|
541
|
+
max: 200,
|
|
541
542
|
// (lets always keep this same as content enhance & embed since it comes immediately after)
|
|
542
543
|
duration: 6e4
|
|
543
544
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -545,12 +546,37 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
545
546
|
}
|
|
546
547
|
}
|
|
547
548
|
};
|
|
549
|
+
|
|
550
|
+
// src/utils/getPlatformContextContent.ts
|
|
551
|
+
var labelsLookup = {
|
|
552
|
+
q1: "Platform & Organization Overview",
|
|
553
|
+
q2: "Data Sources & Materials",
|
|
554
|
+
q4: "Research Goals & Outcomes"
|
|
555
|
+
};
|
|
556
|
+
var getPlatformContextContent = ({
|
|
557
|
+
platformConfigs_ai
|
|
558
|
+
}) => {
|
|
559
|
+
if (typeof platformConfigs_ai.platformContext === "string") {
|
|
560
|
+
return platformConfigs_ai.platformContext;
|
|
561
|
+
}
|
|
562
|
+
if (platformConfigs_ai.platformContext && typeof platformConfigs_ai.platformContext === "object" && platformConfigs_ai.platformContext.content) {
|
|
563
|
+
const content = platformConfigs_ai.platformContext.content;
|
|
564
|
+
return Object.keys(content).map((key) => {
|
|
565
|
+
const v = content[key];
|
|
566
|
+
const label = labelsLookup[key];
|
|
567
|
+
return label ? `${label}
|
|
568
|
+
${v?.markdownText || ""}` : v?.markdownText || "";
|
|
569
|
+
}).join("\n\n");
|
|
570
|
+
}
|
|
571
|
+
return "";
|
|
572
|
+
};
|
|
548
573
|
// Annotate the CommonJS export names for ESM import in node:
|
|
549
574
|
0 && (module.exports = {
|
|
550
575
|
BASE_BULLMQ_CONFIG,
|
|
551
576
|
deleteVal,
|
|
552
577
|
extractAllBlocksFromTpl,
|
|
553
578
|
genTagId,
|
|
579
|
+
getPlatformContextContent,
|
|
554
580
|
getVal,
|
|
555
581
|
recursivelyExtractBlocks,
|
|
556
582
|
setVal,
|
package/dist/browser.mjs
CHANGED
|
@@ -329,7 +329,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
329
329
|
concurrency: 10,
|
|
330
330
|
// Process 10 jobs at once for chunk processing
|
|
331
331
|
limiter: {
|
|
332
|
-
max:
|
|
332
|
+
max: 200,
|
|
333
333
|
// Max 5 jobs per...
|
|
334
334
|
duration: 6e4
|
|
335
335
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -388,7 +388,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
388
388
|
workerConfig: {
|
|
389
389
|
concurrency: 1,
|
|
390
390
|
limiter: {
|
|
391
|
-
max:
|
|
391
|
+
max: 200,
|
|
392
392
|
// Max 50 jobs per...
|
|
393
393
|
duration: 6e4
|
|
394
394
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -417,7 +417,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
417
417
|
workerConfig: {
|
|
418
418
|
concurrency: 1,
|
|
419
419
|
limiter: {
|
|
420
|
-
max:
|
|
420
|
+
max: 20,
|
|
421
421
|
// Max 5 jobs per...
|
|
422
422
|
duration: 6e4
|
|
423
423
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -504,7 +504,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
504
504
|
workerConfig: {
|
|
505
505
|
concurrency: 5,
|
|
506
506
|
limiter: {
|
|
507
|
-
max:
|
|
507
|
+
max: 200,
|
|
508
508
|
// (lets always keep this same as content enhance & embed since it comes immediately after)
|
|
509
509
|
duration: 6e4
|
|
510
510
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -512,11 +512,36 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
};
|
|
515
|
+
|
|
516
|
+
// src/utils/getPlatformContextContent.ts
|
|
517
|
+
var labelsLookup = {
|
|
518
|
+
q1: "Platform & Organization Overview",
|
|
519
|
+
q2: "Data Sources & Materials",
|
|
520
|
+
q4: "Research Goals & Outcomes"
|
|
521
|
+
};
|
|
522
|
+
var getPlatformContextContent = ({
|
|
523
|
+
platformConfigs_ai
|
|
524
|
+
}) => {
|
|
525
|
+
if (typeof platformConfigs_ai.platformContext === "string") {
|
|
526
|
+
return platformConfigs_ai.platformContext;
|
|
527
|
+
}
|
|
528
|
+
if (platformConfigs_ai.platformContext && typeof platformConfigs_ai.platformContext === "object" && platformConfigs_ai.platformContext.content) {
|
|
529
|
+
const content = platformConfigs_ai.platformContext.content;
|
|
530
|
+
return Object.keys(content).map((key) => {
|
|
531
|
+
const v = content[key];
|
|
532
|
+
const label = labelsLookup[key];
|
|
533
|
+
return label ? `${label}
|
|
534
|
+
${v?.markdownText || ""}` : v?.markdownText || "";
|
|
535
|
+
}).join("\n\n");
|
|
536
|
+
}
|
|
537
|
+
return "";
|
|
538
|
+
};
|
|
515
539
|
export {
|
|
516
540
|
BASE_BULLMQ_CONFIG,
|
|
517
541
|
deleteVal,
|
|
518
542
|
extractAllBlocksFromTpl,
|
|
519
543
|
genTagId,
|
|
544
|
+
getPlatformContextContent,
|
|
520
545
|
getVal,
|
|
521
546
|
_recursExtractBlocks as recursivelyExtractBlocks,
|
|
522
547
|
setVal,
|
package/dist/node.d.mts
CHANGED
|
@@ -488,6 +488,23 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
|
|
491
|
+
interface PlatformContextContentItem {
|
|
492
|
+
markdownText?: string;
|
|
493
|
+
[key: string]: any;
|
|
494
|
+
}
|
|
495
|
+
interface PlatformContextObject {
|
|
496
|
+
content?: Record<string, PlatformContextContentItem>;
|
|
497
|
+
[key: string]: any;
|
|
498
|
+
}
|
|
499
|
+
interface PlatformConfigsAI {
|
|
500
|
+
platformContext?: string | PlatformContextObject;
|
|
501
|
+
[key: string]: any;
|
|
502
|
+
}
|
|
503
|
+
interface GetPlatformContextContentParams {
|
|
504
|
+
platformConfigs_ai: PlatformConfigsAI;
|
|
505
|
+
}
|
|
506
|
+
declare const getPlatformContextContent: ({ platformConfigs_ai, }: GetPlatformContextContentParams) => string;
|
|
507
|
+
|
|
491
508
|
declare class MongoConnector {
|
|
492
509
|
static getInstance(): any;
|
|
493
510
|
static getClusterConnections(): any;
|
|
@@ -1013,4 +1030,4 @@ declare function GET_GLOBAL_BULLMQ_CONFIG({ env, redisCredentials }: {
|
|
|
1013
1030
|
};
|
|
1014
1031
|
}): Object;
|
|
1015
1032
|
|
|
1016
|
-
export { AIChatSchema, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, ElasticSearchConnector, GET_GLOBAL_BULLMQ_CONFIG, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, TplSchema, WorkerManager, deleteVal, extractAllBlocksFromTpl, genTagId, getAIChatModelByTenant, getAnnotationsModelByTenant, getDbByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getTplModelByTenant, getVal, _recursExtractBlocks as recursivelyExtractBlocks, setVal, toArray };
|
|
1033
|
+
export { AIChatSchema, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, ElasticSearchConnector, GET_GLOBAL_BULLMQ_CONFIG, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, TplSchema, WorkerManager, deleteVal, extractAllBlocksFromTpl, genTagId, getAIChatModelByTenant, getAnnotationsModelByTenant, getDbByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getTplModelByTenant, getVal, _recursExtractBlocks as recursivelyExtractBlocks, setVal, toArray };
|
package/dist/node.d.ts
CHANGED
|
@@ -488,6 +488,23 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
|
|
491
|
+
interface PlatformContextContentItem {
|
|
492
|
+
markdownText?: string;
|
|
493
|
+
[key: string]: any;
|
|
494
|
+
}
|
|
495
|
+
interface PlatformContextObject {
|
|
496
|
+
content?: Record<string, PlatformContextContentItem>;
|
|
497
|
+
[key: string]: any;
|
|
498
|
+
}
|
|
499
|
+
interface PlatformConfigsAI {
|
|
500
|
+
platformContext?: string | PlatformContextObject;
|
|
501
|
+
[key: string]: any;
|
|
502
|
+
}
|
|
503
|
+
interface GetPlatformContextContentParams {
|
|
504
|
+
platformConfigs_ai: PlatformConfigsAI;
|
|
505
|
+
}
|
|
506
|
+
declare const getPlatformContextContent: ({ platformConfigs_ai, }: GetPlatformContextContentParams) => string;
|
|
507
|
+
|
|
491
508
|
declare class MongoConnector {
|
|
492
509
|
static getInstance(): any;
|
|
493
510
|
static getClusterConnections(): any;
|
|
@@ -1013,4 +1030,4 @@ declare function GET_GLOBAL_BULLMQ_CONFIG({ env, redisCredentials }: {
|
|
|
1013
1030
|
};
|
|
1014
1031
|
}): Object;
|
|
1015
1032
|
|
|
1016
|
-
export { AIChatSchema, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, ElasticSearchConnector, GET_GLOBAL_BULLMQ_CONFIG, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, TplSchema, WorkerManager, deleteVal, extractAllBlocksFromTpl, genTagId, getAIChatModelByTenant, getAnnotationsModelByTenant, getDbByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getTplModelByTenant, getVal, _recursExtractBlocks as recursivelyExtractBlocks, setVal, toArray };
|
|
1033
|
+
export { AIChatSchema, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, ElasticSearchConnector, GET_GLOBAL_BULLMQ_CONFIG, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, TplSchema, WorkerManager, deleteVal, extractAllBlocksFromTpl, genTagId, getAIChatModelByTenant, getAnnotationsModelByTenant, getDbByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getTplModelByTenant, getVal, _recursExtractBlocks as recursivelyExtractBlocks, setVal, toArray };
|
package/dist/node.js
CHANGED
|
@@ -99,7 +99,7 @@ var init_GLOBAL_BULLMQ_CONFIG = __esm({
|
|
|
99
99
|
concurrency: 10,
|
|
100
100
|
// Process 10 jobs at once for chunk processing
|
|
101
101
|
limiter: {
|
|
102
|
-
max:
|
|
102
|
+
max: 200,
|
|
103
103
|
// Max 5 jobs per...
|
|
104
104
|
duration: 6e4
|
|
105
105
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -158,7 +158,7 @@ var init_GLOBAL_BULLMQ_CONFIG = __esm({
|
|
|
158
158
|
workerConfig: {
|
|
159
159
|
concurrency: 1,
|
|
160
160
|
limiter: {
|
|
161
|
-
max:
|
|
161
|
+
max: 200,
|
|
162
162
|
// Max 50 jobs per...
|
|
163
163
|
duration: 6e4
|
|
164
164
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -187,7 +187,7 @@ var init_GLOBAL_BULLMQ_CONFIG = __esm({
|
|
|
187
187
|
workerConfig: {
|
|
188
188
|
concurrency: 1,
|
|
189
189
|
limiter: {
|
|
190
|
-
max:
|
|
190
|
+
max: 20,
|
|
191
191
|
// Max 5 jobs per...
|
|
192
192
|
duration: 6e4
|
|
193
193
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -274,7 +274,7 @@ var init_GLOBAL_BULLMQ_CONFIG = __esm({
|
|
|
274
274
|
workerConfig: {
|
|
275
275
|
concurrency: 5,
|
|
276
276
|
limiter: {
|
|
277
|
-
max:
|
|
277
|
+
max: 200,
|
|
278
278
|
// (lets always keep this same as content enhance & embed since it comes immediately after)
|
|
279
279
|
duration: 6e4
|
|
280
280
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -1389,6 +1389,7 @@ __export(node_exports, {
|
|
|
1389
1389
|
getDbByTenant: () => getDbByTenant,
|
|
1390
1390
|
getModelByTenant: () => import_getModelByTenant2.getModelByTenant,
|
|
1391
1391
|
getPlatformConfigsModelByTenant: () => import_getModelByTenant2.getPlatformConfigsModelByTenant,
|
|
1392
|
+
getPlatformContextContent: () => getPlatformContextContent,
|
|
1392
1393
|
getTplModelByTenant: () => import_getModelByTenant2.getTplModelByTenant,
|
|
1393
1394
|
getVal: () => getVal,
|
|
1394
1395
|
recursivelyExtractBlocks: () => _recursExtractBlocks,
|
|
@@ -1675,6 +1676,30 @@ var _extractBlocksFromSomeBuilders = ({
|
|
|
1675
1676
|
// src/universal.ts
|
|
1676
1677
|
init_GLOBAL_BULLMQ_CONFIG();
|
|
1677
1678
|
|
|
1679
|
+
// src/utils/getPlatformContextContent.ts
|
|
1680
|
+
var labelsLookup = {
|
|
1681
|
+
q1: "Platform & Organization Overview",
|
|
1682
|
+
q2: "Data Sources & Materials",
|
|
1683
|
+
q4: "Research Goals & Outcomes"
|
|
1684
|
+
};
|
|
1685
|
+
var getPlatformContextContent = ({
|
|
1686
|
+
platformConfigs_ai
|
|
1687
|
+
}) => {
|
|
1688
|
+
if (typeof platformConfigs_ai.platformContext === "string") {
|
|
1689
|
+
return platformConfigs_ai.platformContext;
|
|
1690
|
+
}
|
|
1691
|
+
if (platformConfigs_ai.platformContext && typeof platformConfigs_ai.platformContext === "object" && platformConfigs_ai.platformContext.content) {
|
|
1692
|
+
const content = platformConfigs_ai.platformContext.content;
|
|
1693
|
+
return Object.keys(content).map((key) => {
|
|
1694
|
+
const v = content[key];
|
|
1695
|
+
const label = labelsLookup[key];
|
|
1696
|
+
return label ? `${label}
|
|
1697
|
+
${v?.markdownText || ""}` : v?.markdownText || "";
|
|
1698
|
+
}).join("\n\n");
|
|
1699
|
+
}
|
|
1700
|
+
return "";
|
|
1701
|
+
};
|
|
1702
|
+
|
|
1678
1703
|
// src/node.ts
|
|
1679
1704
|
var import_MongoConnector2 = __toESM(require_MongoConnector());
|
|
1680
1705
|
var import_ElasticSearchConnector = __toESM(require_ElasticSearchConnector());
|
|
@@ -2022,6 +2047,7 @@ var import_GET_GLOBAL_BULLMQ_CONFIG = __toESM(require_GET_GLOBAL_BULLMQ_CONFIG()
|
|
|
2022
2047
|
getDbByTenant,
|
|
2023
2048
|
getModelByTenant,
|
|
2024
2049
|
getPlatformConfigsModelByTenant,
|
|
2050
|
+
getPlatformContextContent,
|
|
2025
2051
|
getTplModelByTenant,
|
|
2026
2052
|
getVal,
|
|
2027
2053
|
recursivelyExtractBlocks,
|
package/dist/node.mjs
CHANGED
|
@@ -104,7 +104,7 @@ var init_GLOBAL_BULLMQ_CONFIG = __esm({
|
|
|
104
104
|
concurrency: 10,
|
|
105
105
|
// Process 10 jobs at once for chunk processing
|
|
106
106
|
limiter: {
|
|
107
|
-
max:
|
|
107
|
+
max: 200,
|
|
108
108
|
// Max 5 jobs per...
|
|
109
109
|
duration: 6e4
|
|
110
110
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -163,7 +163,7 @@ var init_GLOBAL_BULLMQ_CONFIG = __esm({
|
|
|
163
163
|
workerConfig: {
|
|
164
164
|
concurrency: 1,
|
|
165
165
|
limiter: {
|
|
166
|
-
max:
|
|
166
|
+
max: 200,
|
|
167
167
|
// Max 50 jobs per...
|
|
168
168
|
duration: 6e4
|
|
169
169
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -192,7 +192,7 @@ var init_GLOBAL_BULLMQ_CONFIG = __esm({
|
|
|
192
192
|
workerConfig: {
|
|
193
193
|
concurrency: 1,
|
|
194
194
|
limiter: {
|
|
195
|
-
max:
|
|
195
|
+
max: 20,
|
|
196
196
|
// Max 5 jobs per...
|
|
197
197
|
duration: 6e4
|
|
198
198
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -279,7 +279,7 @@ var init_GLOBAL_BULLMQ_CONFIG = __esm({
|
|
|
279
279
|
workerConfig: {
|
|
280
280
|
concurrency: 5,
|
|
281
281
|
limiter: {
|
|
282
|
-
max:
|
|
282
|
+
max: 200,
|
|
283
283
|
// (lets always keep this same as content enhance & embed since it comes immediately after)
|
|
284
284
|
duration: 6e4
|
|
285
285
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -1648,6 +1648,30 @@ var _extractBlocksFromSomeBuilders = ({
|
|
|
1648
1648
|
// src/universal.ts
|
|
1649
1649
|
init_GLOBAL_BULLMQ_CONFIG();
|
|
1650
1650
|
|
|
1651
|
+
// src/utils/getPlatformContextContent.ts
|
|
1652
|
+
var labelsLookup = {
|
|
1653
|
+
q1: "Platform & Organization Overview",
|
|
1654
|
+
q2: "Data Sources & Materials",
|
|
1655
|
+
q4: "Research Goals & Outcomes"
|
|
1656
|
+
};
|
|
1657
|
+
var getPlatformContextContent = ({
|
|
1658
|
+
platformConfigs_ai
|
|
1659
|
+
}) => {
|
|
1660
|
+
if (typeof platformConfigs_ai.platformContext === "string") {
|
|
1661
|
+
return platformConfigs_ai.platformContext;
|
|
1662
|
+
}
|
|
1663
|
+
if (platformConfigs_ai.platformContext && typeof platformConfigs_ai.platformContext === "object" && platformConfigs_ai.platformContext.content) {
|
|
1664
|
+
const content = platformConfigs_ai.platformContext.content;
|
|
1665
|
+
return Object.keys(content).map((key) => {
|
|
1666
|
+
const v = content[key];
|
|
1667
|
+
const label = labelsLookup[key];
|
|
1668
|
+
return label ? `${label}
|
|
1669
|
+
${v?.markdownText || ""}` : v?.markdownText || "";
|
|
1670
|
+
}).join("\n\n");
|
|
1671
|
+
}
|
|
1672
|
+
return "";
|
|
1673
|
+
};
|
|
1674
|
+
|
|
1651
1675
|
// src/node.ts
|
|
1652
1676
|
var import_MongoConnector2 = __toESM(require_MongoConnector());
|
|
1653
1677
|
var import_ElasticSearchConnector = __toESM(require_ElasticSearchConnector());
|
|
@@ -2006,6 +2030,7 @@ export {
|
|
|
2006
2030
|
getDbByTenant,
|
|
2007
2031
|
export_getModelByTenant as getModelByTenant,
|
|
2008
2032
|
export_getPlatformConfigsModelByTenant as getPlatformConfigsModelByTenant,
|
|
2033
|
+
getPlatformContextContent,
|
|
2009
2034
|
export_getTplModelByTenant as getTplModelByTenant,
|
|
2010
2035
|
getVal,
|
|
2011
2036
|
_recursExtractBlocks as recursivelyExtractBlocks,
|
package/dist/universal.d.mts
CHANGED
|
@@ -481,4 +481,21 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
|
|
484
|
+
interface PlatformContextContentItem {
|
|
485
|
+
markdownText?: string;
|
|
486
|
+
[key: string]: any;
|
|
487
|
+
}
|
|
488
|
+
interface PlatformContextObject {
|
|
489
|
+
content?: Record<string, PlatformContextContentItem>;
|
|
490
|
+
[key: string]: any;
|
|
491
|
+
}
|
|
492
|
+
interface PlatformConfigsAI {
|
|
493
|
+
platformContext?: string | PlatformContextObject;
|
|
494
|
+
[key: string]: any;
|
|
495
|
+
}
|
|
496
|
+
interface GetPlatformContextContentParams {
|
|
497
|
+
platformConfigs_ai: PlatformConfigsAI;
|
|
498
|
+
}
|
|
499
|
+
declare const getPlatformContextContent: ({ platformConfigs_ai, }: GetPlatformContextContentParams) => string;
|
|
500
|
+
|
|
501
|
+
export { BASE_BULLMQ_CONFIG, deleteVal, extractAllBlocksFromTpl, genTagId, getPlatformContextContent, getVal, _recursExtractBlocks as recursivelyExtractBlocks, setVal, toArray };
|
package/dist/universal.d.ts
CHANGED
|
@@ -481,4 +481,21 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
|
|
484
|
+
interface PlatformContextContentItem {
|
|
485
|
+
markdownText?: string;
|
|
486
|
+
[key: string]: any;
|
|
487
|
+
}
|
|
488
|
+
interface PlatformContextObject {
|
|
489
|
+
content?: Record<string, PlatformContextContentItem>;
|
|
490
|
+
[key: string]: any;
|
|
491
|
+
}
|
|
492
|
+
interface PlatformConfigsAI {
|
|
493
|
+
platformContext?: string | PlatformContextObject;
|
|
494
|
+
[key: string]: any;
|
|
495
|
+
}
|
|
496
|
+
interface GetPlatformContextContentParams {
|
|
497
|
+
platformConfigs_ai: PlatformConfigsAI;
|
|
498
|
+
}
|
|
499
|
+
declare const getPlatformContextContent: ({ platformConfigs_ai, }: GetPlatformContextContentParams) => string;
|
|
500
|
+
|
|
501
|
+
export { BASE_BULLMQ_CONFIG, deleteVal, extractAllBlocksFromTpl, genTagId, getPlatformContextContent, getVal, _recursExtractBlocks as recursivelyExtractBlocks, setVal, toArray };
|
package/dist/universal.js
CHANGED
|
@@ -24,6 +24,7 @@ __export(universal_exports, {
|
|
|
24
24
|
deleteVal: () => deleteVal,
|
|
25
25
|
extractAllBlocksFromTpl: () => extractAllBlocksFromTpl,
|
|
26
26
|
genTagId: () => genTagId,
|
|
27
|
+
getPlatformContextContent: () => getPlatformContextContent,
|
|
27
28
|
getVal: () => getVal,
|
|
28
29
|
recursivelyExtractBlocks: () => _recursExtractBlocks,
|
|
29
30
|
setVal: () => setVal,
|
|
@@ -362,7 +363,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
362
363
|
concurrency: 10,
|
|
363
364
|
// Process 10 jobs at once for chunk processing
|
|
364
365
|
limiter: {
|
|
365
|
-
max:
|
|
366
|
+
max: 200,
|
|
366
367
|
// Max 5 jobs per...
|
|
367
368
|
duration: 6e4
|
|
368
369
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -421,7 +422,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
421
422
|
workerConfig: {
|
|
422
423
|
concurrency: 1,
|
|
423
424
|
limiter: {
|
|
424
|
-
max:
|
|
425
|
+
max: 200,
|
|
425
426
|
// Max 50 jobs per...
|
|
426
427
|
duration: 6e4
|
|
427
428
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -450,7 +451,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
450
451
|
workerConfig: {
|
|
451
452
|
concurrency: 1,
|
|
452
453
|
limiter: {
|
|
453
|
-
max:
|
|
454
|
+
max: 20,
|
|
454
455
|
// Max 5 jobs per...
|
|
455
456
|
duration: 6e4
|
|
456
457
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -537,7 +538,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
537
538
|
workerConfig: {
|
|
538
539
|
concurrency: 5,
|
|
539
540
|
limiter: {
|
|
540
|
-
max:
|
|
541
|
+
max: 200,
|
|
541
542
|
// (lets always keep this same as content enhance & embed since it comes immediately after)
|
|
542
543
|
duration: 6e4
|
|
543
544
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -545,12 +546,37 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
545
546
|
}
|
|
546
547
|
}
|
|
547
548
|
};
|
|
549
|
+
|
|
550
|
+
// src/utils/getPlatformContextContent.ts
|
|
551
|
+
var labelsLookup = {
|
|
552
|
+
q1: "Platform & Organization Overview",
|
|
553
|
+
q2: "Data Sources & Materials",
|
|
554
|
+
q4: "Research Goals & Outcomes"
|
|
555
|
+
};
|
|
556
|
+
var getPlatformContextContent = ({
|
|
557
|
+
platformConfigs_ai
|
|
558
|
+
}) => {
|
|
559
|
+
if (typeof platformConfigs_ai.platformContext === "string") {
|
|
560
|
+
return platformConfigs_ai.platformContext;
|
|
561
|
+
}
|
|
562
|
+
if (platformConfigs_ai.platformContext && typeof platformConfigs_ai.platformContext === "object" && platformConfigs_ai.platformContext.content) {
|
|
563
|
+
const content = platformConfigs_ai.platformContext.content;
|
|
564
|
+
return Object.keys(content).map((key) => {
|
|
565
|
+
const v = content[key];
|
|
566
|
+
const label = labelsLookup[key];
|
|
567
|
+
return label ? `${label}
|
|
568
|
+
${v?.markdownText || ""}` : v?.markdownText || "";
|
|
569
|
+
}).join("\n\n");
|
|
570
|
+
}
|
|
571
|
+
return "";
|
|
572
|
+
};
|
|
548
573
|
// Annotate the CommonJS export names for ESM import in node:
|
|
549
574
|
0 && (module.exports = {
|
|
550
575
|
BASE_BULLMQ_CONFIG,
|
|
551
576
|
deleteVal,
|
|
552
577
|
extractAllBlocksFromTpl,
|
|
553
578
|
genTagId,
|
|
579
|
+
getPlatformContextContent,
|
|
554
580
|
getVal,
|
|
555
581
|
recursivelyExtractBlocks,
|
|
556
582
|
setVal,
|
package/dist/universal.mjs
CHANGED
|
@@ -329,7 +329,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
329
329
|
concurrency: 10,
|
|
330
330
|
// Process 10 jobs at once for chunk processing
|
|
331
331
|
limiter: {
|
|
332
|
-
max:
|
|
332
|
+
max: 200,
|
|
333
333
|
// Max 5 jobs per...
|
|
334
334
|
duration: 6e4
|
|
335
335
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -388,7 +388,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
388
388
|
workerConfig: {
|
|
389
389
|
concurrency: 1,
|
|
390
390
|
limiter: {
|
|
391
|
-
max:
|
|
391
|
+
max: 200,
|
|
392
392
|
// Max 50 jobs per...
|
|
393
393
|
duration: 6e4
|
|
394
394
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -417,7 +417,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
417
417
|
workerConfig: {
|
|
418
418
|
concurrency: 1,
|
|
419
419
|
limiter: {
|
|
420
|
-
max:
|
|
420
|
+
max: 20,
|
|
421
421
|
// Max 5 jobs per...
|
|
422
422
|
duration: 6e4
|
|
423
423
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -504,7 +504,7 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
504
504
|
workerConfig: {
|
|
505
505
|
concurrency: 5,
|
|
506
506
|
limiter: {
|
|
507
|
-
max:
|
|
507
|
+
max: 200,
|
|
508
508
|
// (lets always keep this same as content enhance & embed since it comes immediately after)
|
|
509
509
|
duration: 6e4
|
|
510
510
|
// ...60 seconds (higher throughput for chunking)
|
|
@@ -512,11 +512,36 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
};
|
|
515
|
+
|
|
516
|
+
// src/utils/getPlatformContextContent.ts
|
|
517
|
+
var labelsLookup = {
|
|
518
|
+
q1: "Platform & Organization Overview",
|
|
519
|
+
q2: "Data Sources & Materials",
|
|
520
|
+
q4: "Research Goals & Outcomes"
|
|
521
|
+
};
|
|
522
|
+
var getPlatformContextContent = ({
|
|
523
|
+
platformConfigs_ai
|
|
524
|
+
}) => {
|
|
525
|
+
if (typeof platformConfigs_ai.platformContext === "string") {
|
|
526
|
+
return platformConfigs_ai.platformContext;
|
|
527
|
+
}
|
|
528
|
+
if (platformConfigs_ai.platformContext && typeof platformConfigs_ai.platformContext === "object" && platformConfigs_ai.platformContext.content) {
|
|
529
|
+
const content = platformConfigs_ai.platformContext.content;
|
|
530
|
+
return Object.keys(content).map((key) => {
|
|
531
|
+
const v = content[key];
|
|
532
|
+
const label = labelsLookup[key];
|
|
533
|
+
return label ? `${label}
|
|
534
|
+
${v?.markdownText || ""}` : v?.markdownText || "";
|
|
535
|
+
}).join("\n\n");
|
|
536
|
+
}
|
|
537
|
+
return "";
|
|
538
|
+
};
|
|
515
539
|
export {
|
|
516
540
|
BASE_BULLMQ_CONFIG,
|
|
517
541
|
deleteVal,
|
|
518
542
|
extractAllBlocksFromTpl,
|
|
519
543
|
genTagId,
|
|
544
|
+
getPlatformContextContent,
|
|
520
545
|
getVal,
|
|
521
546
|
_recursExtractBlocks as recursivelyExtractBlocks,
|
|
522
547
|
setVal,
|