@retrivora-ai/rag-engine 0.2.6 → 0.2.8
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/{MongoDBProvider-QHMGD2LZ.mjs → MongoDBProvider-KGO6N23T.mjs} +1 -1
- package/dist/{PostgreSQLProvider-PJ5ER5Z4.mjs → PostgreSQLProvider-ILWADFAP.mjs} +1 -1
- package/dist/{RagConfig-Ttch1N4d.d.mts → RagConfig--ibz0b3W.d.mts} +4 -0
- package/dist/{RagConfig-Ttch1N4d.d.ts → RagConfig--ibz0b3W.d.ts} +4 -0
- package/dist/{chunk-IUTAZ7QR.mjs → chunk-6GSARSCP.mjs} +9 -2
- package/dist/{chunk-7K4KXB6G.mjs → chunk-CYVPACA7.mjs} +41 -3
- package/dist/{chunk-5HXNKSCR.mjs → chunk-IFPISZ2S.mjs} +8 -1
- package/dist/handlers/index.d.mts +2 -2
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.js +56 -4
- package/dist/handlers/index.mjs +1 -1
- package/dist/{index-rK0KAr2S.d.ts → index-Dr1HN0se.d.ts} +1 -1
- package/dist/{index-sbCtrIRT.d.mts → index-w8qIEFvi.d.mts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/server.d.mts +7 -4
- package/dist/server.d.ts +7 -4
- package/dist/server.js +166 -23
- package/dist/server.mjs +113 -22
- package/package.json +1 -1
- package/src/config/RagConfig.ts +4 -0
- package/src/core/Pipeline.ts +60 -1
- package/src/providers/vectordb/MongoDBProvider.ts +12 -1
- package/src/providers/vectordb/MultiTablePostgresProvider.ts +167 -27
- package/src/providers/vectordb/PostgreSQLProvider.ts +11 -2
|
@@ -44,6 +44,10 @@ interface VectorDBConfig {
|
|
|
44
44
|
* - idPath?: string (e.g. '_id')
|
|
45
45
|
* - scorePath?: string (e.g. 'similarity')
|
|
46
46
|
* - contentPath?: string (e.g. 'text')
|
|
47
|
+
*
|
|
48
|
+
* For multi-table PostgreSQL search, the following options are also supported:
|
|
49
|
+
* - tables?: string[] | string
|
|
50
|
+
* - searchFields?: string[] // optional override for which columns receive exact-match boosts
|
|
47
51
|
*/
|
|
48
52
|
options: Record<string, unknown>;
|
|
49
53
|
}
|
|
@@ -44,6 +44,10 @@ interface VectorDBConfig {
|
|
|
44
44
|
* - idPath?: string (e.g. '_id')
|
|
45
45
|
* - scorePath?: string (e.g. 'similarity')
|
|
46
46
|
* - contentPath?: string (e.g. 'text')
|
|
47
|
+
*
|
|
48
|
+
* For multi-table PostgreSQL search, the following options are also supported:
|
|
49
|
+
* - tables?: string[] | string
|
|
50
|
+
* - searchFields?: string[] // optional override for which columns receive exact-match boosts
|
|
47
51
|
*/
|
|
48
52
|
options: Record<string, unknown>;
|
|
49
53
|
}
|
|
@@ -4,6 +4,12 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/providers/vectordb/PostgreSQLProvider.ts
|
|
6
6
|
import { Pool } from "pg";
|
|
7
|
+
function stripInternalFilterKeys(filter) {
|
|
8
|
+
if (!filter) return {};
|
|
9
|
+
return Object.fromEntries(
|
|
10
|
+
Object.entries(filter).filter(([key]) => !key.startsWith("__"))
|
|
11
|
+
);
|
|
12
|
+
}
|
|
7
13
|
var PostgreSQLProvider = class extends BaseVectorProvider {
|
|
8
14
|
constructor(config) {
|
|
9
15
|
var _a;
|
|
@@ -90,8 +96,9 @@ var PostgreSQLProvider = class extends BaseVectorProvider {
|
|
|
90
96
|
let whereClause = namespace ? `WHERE namespace = $3` : "";
|
|
91
97
|
const params = [vectorLiteral, topK];
|
|
92
98
|
if (namespace) params.push(namespace);
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
const publicFilter = stripInternalFilterKeys(filter);
|
|
100
|
+
if (Object.keys(publicFilter).length > 0) {
|
|
101
|
+
const filterConditions = Object.entries(publicFilter).map(([key, val]) => {
|
|
95
102
|
const paramIdx = params.length + 1;
|
|
96
103
|
params.push(JSON.stringify(val));
|
|
97
104
|
return `metadata->>'${key}' = $${paramIdx}`;
|
|
@@ -1198,11 +1198,11 @@ var ProviderRegistry = class {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
case "pgvector":
|
|
1200
1200
|
case "postgresql": {
|
|
1201
|
-
const { PostgreSQLProvider } = await import("./PostgreSQLProvider-
|
|
1201
|
+
const { PostgreSQLProvider } = await import("./PostgreSQLProvider-ILWADFAP.mjs");
|
|
1202
1202
|
return new PostgreSQLProvider(config);
|
|
1203
1203
|
}
|
|
1204
1204
|
case "mongodb": {
|
|
1205
|
-
const { MongoDBProvider } = await import("./MongoDBProvider-
|
|
1205
|
+
const { MongoDBProvider } = await import("./MongoDBProvider-KGO6N23T.mjs");
|
|
1206
1206
|
return new MongoDBProvider(config);
|
|
1207
1207
|
}
|
|
1208
1208
|
case "milvus": {
|
|
@@ -1553,6 +1553,40 @@ var EmbeddingStrategyResolver = class {
|
|
|
1553
1553
|
};
|
|
1554
1554
|
|
|
1555
1555
|
// src/core/Pipeline.ts
|
|
1556
|
+
function normalizeHintValue(value) {
|
|
1557
|
+
return value.replace(/\s+/g, " ").trim();
|
|
1558
|
+
}
|
|
1559
|
+
function extractQueryFieldHints(question) {
|
|
1560
|
+
if (!question.trim()) return [];
|
|
1561
|
+
const hints = /* @__PURE__ */ new Map();
|
|
1562
|
+
const addHint = (value, field) => {
|
|
1563
|
+
const normalizedValue = normalizeHintValue(value);
|
|
1564
|
+
if (!normalizedValue) return;
|
|
1565
|
+
const normalizedField = field ? field.toLowerCase().replace(/[^a-z0-9]+/g, " ").trim() : void 0;
|
|
1566
|
+
const key = `${normalizedField != null ? normalizedField : "*"}::${normalizedValue.toLowerCase()}`;
|
|
1567
|
+
if (!hints.has(key)) {
|
|
1568
|
+
hints.set(key, __spreadValues({
|
|
1569
|
+
value: normalizedValue
|
|
1570
|
+
}, normalizedField ? { field: normalizedField } : {}));
|
|
1571
|
+
}
|
|
1572
|
+
};
|
|
1573
|
+
for (const match of question.matchAll(/["']([^"']{2,100})["']/g)) {
|
|
1574
|
+
addHint(match[1]);
|
|
1575
|
+
}
|
|
1576
|
+
const fieldPattern = `([^\\n:=?.!,]{1,60}?)`;
|
|
1577
|
+
const valuePattern = `([^\\n?.!,]{1,120}?)`;
|
|
1578
|
+
const fieldValuePatterns = [
|
|
1579
|
+
new RegExp(`\\b${fieldPattern}\\s*(?:=|:)\\s*["']?${valuePattern}["']?(?=[?.!,]|$)`, "gi"),
|
|
1580
|
+
new RegExp(`\\b${fieldPattern}\\s+(?:is|are|was|were|equals?|equal to|named|called)\\s+["']?${valuePattern}["']?(?=[?.!,]|$)`, "gi"),
|
|
1581
|
+
new RegExp(`\\bwith\\s+${fieldPattern}\\s+["']?${valuePattern}["']?(?=[?.!,]|$)`, "gi")
|
|
1582
|
+
];
|
|
1583
|
+
for (const pattern of fieldValuePatterns) {
|
|
1584
|
+
for (const match of question.matchAll(pattern)) {
|
|
1585
|
+
addHint(match[2], match[1]);
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
return [...hints.values()];
|
|
1589
|
+
}
|
|
1556
1590
|
var Pipeline = class {
|
|
1557
1591
|
constructor(config) {
|
|
1558
1592
|
this.initialised = false;
|
|
@@ -1640,7 +1674,11 @@ var Pipeline = class {
|
|
|
1640
1674
|
const scoreThreshold = (_d = (_c = this.config.rag) == null ? void 0 : _c.scoreThreshold) != null ? _d : 0;
|
|
1641
1675
|
try {
|
|
1642
1676
|
const queryVector = await this.embeddingProvider.embed(question, { taskType: "query" });
|
|
1643
|
-
const
|
|
1677
|
+
const fieldHints = extractQueryFieldHints(question);
|
|
1678
|
+
const rawMatches = await this.vectorDB.query(queryVector, topK, ns, {
|
|
1679
|
+
__queryText: question,
|
|
1680
|
+
__fieldHints: fieldHints
|
|
1681
|
+
});
|
|
1644
1682
|
const sources = rawMatches.filter((m) => m.score >= scoreThreshold);
|
|
1645
1683
|
const context = sources.length ? sources.map((m, i) => `[Source ${i + 1}]
|
|
1646
1684
|
${m.content}`).join("\n\n---\n\n") : "No relevant context found.";
|
|
@@ -7,6 +7,12 @@ import {
|
|
|
7
7
|
|
|
8
8
|
// src/providers/vectordb/MongoDBProvider.ts
|
|
9
9
|
import { MongoClient } from "mongodb";
|
|
10
|
+
function stripInternalFilterKeys(filter) {
|
|
11
|
+
if (!filter) return {};
|
|
12
|
+
return Object.fromEntries(
|
|
13
|
+
Object.entries(filter).filter(([key]) => !key.startsWith("__"))
|
|
14
|
+
);
|
|
15
|
+
}
|
|
10
16
|
var MongoDBProvider = class extends BaseVectorProvider {
|
|
11
17
|
constructor(config) {
|
|
12
18
|
super(config);
|
|
@@ -52,6 +58,7 @@ var MongoDBProvider = class extends BaseVectorProvider {
|
|
|
52
58
|
await this.collection.bulkWrite(operations);
|
|
53
59
|
}
|
|
54
60
|
async query(vector, topK, namespace, filter) {
|
|
61
|
+
const publicFilter = stripInternalFilterKeys(filter);
|
|
55
62
|
const pipeline = [
|
|
56
63
|
{
|
|
57
64
|
$vectorSearch: __spreadValues({
|
|
@@ -60,7 +67,7 @@ var MongoDBProvider = class extends BaseVectorProvider {
|
|
|
60
67
|
queryVector: vector,
|
|
61
68
|
numCandidates: Math.max(topK * 10, 100),
|
|
62
69
|
limit: topK
|
|
63
|
-
},
|
|
70
|
+
}, Object.keys(publicFilter).length > 0 || namespace ? { filter: __spreadValues(__spreadValues({}, publicFilter), namespace ? { namespace } : {}) } : {})
|
|
64
71
|
},
|
|
65
72
|
{
|
|
66
73
|
$project: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '../RagConfig
|
|
2
|
-
export { c as createChatHandler, a as createHealthHandler, b as createIngestHandler, d as createUploadHandler } from '../index-
|
|
1
|
+
import '../RagConfig--ibz0b3W.mjs';
|
|
2
|
+
export { c as createChatHandler, a as createHealthHandler, b as createIngestHandler, d as createUploadHandler } from '../index-w8qIEFvi.mjs';
|
|
3
3
|
import 'next/server';
|
package/dist/handlers/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '../RagConfig
|
|
2
|
-
export { c as createChatHandler, a as createHealthHandler, b as createIngestHandler, d as createUploadHandler } from '../index-
|
|
1
|
+
import '../RagConfig--ibz0b3W.js';
|
|
2
|
+
export { c as createChatHandler, a as createHealthHandler, b as createIngestHandler, d as createUploadHandler } from '../index-Dr1HN0se.js';
|
|
3
3
|
import 'next/server';
|
package/dist/handlers/index.js
CHANGED
|
@@ -205,6 +205,12 @@ var PostgreSQLProvider_exports = {};
|
|
|
205
205
|
__export(PostgreSQLProvider_exports, {
|
|
206
206
|
PostgreSQLProvider: () => PostgreSQLProvider
|
|
207
207
|
});
|
|
208
|
+
function stripInternalFilterKeys(filter) {
|
|
209
|
+
if (!filter) return {};
|
|
210
|
+
return Object.fromEntries(
|
|
211
|
+
Object.entries(filter).filter(([key]) => !key.startsWith("__"))
|
|
212
|
+
);
|
|
213
|
+
}
|
|
208
214
|
var import_pg, PostgreSQLProvider;
|
|
209
215
|
var init_PostgreSQLProvider = __esm({
|
|
210
216
|
"src/providers/vectordb/PostgreSQLProvider.ts"() {
|
|
@@ -297,8 +303,9 @@ var init_PostgreSQLProvider = __esm({
|
|
|
297
303
|
let whereClause = namespace ? `WHERE namespace = $3` : "";
|
|
298
304
|
const params = [vectorLiteral, topK];
|
|
299
305
|
if (namespace) params.push(namespace);
|
|
300
|
-
|
|
301
|
-
|
|
306
|
+
const publicFilter = stripInternalFilterKeys(filter);
|
|
307
|
+
if (Object.keys(publicFilter).length > 0) {
|
|
308
|
+
const filterConditions = Object.entries(publicFilter).map(([key, val]) => {
|
|
302
309
|
const paramIdx = params.length + 1;
|
|
303
310
|
params.push(JSON.stringify(val));
|
|
304
311
|
return `metadata->>'${key}' = $${paramIdx}`;
|
|
@@ -348,6 +355,12 @@ var MongoDBProvider_exports = {};
|
|
|
348
355
|
__export(MongoDBProvider_exports, {
|
|
349
356
|
MongoDBProvider: () => MongoDBProvider
|
|
350
357
|
});
|
|
358
|
+
function stripInternalFilterKeys2(filter) {
|
|
359
|
+
if (!filter) return {};
|
|
360
|
+
return Object.fromEntries(
|
|
361
|
+
Object.entries(filter).filter(([key]) => !key.startsWith("__"))
|
|
362
|
+
);
|
|
363
|
+
}
|
|
351
364
|
var import_mongodb, MongoDBProvider;
|
|
352
365
|
var init_MongoDBProvider = __esm({
|
|
353
366
|
"src/providers/vectordb/MongoDBProvider.ts"() {
|
|
@@ -399,6 +412,7 @@ var init_MongoDBProvider = __esm({
|
|
|
399
412
|
await this.collection.bulkWrite(operations);
|
|
400
413
|
}
|
|
401
414
|
async query(vector, topK, namespace, filter) {
|
|
415
|
+
const publicFilter = stripInternalFilterKeys2(filter);
|
|
402
416
|
const pipeline = [
|
|
403
417
|
{
|
|
404
418
|
$vectorSearch: __spreadValues({
|
|
@@ -407,7 +421,7 @@ var init_MongoDBProvider = __esm({
|
|
|
407
421
|
queryVector: vector,
|
|
408
422
|
numCandidates: Math.max(topK * 10, 100),
|
|
409
423
|
limit: topK
|
|
410
|
-
},
|
|
424
|
+
}, Object.keys(publicFilter).length > 0 || namespace ? { filter: __spreadValues(__spreadValues({}, publicFilter), namespace ? { namespace } : {}) } : {})
|
|
411
425
|
},
|
|
412
426
|
{
|
|
413
427
|
$project: {
|
|
@@ -2663,6 +2677,40 @@ var EmbeddingStrategyResolver = class {
|
|
|
2663
2677
|
};
|
|
2664
2678
|
|
|
2665
2679
|
// src/core/Pipeline.ts
|
|
2680
|
+
function normalizeHintValue(value) {
|
|
2681
|
+
return value.replace(/\s+/g, " ").trim();
|
|
2682
|
+
}
|
|
2683
|
+
function extractQueryFieldHints(question) {
|
|
2684
|
+
if (!question.trim()) return [];
|
|
2685
|
+
const hints = /* @__PURE__ */ new Map();
|
|
2686
|
+
const addHint = (value, field) => {
|
|
2687
|
+
const normalizedValue = normalizeHintValue(value);
|
|
2688
|
+
if (!normalizedValue) return;
|
|
2689
|
+
const normalizedField = field ? field.toLowerCase().replace(/[^a-z0-9]+/g, " ").trim() : void 0;
|
|
2690
|
+
const key = `${normalizedField != null ? normalizedField : "*"}::${normalizedValue.toLowerCase()}`;
|
|
2691
|
+
if (!hints.has(key)) {
|
|
2692
|
+
hints.set(key, __spreadValues({
|
|
2693
|
+
value: normalizedValue
|
|
2694
|
+
}, normalizedField ? { field: normalizedField } : {}));
|
|
2695
|
+
}
|
|
2696
|
+
};
|
|
2697
|
+
for (const match of question.matchAll(/["']([^"']{2,100})["']/g)) {
|
|
2698
|
+
addHint(match[1]);
|
|
2699
|
+
}
|
|
2700
|
+
const fieldPattern = `([^\\n:=?.!,]{1,60}?)`;
|
|
2701
|
+
const valuePattern = `([^\\n?.!,]{1,120}?)`;
|
|
2702
|
+
const fieldValuePatterns = [
|
|
2703
|
+
new RegExp(`\\b${fieldPattern}\\s*(?:=|:)\\s*["']?${valuePattern}["']?(?=[?.!,]|$)`, "gi"),
|
|
2704
|
+
new RegExp(`\\b${fieldPattern}\\s+(?:is|are|was|were|equals?|equal to|named|called)\\s+["']?${valuePattern}["']?(?=[?.!,]|$)`, "gi"),
|
|
2705
|
+
new RegExp(`\\bwith\\s+${fieldPattern}\\s+["']?${valuePattern}["']?(?=[?.!,]|$)`, "gi")
|
|
2706
|
+
];
|
|
2707
|
+
for (const pattern of fieldValuePatterns) {
|
|
2708
|
+
for (const match of question.matchAll(pattern)) {
|
|
2709
|
+
addHint(match[2], match[1]);
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
return [...hints.values()];
|
|
2713
|
+
}
|
|
2666
2714
|
var Pipeline = class {
|
|
2667
2715
|
constructor(config) {
|
|
2668
2716
|
this.initialised = false;
|
|
@@ -2750,7 +2798,11 @@ var Pipeline = class {
|
|
|
2750
2798
|
const scoreThreshold = (_d = (_c = this.config.rag) == null ? void 0 : _c.scoreThreshold) != null ? _d : 0;
|
|
2751
2799
|
try {
|
|
2752
2800
|
const queryVector = await this.embeddingProvider.embed(question, { taskType: "query" });
|
|
2753
|
-
const
|
|
2801
|
+
const fieldHints = extractQueryFieldHints(question);
|
|
2802
|
+
const rawMatches = await this.vectorDB.query(queryVector, topK, ns, {
|
|
2803
|
+
__queryText: question,
|
|
2804
|
+
__fieldHints: fieldHints
|
|
2805
|
+
});
|
|
2754
2806
|
const sources = rawMatches.filter((m) => m.score >= scoreThreshold);
|
|
2755
2807
|
const context = sources.length ? sources.map((m, i) => `[Source ${i + 1}]
|
|
2756
2808
|
${m.content}`).join("\n\n---\n\n") : "No relevant context found.";
|
package/dist/handlers/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as VectorDBConfig, L as LLMConfig, E as EmbeddingConfig, a as RagConfig, C as ChatResponse } from './RagConfig
|
|
1
|
+
import { c as VectorDBConfig, L as LLMConfig, E as EmbeddingConfig, a as RagConfig, C as ChatResponse } from './RagConfig--ibz0b3W.js';
|
|
2
2
|
import { NextRequest, NextResponse } from 'next/server';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as VectorDBConfig, L as LLMConfig, E as EmbeddingConfig, a as RagConfig, C as ChatResponse } from './RagConfig
|
|
1
|
+
import { c as VectorDBConfig, L as LLMConfig, E as EmbeddingConfig, a as RagConfig, C as ChatResponse } from './RagConfig--ibz0b3W.mjs';
|
|
2
2
|
import { NextRequest, NextResponse } from 'next/server';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -2,8 +2,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React$1, { ReactNode } from 'react';
|
|
3
3
|
import { C as ChatMessage } from './DocumentChunker-BICIjSuG.mjs';
|
|
4
4
|
export { a as ChatOptions, b as Chunk, c as ChunkOptions, E as EmbedOptions, I as ILLMProvider } from './DocumentChunker-BICIjSuG.mjs';
|
|
5
|
-
import { V as VectorMatch, U as UIConfig } from './RagConfig
|
|
6
|
-
export { C as ChatResponse, E as EmbeddingConfig, I as IngestDocument, L as LLMConfig, R as RAGConfig, a as RagConfig, b as UpsertDocument, c as VectorDBConfig } from './RagConfig
|
|
5
|
+
import { V as VectorMatch, U as UIConfig } from './RagConfig--ibz0b3W.mjs';
|
|
6
|
+
export { C as ChatResponse, E as EmbeddingConfig, I as IngestDocument, L as LLMConfig, R as RAGConfig, a as RagConfig, b as UpsertDocument, c as VectorDBConfig } from './RagConfig--ibz0b3W.mjs';
|
|
7
7
|
|
|
8
8
|
interface ChatWidgetProps {
|
|
9
9
|
/** Position of the floating button. Defaults to bottom-right. */
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React$1, { ReactNode } from 'react';
|
|
3
3
|
import { C as ChatMessage } from './DocumentChunker-BICIjSuG.js';
|
|
4
4
|
export { a as ChatOptions, b as Chunk, c as ChunkOptions, E as EmbedOptions, I as ILLMProvider } from './DocumentChunker-BICIjSuG.js';
|
|
5
|
-
import { V as VectorMatch, U as UIConfig } from './RagConfig
|
|
6
|
-
export { C as ChatResponse, E as EmbeddingConfig, I as IngestDocument, L as LLMConfig, R as RAGConfig, a as RagConfig, b as UpsertDocument, c as VectorDBConfig } from './RagConfig
|
|
5
|
+
import { V as VectorMatch, U as UIConfig } from './RagConfig--ibz0b3W.js';
|
|
6
|
+
export { C as ChatResponse, E as EmbeddingConfig, I as IngestDocument, L as LLMConfig, R as RAGConfig, a as RagConfig, b as UpsertDocument, c as VectorDBConfig } from './RagConfig--ibz0b3W.js';
|
|
7
7
|
|
|
8
8
|
interface ChatWidgetProps {
|
|
9
9
|
/** Position of the floating button. Defaults to bottom-right. */
|
package/dist/server.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as RagConfig, C as ChatResponse, I as IngestDocument, c as VectorDBConfig, b as UpsertDocument, V as VectorMatch, L as LLMConfig, E as EmbeddingConfig, d as VectorDBProvider, e as LLMProvider, f as EmbeddingProvider } from './RagConfig
|
|
2
|
-
export { R as RAGConfig, U as UIConfig } from './RagConfig
|
|
1
|
+
import { a as RagConfig, C as ChatResponse, I as IngestDocument, c as VectorDBConfig, b as UpsertDocument, V as VectorMatch, L as LLMConfig, E as EmbeddingConfig, d as VectorDBProvider, e as LLMProvider, f as EmbeddingProvider } from './RagConfig--ibz0b3W.mjs';
|
|
2
|
+
export { R as RAGConfig, U as UIConfig } from './RagConfig--ibz0b3W.mjs';
|
|
3
3
|
import { C as ChatMessage, I as ILLMProvider, a as ChatOptions, E as EmbedOptions } from './DocumentChunker-BICIjSuG.mjs';
|
|
4
4
|
export { b as Chunk, c as ChunkOptions, D as DocumentChunker } from './DocumentChunker-BICIjSuG.mjs';
|
|
5
|
-
import { H as HealthCheckResult } from './index-
|
|
6
|
-
export { P as ProviderHealthCheck, c as createChatHandler, a as createHealthHandler, b as createIngestHandler, d as createUploadHandler } from './index-
|
|
5
|
+
import { H as HealthCheckResult } from './index-w8qIEFvi.mjs';
|
|
6
|
+
export { P as ProviderHealthCheck, c as createChatHandler, a as createHealthHandler, b as createIngestHandler, d as createUploadHandler } from './index-w8qIEFvi.mjs';
|
|
7
7
|
import 'next/server';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -706,6 +706,7 @@ declare class MultiTablePostgresProvider extends BaseVectorProvider {
|
|
|
706
706
|
private readonly dimensions;
|
|
707
707
|
private readonly connectionString;
|
|
708
708
|
private tables;
|
|
709
|
+
private tableSearchConfig;
|
|
709
710
|
constructor(config: VectorDBConfig);
|
|
710
711
|
initialize(): Promise<void>;
|
|
711
712
|
/**
|
|
@@ -725,6 +726,8 @@ declare class MultiTablePostgresProvider extends BaseVectorProvider {
|
|
|
725
726
|
deleteNamespace(_namespace: string): Promise<void>;
|
|
726
727
|
ping(): Promise<boolean>;
|
|
727
728
|
disconnect(): Promise<void>;
|
|
729
|
+
private loadTableSearchConfig;
|
|
730
|
+
private parseConfiguredSearchFields;
|
|
728
731
|
}
|
|
729
732
|
|
|
730
733
|
/**
|
package/dist/server.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as RagConfig, C as ChatResponse, I as IngestDocument, c as VectorDBConfig, b as UpsertDocument, V as VectorMatch, L as LLMConfig, E as EmbeddingConfig, d as VectorDBProvider, e as LLMProvider, f as EmbeddingProvider } from './RagConfig
|
|
2
|
-
export { R as RAGConfig, U as UIConfig } from './RagConfig
|
|
1
|
+
import { a as RagConfig, C as ChatResponse, I as IngestDocument, c as VectorDBConfig, b as UpsertDocument, V as VectorMatch, L as LLMConfig, E as EmbeddingConfig, d as VectorDBProvider, e as LLMProvider, f as EmbeddingProvider } from './RagConfig--ibz0b3W.js';
|
|
2
|
+
export { R as RAGConfig, U as UIConfig } from './RagConfig--ibz0b3W.js';
|
|
3
3
|
import { C as ChatMessage, I as ILLMProvider, a as ChatOptions, E as EmbedOptions } from './DocumentChunker-BICIjSuG.js';
|
|
4
4
|
export { b as Chunk, c as ChunkOptions, D as DocumentChunker } from './DocumentChunker-BICIjSuG.js';
|
|
5
|
-
import { H as HealthCheckResult } from './index-
|
|
6
|
-
export { P as ProviderHealthCheck, c as createChatHandler, a as createHealthHandler, b as createIngestHandler, d as createUploadHandler } from './index-
|
|
5
|
+
import { H as HealthCheckResult } from './index-Dr1HN0se.js';
|
|
6
|
+
export { P as ProviderHealthCheck, c as createChatHandler, a as createHealthHandler, b as createIngestHandler, d as createUploadHandler } from './index-Dr1HN0se.js';
|
|
7
7
|
import 'next/server';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -706,6 +706,7 @@ declare class MultiTablePostgresProvider extends BaseVectorProvider {
|
|
|
706
706
|
private readonly dimensions;
|
|
707
707
|
private readonly connectionString;
|
|
708
708
|
private tables;
|
|
709
|
+
private tableSearchConfig;
|
|
709
710
|
constructor(config: VectorDBConfig);
|
|
710
711
|
initialize(): Promise<void>;
|
|
711
712
|
/**
|
|
@@ -725,6 +726,8 @@ declare class MultiTablePostgresProvider extends BaseVectorProvider {
|
|
|
725
726
|
deleteNamespace(_namespace: string): Promise<void>;
|
|
726
727
|
ping(): Promise<boolean>;
|
|
727
728
|
disconnect(): Promise<void>;
|
|
729
|
+
private loadTableSearchConfig;
|
|
730
|
+
private parseConfiguredSearchFields;
|
|
728
731
|
}
|
|
729
732
|
|
|
730
733
|
/**
|