@retrivora-ai/rag-engine 2.6.2 → 2.6.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/ChromaDBProvider-NDA2IBOH.mjs +8 -0
- package/dist/MilvusProvider-H6GGL5FQ.mjs +8 -0
- package/dist/MongoDBProvider-KC3GF3FH.mjs +8 -0
- package/dist/MultiTablePostgresProvider-6LJBFZL2.mjs +9 -0
- package/dist/PineconeProvider-22RF2QPF.mjs +10 -0
- package/dist/PineconeProvider-HBBIXLT3.mjs +10 -0
- package/dist/PostgreSQLProvider-VWFL4OIP.mjs +8 -0
- package/dist/QdrantProvider-UU7RGXBI.mjs +8 -0
- package/dist/RedisProvider-MIIPSAAE.mjs +8 -0
- package/dist/SimpleGraphProvider-HJIS4S7Y.mjs +70 -0
- package/dist/UniversalVectorProvider-NO3L255G.mjs +9 -0
- package/dist/WeaviateProvider-YRZDZFAC.mjs +8 -0
- package/dist/chunk-23PFNEBF.mjs +107 -0
- package/dist/chunk-3E4GZGDX.mjs +10851 -0
- package/dist/chunk-3SQ4DODU.mjs +238 -0
- package/dist/chunk-AHMMUZ4W.mjs +152 -0
- package/dist/chunk-ASBNNEVI.mjs +81 -0
- package/dist/chunk-AT4TFUQN.mjs +219 -0
- package/dist/chunk-BEPLYQBS.mjs +89 -0
- package/dist/chunk-G7MJRFCO.mjs +340 -0
- package/dist/chunk-IHWKVAUR.mjs +112 -0
- package/dist/chunk-IMP6FUCY.mjs +30 -0
- package/dist/chunk-LFNV6DEL.mjs +281 -0
- package/dist/chunk-MAXMVO7B.mjs +211 -0
- package/dist/chunk-MGJ6V2IT.mjs +203 -0
- package/dist/chunk-N3TI27LG.mjs +334 -0
- package/dist/chunk-NWYE4Q7B.mjs +334 -0
- package/dist/chunk-OJMAT4EG.mjs +219 -0
- package/dist/chunk-QKZM3RSJ.mjs +10851 -0
- package/dist/chunk-QUY3E6HJ.mjs +168 -0
- package/dist/chunk-SG6XYLQE.mjs +53 -0
- package/dist/chunk-UT6SZZEC.mjs +69 -0
- package/dist/chunk-VW3U4MMX.mjs +157 -0
- package/dist/chunk-WOJCOTXI.mjs +281 -0
- package/dist/chunk-XP6NJMX4.mjs +168 -0
- package/dist/chunk-XYBKDJDW.mjs +696 -0
- package/dist/handlers/index.d.mts +1 -1
- package/dist/handlers/index.d.ts +1 -1
- package/dist/handlers/index.js +56 -23
- package/dist/handlers/index.mjs +24 -14027
- package/dist/{index-D7FuQRSb.d.mts → index-BBbt5A2y.d.mts} +3 -1
- package/dist/{index-CFl4KrKq.d.ts → index-BZ_rR6V8.d.ts} +3 -1
- package/dist/index.js +12 -4
- package/dist/index.mjs +46 -1461
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +56 -23
- package/dist/server.mjs +377 -14573
- package/package.json +1 -1
|
@@ -91,7 +91,9 @@ declare class VectorPlugin {
|
|
|
91
91
|
private config;
|
|
92
92
|
private pipeline;
|
|
93
93
|
private validationPromise;
|
|
94
|
-
constructor(hostConfig?: Partial<RagConfig
|
|
94
|
+
constructor(hostConfig?: Partial<RagConfig>, options?: {
|
|
95
|
+
skipLicenseCheck?: boolean;
|
|
96
|
+
});
|
|
95
97
|
/**
|
|
96
98
|
* Get the current resolved configuration.
|
|
97
99
|
*/
|
|
@@ -91,7 +91,9 @@ declare class VectorPlugin {
|
|
|
91
91
|
private config;
|
|
92
92
|
private pipeline;
|
|
93
93
|
private validationPromise;
|
|
94
|
-
constructor(hostConfig?: Partial<RagConfig
|
|
94
|
+
constructor(hostConfig?: Partial<RagConfig>, options?: {
|
|
95
|
+
skipLicenseCheck?: boolean;
|
|
96
|
+
});
|
|
95
97
|
/**
|
|
96
98
|
* Get the current resolved configuration.
|
|
97
99
|
*/
|
package/dist/index.js
CHANGED
|
@@ -360,7 +360,7 @@ function projectSettingsToUiConfig(settings) {
|
|
|
360
360
|
// package.json
|
|
361
361
|
var package_default = {
|
|
362
362
|
name: "@retrivora-ai/rag-engine",
|
|
363
|
-
version: "2.6.
|
|
363
|
+
version: "2.6.3",
|
|
364
364
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
365
365
|
author: "Abhinav Alkuchi",
|
|
366
366
|
license: "UNLICENSED",
|
|
@@ -749,6 +749,7 @@ var _LicenseVerifier = class _LicenseVerifier {
|
|
|
749
749
|
* Computes a deterministic hardware fingerprint to enforce node-locked licensing.
|
|
750
750
|
*/
|
|
751
751
|
static async generateMachineFingerprint() {
|
|
752
|
+
if (typeof process !== "undefined" && (process.env.VERCEL || process.env.AWS_LAMBDA_FUNCTION_NAME)) return "browser-client";
|
|
752
753
|
if (typeof window !== "undefined" && typeof navigator !== "undefined") {
|
|
753
754
|
return "browser-client";
|
|
754
755
|
}
|
|
@@ -812,7 +813,7 @@ var _LicenseVerifier = class _LicenseVerifier {
|
|
|
812
813
|
}
|
|
813
814
|
}
|
|
814
815
|
try {
|
|
815
|
-
let baseUrl = typeof process !== "undefined" && process.env.RETRIVORA_CONTROL_PLANE_URL ? process.env.RETRIVORA_CONTROL_PLANE_URL : "https://retrivora.com";
|
|
816
|
+
let baseUrl = typeof process !== "undefined" && process.env.RETRIVORA_CONTROL_PLANE_URL ? process.env.RETRIVORA_CONTROL_PLANE_URL : "https://www.retrivora.com";
|
|
816
817
|
if (typeof process !== "undefined" && process.env.TELEMETRY_URL) {
|
|
817
818
|
baseUrl = process.env.TELEMETRY_URL.replace(/\/api\/telemetry\/?$/, "");
|
|
818
819
|
}
|
|
@@ -4419,7 +4420,8 @@ function useRagChat(projectId, options = {}) {
|
|
|
4419
4420
|
signal: controller.signal,
|
|
4420
4421
|
body: payloadBody
|
|
4421
4422
|
});
|
|
4422
|
-
|
|
4423
|
+
const canFallbackLocal = typeof window === "undefined" || window.location.protocol.startsWith("http");
|
|
4424
|
+
if (response.status === 404 && !apiUrl && primaryUrl !== "/api/chat" && canFallbackLocal) {
|
|
4423
4425
|
console.warn(`[Retrivora SDK] Chat endpoint "${primaryUrl}" returned 404. Retrying fallback to "/api/chat"...`);
|
|
4424
4426
|
response = await fetch("/api/chat", {
|
|
4425
4427
|
method: "POST",
|
|
@@ -4560,6 +4562,10 @@ function useRagChat(projectId, options = {}) {
|
|
|
4560
4562
|
if (msg.toLowerCase().includes("license_revoked") || msg.toLowerCase().includes("key has been revoked") || msg.toLowerCase().includes("key has been terminated") || msg.toLowerCase().includes("key has been suspended")) {
|
|
4561
4563
|
msg = "Your Retrivora license key has been terminated, suspended, or revoked. Access denied.";
|
|
4562
4564
|
}
|
|
4565
|
+
setMessages((prev) => prev.filter((msg2) => {
|
|
4566
|
+
var _a2;
|
|
4567
|
+
return !(msg2.role === "assistant" && !((_a2 = msg2.content) == null ? void 0 : _a2.trim()));
|
|
4568
|
+
}));
|
|
4563
4569
|
setTemporaryError(msg);
|
|
4564
4570
|
onError == null ? void 0 : onError(msg);
|
|
4565
4571
|
} finally {
|
|
@@ -5151,13 +5157,15 @@ function ChatWindow({
|
|
|
5151
5157
|
headers: suggestionHeaders,
|
|
5152
5158
|
body: JSON.stringify({ query: input, namespace: projectId })
|
|
5153
5159
|
});
|
|
5154
|
-
|
|
5160
|
+
const canFallbackLocal = typeof window !== "undefined" && window.location.protocol.startsWith("http") && !effectiveApiBase;
|
|
5161
|
+
if (response.status === 404 && canFallbackLocal) {
|
|
5155
5162
|
response = await fetch("/api/suggestions", {
|
|
5156
5163
|
method: "POST",
|
|
5157
5164
|
headers: suggestionHeaders,
|
|
5158
5165
|
body: JSON.stringify({ query: input, namespace: projectId })
|
|
5159
5166
|
});
|
|
5160
5167
|
}
|
|
5168
|
+
if (!response.ok) return;
|
|
5161
5169
|
const data = await response.json();
|
|
5162
5170
|
if (data.suggestions) {
|
|
5163
5171
|
setSuggestions(data.suggestions);
|