@retrivora-ai/rag-engine 2.3.1 → 2.3.3
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/{BatchProcessor-BfzuU4cK.d.ts → BatchProcessor-CQDtlggz.d.ts} +2 -139
- package/dist/{BatchProcessor-7yV-UCHW.d.mts → BatchProcessor-tVzb9CdE.d.mts} +2 -139
- package/dist/{ILLMProvider-teTNQ1lh.d.mts → ILLMProvider-CcJ5N6XD.d.mts} +1 -1
- package/dist/{ILLMProvider-teTNQ1lh.d.ts → ILLMProvider-CcJ5N6XD.d.ts} +1 -1
- package/dist/handlers/index.d.mts +2 -2
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.js +2 -5
- package/dist/handlers/index.mjs +2 -5
- package/dist/{index-DR_O_B-W.d.ts → index-BwmyPJHp.d.ts} +1 -1
- package/dist/{index-fnpaCuma.d.mts → index-CL-zF6bD.d.mts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -1964
- package/dist/index.mjs +3 -1959
- package/dist/server.d.mts +186 -49
- package/dist/server.d.ts +186 -49
- package/dist/server.js +2 -5
- package/dist/server.mjs +2 -5
- package/package.json +3 -2
- package/src/components/ChatWidget.tsx +2 -2
- package/src/components/ChatWindow.tsx +0 -1
- package/src/components/CodeViewer.tsx +1 -1
- package/src/core/LangChainAgent.ts +0 -2
- package/src/index.ts +4 -9
- package/src/providers/vectordb/MilvusProvider.ts +0 -1
- package/src/providers/vectordb/MongoDBProvider.ts +0 -1
- package/src/providers/vectordb/MultiTablePostgresProvider.ts +2 -2
- package/src/providers/vectordb/RedisProvider.ts +0 -1
- package/src/providers/vectordb/WeaviateProvider.ts +0 -1
- package/src/rag/LlamaIndexIngestor.ts +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Check, Copy } from 'lucide-react';
|
|
5
|
-
import { Snippet } from '
|
|
5
|
+
import type { Snippet } from '../app/types';
|
|
6
6
|
|
|
7
7
|
export function CodeViewer({ snippet }: { snippet: Snippet }) {
|
|
8
8
|
const [copied, setCopied] = React.useState(false);
|
|
@@ -14,7 +14,6 @@ import { RagConfig } from "../config/RagConfig";
|
|
|
14
14
|
* - Invocation uses `{ messages: [...] }` instead of `{ input, chat_history }`.
|
|
15
15
|
*/
|
|
16
16
|
export class LangChainAgent {
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
17
|
private agent?: any;
|
|
19
18
|
|
|
20
19
|
constructor(private pipeline: Pipeline, private config: RagConfig) {}
|
|
@@ -75,7 +74,6 @@ export class LangChainAgent {
|
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
this.agent = createAgent({
|
|
78
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
79
77
|
model: chatModel as any,
|
|
80
78
|
tools: [searchTool],
|
|
81
79
|
systemPrompt: finalSystemPrompt,
|
package/src/index.ts
CHANGED
|
@@ -26,14 +26,9 @@ export { useRagChat } from './hooks/useRagChat';
|
|
|
26
26
|
// ── Utils ─────────────────────────────────────────────────────
|
|
27
27
|
export { addSynonyms } from './utils/synonyms';
|
|
28
28
|
|
|
29
|
-
// ── Visualization
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
decideVisualization,
|
|
33
|
-
RendererRegistry,
|
|
34
|
-
IntentClassifier,
|
|
35
|
-
RuleEngine,
|
|
36
|
-
} from './rendering';
|
|
29
|
+
// ── Visualization Types ────────────────────────────────────────
|
|
30
|
+
// Runtime rendering utilities are exported from the server entrypoint to
|
|
31
|
+
// avoid pulling the rendering engine into client bundles unnecessarily.
|
|
37
32
|
export type {
|
|
38
33
|
RenderDecision,
|
|
39
34
|
RenderType,
|
|
@@ -42,7 +37,7 @@ export type {
|
|
|
42
37
|
DecisionContext,
|
|
43
38
|
IRenderRule,
|
|
44
39
|
IRendererStrategy,
|
|
45
|
-
} from './rendering';
|
|
40
|
+
} from './rendering/types';
|
|
46
41
|
|
|
47
42
|
// ── Types (Interfaces/Types only, no Node.js deps) ─────────────
|
|
48
43
|
export type {
|
|
@@ -106,7 +106,6 @@ export class MilvusProvider extends BaseVectorProvider {
|
|
|
106
106
|
}));
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
110
109
|
async delete(id: string | number, _namespace?: string): Promise<void> {
|
|
111
110
|
await this.http.post('/v1/vector/delete', {
|
|
112
111
|
collectionName: this.indexName,
|
|
@@ -11,7 +11,6 @@ import { ValidationError } from '../../core/ConfigValidator';
|
|
|
11
11
|
export class MongoDBProvider extends BaseVectorProvider {
|
|
12
12
|
private client: MongoClient;
|
|
13
13
|
private db?: Db;
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
14
|
private collection?: Collection<any>;
|
|
16
15
|
private dbName: string;
|
|
17
16
|
private collectionName: string;
|
|
@@ -436,11 +436,11 @@ export class MultiTablePostgresProvider extends BaseVectorProvider {
|
|
|
436
436
|
return finalSorted.slice(0, Math.max(topK, 15));
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
-
|
|
439
|
+
async delete(_id: string | number, _namespace?: string): Promise<void> {
|
|
440
440
|
console.warn('[MultiTablePostgresProvider] delete() is a no-op for multi-table mode.');
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
-
|
|
443
|
+
async deleteNamespace(_namespace: string): Promise<void> {
|
|
444
444
|
console.warn('[MultiTablePostgresProvider] deleteNamespace() is a no-op for multi-table mode.');
|
|
445
445
|
}
|
|
446
446
|
|
|
@@ -61,7 +61,6 @@ export class RedisProvider extends BaseVectorProvider {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
65
64
|
async query(vector: number[], topK: number, namespace?: string, _filter?: Record<string, unknown>): Promise<VectorMatch[]> {
|
|
66
65
|
const payload = {
|
|
67
66
|
index: this.indexName,
|
|
@@ -113,7 +113,6 @@ export class WeaviateProvider extends BaseVectorProvider {
|
|
|
113
113
|
}));
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
117
116
|
async delete(id: string, _namespace?: string): Promise<void> {
|
|
118
117
|
await this.http.delete(`/v1/objects/${this.indexName}/${id}`);
|
|
119
118
|
}
|
|
@@ -27,7 +27,6 @@ export class LlamaIndexIngestor {
|
|
|
27
27
|
const doc = new Document({ text, metadata: options.metadata || {} });
|
|
28
28
|
const nodes = splitter.getNodesFromDocuments([doc]);
|
|
29
29
|
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
30
|
return (nodes as any[]).map((node: any, index: number) => ({
|
|
32
31
|
id: `${options.docId || 'doc'}_node_${index}`,
|
|
33
32
|
content: node.getContent(MetadataMode.ALL),
|