@retrivora-ai/rag-engine 2.3.1 → 2.3.2
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/handlers/index.js +2 -5
- package/dist/handlers/index.mjs +2 -5
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- 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/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
package/dist/handlers/index.js
CHANGED
|
@@ -1355,7 +1355,6 @@ var init_MilvusProvider = __esm({
|
|
|
1355
1355
|
metadata: res["metadata"] || {}
|
|
1356
1356
|
}));
|
|
1357
1357
|
}
|
|
1358
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1359
1358
|
async delete(id, _namespace) {
|
|
1360
1359
|
await this.http.post("/v1/vector/delete", {
|
|
1361
1360
|
collectionName: this.indexName,
|
|
@@ -1780,7 +1779,6 @@ var init_RedisProvider = __esm({
|
|
|
1780
1779
|
await this.upsert(doc, namespace);
|
|
1781
1780
|
}
|
|
1782
1781
|
}
|
|
1783
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1784
1782
|
async query(vector, topK, namespace, _filter) {
|
|
1785
1783
|
const payload = {
|
|
1786
1784
|
index: this.indexName,
|
|
@@ -1917,7 +1915,6 @@ var init_WeaviateProvider = __esm({
|
|
|
1917
1915
|
metadata: res["metadata"] ? JSON.parse(res["metadata"]) : {}
|
|
1918
1916
|
}));
|
|
1919
1917
|
}
|
|
1920
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1921
1918
|
async delete(id, _namespace) {
|
|
1922
1919
|
await this.http.delete(`/v1/objects/${this.indexName}/${id}`);
|
|
1923
1920
|
}
|
|
@@ -4711,7 +4708,7 @@ var ConfigValidator = class {
|
|
|
4711
4708
|
// package.json
|
|
4712
4709
|
var package_default = {
|
|
4713
4710
|
name: "@retrivora-ai/rag-engine",
|
|
4714
|
-
version: "2.3.
|
|
4711
|
+
version: "2.3.2",
|
|
4715
4712
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
4716
4713
|
author: "Abhinav Alkuchi",
|
|
4717
4714
|
license: "UNLICENSED",
|
|
@@ -4790,6 +4787,7 @@ var package_default = {
|
|
|
4790
4787
|
build: "npm run build:pkg",
|
|
4791
4788
|
"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",
|
|
4792
4789
|
lint: "eslint",
|
|
4790
|
+
typecheck: "tsc --noEmit -p tsconfig.build.json",
|
|
4793
4791
|
clean: "rm -rf dist"
|
|
4794
4792
|
},
|
|
4795
4793
|
peerDependencies: {
|
|
@@ -5176,7 +5174,6 @@ When presenting structured data, statistics, or comparisons, decide if it is bes
|
|
|
5176
5174
|
finalSystemPrompt += chartInstruction;
|
|
5177
5175
|
}
|
|
5178
5176
|
this.agent = createAgent({
|
|
5179
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5180
5177
|
model: chatModel,
|
|
5181
5178
|
tools: [searchTool],
|
|
5182
5179
|
systemPrompt: finalSystemPrompt
|
package/dist/handlers/index.mjs
CHANGED
|
@@ -1340,7 +1340,6 @@ var init_MilvusProvider = __esm({
|
|
|
1340
1340
|
metadata: res["metadata"] || {}
|
|
1341
1341
|
}));
|
|
1342
1342
|
}
|
|
1343
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1344
1343
|
async delete(id, _namespace) {
|
|
1345
1344
|
await this.http.post("/v1/vector/delete", {
|
|
1346
1345
|
collectionName: this.indexName,
|
|
@@ -1765,7 +1764,6 @@ var init_RedisProvider = __esm({
|
|
|
1765
1764
|
await this.upsert(doc, namespace);
|
|
1766
1765
|
}
|
|
1767
1766
|
}
|
|
1768
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1769
1767
|
async query(vector, topK, namespace, _filter) {
|
|
1770
1768
|
const payload = {
|
|
1771
1769
|
index: this.indexName,
|
|
@@ -1902,7 +1900,6 @@ var init_WeaviateProvider = __esm({
|
|
|
1902
1900
|
metadata: res["metadata"] ? JSON.parse(res["metadata"]) : {}
|
|
1903
1901
|
}));
|
|
1904
1902
|
}
|
|
1905
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1906
1903
|
async delete(id, _namespace) {
|
|
1907
1904
|
await this.http.delete(`/v1/objects/${this.indexName}/${id}`);
|
|
1908
1905
|
}
|
|
@@ -4675,7 +4672,7 @@ var ConfigValidator = class {
|
|
|
4675
4672
|
// package.json
|
|
4676
4673
|
var package_default = {
|
|
4677
4674
|
name: "@retrivora-ai/rag-engine",
|
|
4678
|
-
version: "2.3.
|
|
4675
|
+
version: "2.3.2",
|
|
4679
4676
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
4680
4677
|
author: "Abhinav Alkuchi",
|
|
4681
4678
|
license: "UNLICENSED",
|
|
@@ -4754,6 +4751,7 @@ var package_default = {
|
|
|
4754
4751
|
build: "npm run build:pkg",
|
|
4755
4752
|
"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",
|
|
4756
4753
|
lint: "eslint",
|
|
4754
|
+
typecheck: "tsc --noEmit -p tsconfig.build.json",
|
|
4757
4755
|
clean: "rm -rf dist"
|
|
4758
4756
|
},
|
|
4759
4757
|
peerDependencies: {
|
|
@@ -5140,7 +5138,6 @@ When presenting structured data, statistics, or comparisons, decide if it is bes
|
|
|
5140
5138
|
finalSystemPrompt += chartInstruction;
|
|
5141
5139
|
}
|
|
5142
5140
|
this.agent = createAgent({
|
|
5143
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5144
5141
|
model: chatModel,
|
|
5145
5142
|
tools: [searchTool],
|
|
5146
5143
|
systemPrompt: finalSystemPrompt
|
package/dist/index.js
CHANGED
|
@@ -3047,7 +3047,7 @@ function useRagChat(projectId, options = {}) {
|
|
|
3047
3047
|
// package.json
|
|
3048
3048
|
var package_default = {
|
|
3049
3049
|
name: "@retrivora-ai/rag-engine",
|
|
3050
|
-
version: "2.3.
|
|
3050
|
+
version: "2.3.2",
|
|
3051
3051
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
3052
3052
|
author: "Abhinav Alkuchi",
|
|
3053
3053
|
license: "UNLICENSED",
|
|
@@ -3126,6 +3126,7 @@ var package_default = {
|
|
|
3126
3126
|
build: "npm run build:pkg",
|
|
3127
3127
|
"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",
|
|
3128
3128
|
lint: "eslint",
|
|
3129
|
+
typecheck: "tsc --noEmit -p tsconfig.build.json",
|
|
3129
3130
|
clean: "rm -rf dist"
|
|
3130
3131
|
},
|
|
3131
3132
|
peerDependencies: {
|
|
@@ -4144,7 +4145,6 @@ function ChatWidget({ position = "bottom-right", onAddToCart, apiUrl, retrivoraA
|
|
|
4144
4145
|
const [widgetError, setWidgetError] = (0, import_react13.useState)(null);
|
|
4145
4146
|
const [isValidating, setIsValidating] = (0, import_react13.useState)(false);
|
|
4146
4147
|
const [hasMountValidationFailed, setHasMountValidationFailed] = (0, import_react13.useState)(false);
|
|
4147
|
-
if (ui.showWidget === false) return null;
|
|
4148
4148
|
const positionClass = position === "bottom-left" ? "bottom-6 left-6" : "bottom-6 right-6";
|
|
4149
4149
|
const windowPositionClass = position === "bottom-left" ? "bottom-20 left-6" : "bottom-20 right-6";
|
|
4150
4150
|
const resolveLicenseKey = (0, import_react13.useCallback)(() => {
|
|
@@ -4254,6 +4254,7 @@ function ChatWidget({ position = "bottom-right", onAddToCart, apiUrl, retrivoraA
|
|
|
4254
4254
|
}
|
|
4255
4255
|
};
|
|
4256
4256
|
const isResized = dimensions.width !== DEFAULT_DIMENSIONS.width || dimensions.height !== DEFAULT_DIMENSIONS.height;
|
|
4257
|
+
if (ui.showWidget === false) return null;
|
|
4257
4258
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
4258
4259
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("style", { dangerouslySetInnerHTML: { __html: GEMINI_STYLES } }),
|
|
4259
4260
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
package/dist/index.mjs
CHANGED
|
@@ -3049,7 +3049,7 @@ function useRagChat(projectId, options = {}) {
|
|
|
3049
3049
|
// package.json
|
|
3050
3050
|
var package_default = {
|
|
3051
3051
|
name: "@retrivora-ai/rag-engine",
|
|
3052
|
-
version: "2.3.
|
|
3052
|
+
version: "2.3.2",
|
|
3053
3053
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
3054
3054
|
author: "Abhinav Alkuchi",
|
|
3055
3055
|
license: "UNLICENSED",
|
|
@@ -3128,6 +3128,7 @@ var package_default = {
|
|
|
3128
3128
|
build: "npm run build:pkg",
|
|
3129
3129
|
"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",
|
|
3130
3130
|
lint: "eslint",
|
|
3131
|
+
typecheck: "tsc --noEmit -p tsconfig.build.json",
|
|
3131
3132
|
clean: "rm -rf dist"
|
|
3132
3133
|
},
|
|
3133
3134
|
peerDependencies: {
|
|
@@ -4146,7 +4147,6 @@ function ChatWidget({ position = "bottom-right", onAddToCart, apiUrl, retrivoraA
|
|
|
4146
4147
|
const [widgetError, setWidgetError] = useState7(null);
|
|
4147
4148
|
const [isValidating, setIsValidating] = useState7(false);
|
|
4148
4149
|
const [hasMountValidationFailed, setHasMountValidationFailed] = useState7(false);
|
|
4149
|
-
if (ui.showWidget === false) return null;
|
|
4150
4150
|
const positionClass = position === "bottom-left" ? "bottom-6 left-6" : "bottom-6 right-6";
|
|
4151
4151
|
const windowPositionClass = position === "bottom-left" ? "bottom-20 left-6" : "bottom-20 right-6";
|
|
4152
4152
|
const resolveLicenseKey = useCallback3(() => {
|
|
@@ -4256,6 +4256,7 @@ function ChatWidget({ position = "bottom-right", onAddToCart, apiUrl, retrivoraA
|
|
|
4256
4256
|
}
|
|
4257
4257
|
};
|
|
4258
4258
|
const isResized = dimensions.width !== DEFAULT_DIMENSIONS.width || dimensions.height !== DEFAULT_DIMENSIONS.height;
|
|
4259
|
+
if (ui.showWidget === false) return null;
|
|
4259
4260
|
return /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
4260
4261
|
/* @__PURE__ */ jsx14("style", { dangerouslySetInnerHTML: { __html: GEMINI_STYLES } }),
|
|
4261
4262
|
/* @__PURE__ */ jsxs13(
|
package/dist/server.js
CHANGED
|
@@ -1355,7 +1355,6 @@ var init_MilvusProvider = __esm({
|
|
|
1355
1355
|
metadata: res["metadata"] || {}
|
|
1356
1356
|
}));
|
|
1357
1357
|
}
|
|
1358
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1359
1358
|
async delete(id, _namespace) {
|
|
1360
1359
|
await this.http.post("/v1/vector/delete", {
|
|
1361
1360
|
collectionName: this.indexName,
|
|
@@ -1780,7 +1779,6 @@ var init_RedisProvider = __esm({
|
|
|
1780
1779
|
await this.upsert(doc, namespace);
|
|
1781
1780
|
}
|
|
1782
1781
|
}
|
|
1783
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1784
1782
|
async query(vector, topK, namespace, _filter) {
|
|
1785
1783
|
const payload = {
|
|
1786
1784
|
index: this.indexName,
|
|
@@ -1917,7 +1915,6 @@ var init_WeaviateProvider = __esm({
|
|
|
1917
1915
|
metadata: res["metadata"] ? JSON.parse(res["metadata"]) : {}
|
|
1918
1916
|
}));
|
|
1919
1917
|
}
|
|
1920
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1921
1918
|
async delete(id, _namespace) {
|
|
1922
1919
|
await this.http.delete(`/v1/objects/${this.indexName}/${id}`);
|
|
1923
1920
|
}
|
|
@@ -4824,7 +4821,7 @@ var ConfigValidator = class {
|
|
|
4824
4821
|
// package.json
|
|
4825
4822
|
var package_default = {
|
|
4826
4823
|
name: "@retrivora-ai/rag-engine",
|
|
4827
|
-
version: "2.3.
|
|
4824
|
+
version: "2.3.2",
|
|
4828
4825
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
4829
4826
|
author: "Abhinav Alkuchi",
|
|
4830
4827
|
license: "UNLICENSED",
|
|
@@ -4903,6 +4900,7 @@ var package_default = {
|
|
|
4903
4900
|
build: "npm run build:pkg",
|
|
4904
4901
|
"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",
|
|
4905
4902
|
lint: "eslint",
|
|
4903
|
+
typecheck: "tsc --noEmit -p tsconfig.build.json",
|
|
4906
4904
|
clean: "rm -rf dist"
|
|
4907
4905
|
},
|
|
4908
4906
|
peerDependencies: {
|
|
@@ -5289,7 +5287,6 @@ When presenting structured data, statistics, or comparisons, decide if it is bes
|
|
|
5289
5287
|
finalSystemPrompt += chartInstruction;
|
|
5290
5288
|
}
|
|
5291
5289
|
this.agent = createAgent({
|
|
5292
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5293
5290
|
model: chatModel,
|
|
5294
5291
|
tools: [searchTool],
|
|
5295
5292
|
systemPrompt: finalSystemPrompt
|
package/dist/server.mjs
CHANGED
|
@@ -1340,7 +1340,6 @@ var init_MilvusProvider = __esm({
|
|
|
1340
1340
|
metadata: res["metadata"] || {}
|
|
1341
1341
|
}));
|
|
1342
1342
|
}
|
|
1343
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1344
1343
|
async delete(id, _namespace) {
|
|
1345
1344
|
await this.http.post("/v1/vector/delete", {
|
|
1346
1345
|
collectionName: this.indexName,
|
|
@@ -1765,7 +1764,6 @@ var init_RedisProvider = __esm({
|
|
|
1765
1764
|
await this.upsert(doc, namespace);
|
|
1766
1765
|
}
|
|
1767
1766
|
}
|
|
1768
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1769
1767
|
async query(vector, topK, namespace, _filter) {
|
|
1770
1768
|
const payload = {
|
|
1771
1769
|
index: this.indexName,
|
|
@@ -1902,7 +1900,6 @@ var init_WeaviateProvider = __esm({
|
|
|
1902
1900
|
metadata: res["metadata"] ? JSON.parse(res["metadata"]) : {}
|
|
1903
1901
|
}));
|
|
1904
1902
|
}
|
|
1905
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1906
1903
|
async delete(id, _namespace) {
|
|
1907
1904
|
await this.http.delete(`/v1/objects/${this.indexName}/${id}`);
|
|
1908
1905
|
}
|
|
@@ -4724,7 +4721,7 @@ var ConfigValidator = class {
|
|
|
4724
4721
|
// package.json
|
|
4725
4722
|
var package_default = {
|
|
4726
4723
|
name: "@retrivora-ai/rag-engine",
|
|
4727
|
-
version: "2.3.
|
|
4724
|
+
version: "2.3.2",
|
|
4728
4725
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
4729
4726
|
author: "Abhinav Alkuchi",
|
|
4730
4727
|
license: "UNLICENSED",
|
|
@@ -4803,6 +4800,7 @@ var package_default = {
|
|
|
4803
4800
|
build: "npm run build:pkg",
|
|
4804
4801
|
"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",
|
|
4805
4802
|
lint: "eslint",
|
|
4803
|
+
typecheck: "tsc --noEmit -p tsconfig.build.json",
|
|
4806
4804
|
clean: "rm -rf dist"
|
|
4807
4805
|
},
|
|
4808
4806
|
peerDependencies: {
|
|
@@ -5189,7 +5187,6 @@ When presenting structured data, statistics, or comparisons, decide if it is bes
|
|
|
5189
5187
|
finalSystemPrompt += chartInstruction;
|
|
5190
5188
|
}
|
|
5191
5189
|
this.agent = createAgent({
|
|
5192
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5193
5190
|
model: chatModel,
|
|
5194
5191
|
tools: [searchTool],
|
|
5195
5192
|
systemPrompt: finalSystemPrompt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retrivora-ai/rag-engine",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Retrivora AI is a plug-and-play AI engine for RAG chat experiences — generic vector DB + LLM provider, embeddable or standalone.",
|
|
5
5
|
"author": "Abhinav Alkuchi",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"build": "npm run build:pkg",
|
|
80
80
|
"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",
|
|
81
81
|
"lint": "eslint",
|
|
82
|
+
"typecheck": "tsc --noEmit -p tsconfig.build.json",
|
|
82
83
|
"clean": "rm -rf dist"
|
|
83
84
|
},
|
|
84
85
|
"peerDependencies": {
|
|
@@ -135,4 +136,4 @@
|
|
|
135
136
|
"tsup": "^8.5.1",
|
|
136
137
|
"typescript": "^5"
|
|
137
138
|
}
|
|
138
|
-
}
|
|
139
|
+
}
|
|
@@ -79,8 +79,6 @@ export function ChatWidget({ position = 'bottom-right', onAddToCart, apiUrl, ret
|
|
|
79
79
|
const [isValidating, setIsValidating] = useState(false);
|
|
80
80
|
const [hasMountValidationFailed, setHasMountValidationFailed] = useState(false);
|
|
81
81
|
|
|
82
|
-
if (ui.showWidget === false) return null;
|
|
83
|
-
|
|
84
82
|
const positionClass =
|
|
85
83
|
position === 'bottom-left'
|
|
86
84
|
? 'bottom-6 left-6'
|
|
@@ -233,6 +231,8 @@ export function ChatWidget({ position = 'bottom-right', onAddToCart, apiUrl, ret
|
|
|
233
231
|
|
|
234
232
|
const isResized = dimensions.width !== DEFAULT_DIMENSIONS.width || dimensions.height !== DEFAULT_DIMENSIONS.height;
|
|
235
233
|
|
|
234
|
+
if (ui.showWidget === false) return null;
|
|
235
|
+
|
|
236
236
|
return (
|
|
237
237
|
<>
|
|
238
238
|
<style dangerouslySetInnerHTML={{ __html: GEMINI_STYLES }} />
|
|
@@ -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,
|
|
@@ -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),
|