@retrivora-ai/rag-engine 2.5.6 → 2.5.7
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/ChromaDBProvider-4RPJN7Y3.mjs +8 -0
- package/dist/MilvusProvider-WJLLZ6TW.mjs +8 -0
- package/dist/MongoDBProvider-QSERELZX.mjs +8 -0
- package/dist/MultiTablePostgresProvider-JF2HEUDZ.mjs +9 -0
- package/dist/PineconeProvider-HLZL7HKU.mjs +10 -0
- package/dist/PostgreSQLProvider-JQMCNHRO.mjs +8 -0
- package/dist/QdrantProvider-6MNFPEVC.mjs +8 -0
- package/dist/RedisProvider-ERQL6AEB.mjs +8 -0
- package/dist/SimpleGraphProvider-OP3HAJJM.mjs +70 -0
- package/dist/UniversalVectorProvider-INM3KH5F.mjs +9 -0
- package/dist/WeaviateProvider-VHWWICCC.mjs +8 -0
- package/dist/chunk-366EFBZC.mjs +165 -0
- package/dist/chunk-6MGVQTU4.mjs +8883 -0
- package/dist/chunk-B4AXIUM7.mjs +49 -0
- package/dist/chunk-BEPLYQBS.mjs +89 -0
- package/dist/chunk-BNOPQCZW.mjs +238 -0
- package/dist/chunk-FJ43J4FW.mjs +654 -0
- package/dist/chunk-GP2AJQRQ.mjs +107 -0
- package/dist/chunk-IMP6FUCY.mjs +30 -0
- package/dist/chunk-JRQWSJNF.mjs +202 -0
- package/dist/chunk-LYHCKUNF.mjs +112 -0
- package/dist/chunk-MFIWWUC7.mjs +152 -0
- package/dist/chunk-MWICNCB2.mjs +157 -0
- package/dist/chunk-N54YTFBN.mjs +76 -0
- package/dist/chunk-POOWU2HR.mjs +211 -0
- package/dist/chunk-QGDGPOZH.mjs +217 -0
- package/dist/chunk-QI3FTN6G.mjs +281 -0
- package/dist/chunk-QJIDGVG6.mjs +334 -0
- package/dist/chunk-W2DKVD3G.mjs +81 -0
- package/dist/chunk-XHSDHPKI.mjs +336 -0
- package/dist/handlers/index.js +1 -1
- package/dist/handlers/index.mjs +24 -12052
- package/dist/{index-Byv5MaYi.d.mts → index-9h_ENWQn.d.mts} +16 -0
- package/dist/{index-DP3_OpuB.d.ts → index-Xci6GfpI.d.ts} +16 -0
- package/dist/index.css +112 -0
- package/dist/index.d.mts +176 -18
- package/dist/index.d.ts +176 -18
- package/dist/index.js +602 -104
- package/dist/index.min.css +1 -1
- package/dist/index.mjs +648 -1534
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +1 -1
- package/dist/server.mjs +372 -12608
- package/package.json +2 -2
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import "./chunk-N54YTFBN.mjs";
|
|
2
|
+
|
|
3
|
+
// src/providers/graphdb/BaseGraphProvider.ts
|
|
4
|
+
var BaseGraphProvider = class {
|
|
5
|
+
constructor(config) {
|
|
6
|
+
this.config = config;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
// src/providers/graphdb/SimpleGraphProvider.ts
|
|
11
|
+
var SimpleGraphProvider = class extends BaseGraphProvider {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.nodes = /* @__PURE__ */ new Map();
|
|
15
|
+
this.edges = [];
|
|
16
|
+
}
|
|
17
|
+
async initialize() {
|
|
18
|
+
console.warn(
|
|
19
|
+
"[SimpleGraphProvider] Warning: SimpleGraphProvider is an in-memory database meant for demonstration and local development. Graph data is NOT persisted across restarts."
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
async addNodes(nodes) {
|
|
23
|
+
for (const node of nodes) {
|
|
24
|
+
this.nodes.set(node.id, node);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async addEdges(edges) {
|
|
28
|
+
this.edges.push(...edges);
|
|
29
|
+
}
|
|
30
|
+
async query(queryText, limit = 5) {
|
|
31
|
+
const q = queryText.toLowerCase();
|
|
32
|
+
const matchedNodes = Array.from(this.nodes.values()).filter(
|
|
33
|
+
(node) => node.id.toLowerCase().includes(q) || node.label.toLowerCase().includes(q) || JSON.stringify(node.properties).toLowerCase().includes(q)
|
|
34
|
+
).slice(0, limit);
|
|
35
|
+
const matchedNodeIds = new Set(matchedNodes.map((n) => n.id));
|
|
36
|
+
const matchedEdges = this.edges.filter(
|
|
37
|
+
(edge) => matchedNodeIds.has(edge.source) || matchedNodeIds.has(edge.target)
|
|
38
|
+
);
|
|
39
|
+
for (const edge of matchedEdges) {
|
|
40
|
+
if (!matchedNodeIds.has(edge.source)) {
|
|
41
|
+
const source = this.nodes.get(edge.source);
|
|
42
|
+
if (source) {
|
|
43
|
+
matchedNodes.push(source);
|
|
44
|
+
matchedNodeIds.add(edge.source);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (!matchedNodeIds.has(edge.target)) {
|
|
48
|
+
const target = this.nodes.get(edge.target);
|
|
49
|
+
if (target) {
|
|
50
|
+
matchedNodes.push(target);
|
|
51
|
+
matchedNodeIds.add(edge.target);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
nodes: matchedNodes,
|
|
57
|
+
edges: matchedEdges
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
async ping() {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
async disconnect() {
|
|
64
|
+
this.nodes.clear();
|
|
65
|
+
this.edges = [];
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
SimpleGraphProvider
|
|
70
|
+
};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// package.json
|
|
2
|
+
var package_default = {
|
|
3
|
+
name: "@retrivora-ai/rag-engine",
|
|
4
|
+
version: "2.5.7",
|
|
5
|
+
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
6
|
+
author: "Abhinav Alkuchi",
|
|
7
|
+
license: "UNLICENSED",
|
|
8
|
+
keywords: [
|
|
9
|
+
"rag",
|
|
10
|
+
"retrieval-augmented-generation",
|
|
11
|
+
"chatbot",
|
|
12
|
+
"vector-database",
|
|
13
|
+
"pinecone",
|
|
14
|
+
"pgvector",
|
|
15
|
+
"postgresql",
|
|
16
|
+
"milvus",
|
|
17
|
+
"qdrant",
|
|
18
|
+
"chromadb",
|
|
19
|
+
"redis",
|
|
20
|
+
"weaviate",
|
|
21
|
+
"mongodb",
|
|
22
|
+
"openai",
|
|
23
|
+
"anthropic",
|
|
24
|
+
"ollama",
|
|
25
|
+
"nextjs",
|
|
26
|
+
"react",
|
|
27
|
+
"ai",
|
|
28
|
+
"llm",
|
|
29
|
+
"embeddings"
|
|
30
|
+
],
|
|
31
|
+
main: "dist/index.js",
|
|
32
|
+
module: "dist/index.mjs",
|
|
33
|
+
types: "dist/index.d.ts",
|
|
34
|
+
exports: {
|
|
35
|
+
".": {
|
|
36
|
+
types: "./dist/index.d.ts",
|
|
37
|
+
require: "./dist/index.js",
|
|
38
|
+
import: "./dist/index.mjs"
|
|
39
|
+
},
|
|
40
|
+
"./style.css": "./dist/index.css",
|
|
41
|
+
"./style.min.css": "./dist/index.min.css",
|
|
42
|
+
"./index.css": "./dist/index.css",
|
|
43
|
+
"./index.min.css": "./dist/index.min.css",
|
|
44
|
+
"./styles.css": "./dist/index.css",
|
|
45
|
+
"./styles.min.css": "./dist/index.min.css",
|
|
46
|
+
"./handlers": {
|
|
47
|
+
types: "./dist/handlers/index.d.ts",
|
|
48
|
+
require: "./dist/handlers/index.js",
|
|
49
|
+
import: "./dist/handlers/index.mjs"
|
|
50
|
+
},
|
|
51
|
+
"./server": {
|
|
52
|
+
types: "./dist/server.d.ts",
|
|
53
|
+
require: "./dist/server.js",
|
|
54
|
+
import: "./dist/server.mjs"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
browser: {
|
|
58
|
+
child_process: false,
|
|
59
|
+
fs: false,
|
|
60
|
+
net: false,
|
|
61
|
+
tls: false,
|
|
62
|
+
crypto: false,
|
|
63
|
+
os: false,
|
|
64
|
+
path: false,
|
|
65
|
+
stream: false,
|
|
66
|
+
http: false,
|
|
67
|
+
https: false,
|
|
68
|
+
zlib: false,
|
|
69
|
+
mongodb: false,
|
|
70
|
+
pg: false,
|
|
71
|
+
"pdf-parse": false,
|
|
72
|
+
mammoth: false
|
|
73
|
+
},
|
|
74
|
+
files: [
|
|
75
|
+
"dist",
|
|
76
|
+
"README.md",
|
|
77
|
+
"FREE_TIER_ARCHITECTURE.md"
|
|
78
|
+
],
|
|
79
|
+
scripts: {
|
|
80
|
+
dev: "npx @tailwindcss/cli -i src/tailwind.css -o src/index.css && tsup src/index.ts src/handlers/index.ts src/server.ts --format cjs,esm --watch --tsconfig tsconfig.build.json --external react,react-dom,next,mongodb,pg,openai,@anthropic-ai/sdk,@pinecone-database/pinecone,axios,lucide-react,mammoth,pdf-parse,xlsx,react-markdown,remark-gfm,next-themes,langchain,@langchain/core,@langchain/openai,llamaindex --inject-style",
|
|
81
|
+
build: "npm run build:pkg",
|
|
82
|
+
"build:pkg": "npx @tailwindcss/cli -i src/tailwind.css -o src/index.css && tsup src/index.ts src/handlers/index.ts src/server.ts --format cjs,esm --dts --clean --no-splitting --tsconfig tsconfig.build.json --external react,react-dom,next,mongodb,pg,openai,@anthropic-ai/sdk,@pinecone-database/pinecone,axios,lucide-react,mammoth,pdf-parse,xlsx,react-markdown,remark-gfm,next-themes,langchain,@langchain/core,@langchain/openai,llamaindex --inject-style && npx @tailwindcss/cli -i src/tailwind.css -o dist/index.css && npx @tailwindcss/cli -i src/tailwind.css -o dist/index.min.css --minify",
|
|
83
|
+
lint: "eslint",
|
|
84
|
+
typecheck: "tsc --noEmit -p tsconfig.build.json",
|
|
85
|
+
test: "jest",
|
|
86
|
+
clean: `node -e "require('fs').rmSync('dist', { recursive: true, force: true })"`
|
|
87
|
+
},
|
|
88
|
+
peerDependencies: {
|
|
89
|
+
axios: ">=1.0.0",
|
|
90
|
+
next: ">=15.0.0",
|
|
91
|
+
react: ">=18.0.0",
|
|
92
|
+
"react-dom": ">=18.0.0"
|
|
93
|
+
},
|
|
94
|
+
peerDependenciesMeta: {
|
|
95
|
+
axios: {
|
|
96
|
+
optional: true
|
|
97
|
+
},
|
|
98
|
+
next: {
|
|
99
|
+
optional: true
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
dependencies: {
|
|
103
|
+
"@anthropic-ai/sdk": "^0.95.1",
|
|
104
|
+
"@google/genai": "^0.8.0",
|
|
105
|
+
"@google/generative-ai": "^0.24.1",
|
|
106
|
+
"@pinecone-database/pinecone": "^7.2.0",
|
|
107
|
+
"@retrivora-ai/billing-guards": "*",
|
|
108
|
+
"@types/papaparse": "^5.5.2",
|
|
109
|
+
"framer-motion": "^13.1.0",
|
|
110
|
+
katex: "^0.18.4",
|
|
111
|
+
"lucide-react": "^1.8.0",
|
|
112
|
+
"next-themes": "^0.4.6",
|
|
113
|
+
openai: "^6.34.0",
|
|
114
|
+
papaparse: "^5.5.3",
|
|
115
|
+
"react-is": "^18.3.1",
|
|
116
|
+
"react-markdown": "^10.1.0",
|
|
117
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
118
|
+
recharts: "^3.8.1",
|
|
119
|
+
"rehype-katex": "^7.0.1",
|
|
120
|
+
"remark-gfm": "^4.0.1",
|
|
121
|
+
"remark-math": "^6.0.0",
|
|
122
|
+
exceljs: "^4.4.0",
|
|
123
|
+
zod: "^4.4.3"
|
|
124
|
+
},
|
|
125
|
+
optionalDependencies: {
|
|
126
|
+
"@langchain/core": "^1.1.42",
|
|
127
|
+
"@langchain/openai": "^1.4.5",
|
|
128
|
+
langchain: "^1.3.5",
|
|
129
|
+
llamaindex: "^0.11.9",
|
|
130
|
+
mammoth: "^1.8.0",
|
|
131
|
+
mongodb: "^7.1.1",
|
|
132
|
+
"pdf-parse": "^1.1.1",
|
|
133
|
+
pg: "^8.20.0"
|
|
134
|
+
},
|
|
135
|
+
devDependencies: {
|
|
136
|
+
"@tailwindcss/cli": "^4",
|
|
137
|
+
"@tailwindcss/postcss": "^4",
|
|
138
|
+
"@types/estree": "^1.0.9",
|
|
139
|
+
"@types/jest": "^30.0.0",
|
|
140
|
+
"@types/katex": "^0.16.8",
|
|
141
|
+
"@types/node": "^20",
|
|
142
|
+
"@types/pdf-parse": "^1.1.5",
|
|
143
|
+
"@types/pg": "^8.20.0",
|
|
144
|
+
"@types/react": "^19.2.14",
|
|
145
|
+
"@types/react-dom": "^19.2.3",
|
|
146
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
147
|
+
axios: "^1.15.0",
|
|
148
|
+
dotenv: "^17.4.2",
|
|
149
|
+
eslint: "^9",
|
|
150
|
+
"eslint-config-next": "16.3.2",
|
|
151
|
+
jest: "^30.4.2",
|
|
152
|
+
next: "^16.3.2",
|
|
153
|
+
tailwindcss: "^4",
|
|
154
|
+
"ts-jest": "^29.4.12",
|
|
155
|
+
tsup: "^8.5.1",
|
|
156
|
+
typescript: "^5"
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
// src/version.ts
|
|
161
|
+
var SDK_VERSION = package_default.version || "2.1.3";
|
|
162
|
+
|
|
163
|
+
export {
|
|
164
|
+
SDK_VERSION
|
|
165
|
+
};
|