@retrivora-ai/rag-engine 2.1.6 → 2.1.9
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 +15 -8
- package/dist/handlers/index.mjs +15 -8
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/server.js +15 -8
- package/dist/server.mjs +15 -8
- package/package.json +1 -1
- package/src/providers/vectordb/PineconeProvider.ts +16 -7
package/dist/handlers/index.js
CHANGED
|
@@ -807,20 +807,22 @@ var init_PineconeProvider = __esm({
|
|
|
807
807
|
PineconeProvider = class extends BaseVectorProvider {
|
|
808
808
|
constructor(config) {
|
|
809
809
|
super(config);
|
|
810
|
-
const opts = config.options;
|
|
811
|
-
|
|
812
|
-
this.apiKey = opts.apiKey;
|
|
810
|
+
const opts = config.options || {};
|
|
811
|
+
this.apiKey = opts.apiKey || process.env.PINECONE_API_KEY || "";
|
|
813
812
|
}
|
|
814
813
|
static getValidator() {
|
|
815
814
|
return {
|
|
816
815
|
validate(config) {
|
|
817
816
|
const errors = [];
|
|
818
817
|
const opts = config.options || {};
|
|
819
|
-
|
|
818
|
+
const hasLicenseKey = Boolean(
|
|
819
|
+
config.licenseKey || process.env.RETRIVORA_LICENSE_KEY || process.env.NEXT_PUBLIC_RETRIVORA_LICENSE_KEY
|
|
820
|
+
);
|
|
821
|
+
if (!opts.apiKey && !hasLicenseKey) {
|
|
820
822
|
errors.push({
|
|
821
823
|
field: "vectorDb.options.apiKey",
|
|
822
|
-
message: "Pinecone API key is required",
|
|
823
|
-
suggestion: "Set PINECONE_API_KEY environment variable",
|
|
824
|
+
message: "Pinecone API key is required when RETRIVORA_LICENSE_KEY is not set",
|
|
825
|
+
suggestion: "Set PINECONE_API_KEY environment variable or supply RETRIVORA_LICENSE_KEY for keyless vector storage",
|
|
824
826
|
severity: "error"
|
|
825
827
|
});
|
|
826
828
|
}
|
|
@@ -867,7 +869,12 @@ var init_PineconeProvider = __esm({
|
|
|
867
869
|
}
|
|
868
870
|
async initialize() {
|
|
869
871
|
var _a2, _b;
|
|
870
|
-
|
|
872
|
+
const key = this.apiKey || process.env.PINECONE_API_KEY || "";
|
|
873
|
+
if (!key) {
|
|
874
|
+
console.log("[PineconeProvider] Keyless Mode active \u2014 Vector operations managed via Retrivora Cloud Gateway.");
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
this.client = new import_pinecone.Pinecone({ apiKey: key });
|
|
871
878
|
const indexes = await this.client.listIndexes();
|
|
872
879
|
const names = (_b = (_a2 = indexes.indexes) == null ? void 0 : _a2.map((i) => i.name)) != null ? _b : [];
|
|
873
880
|
if (!names.includes(this.indexName)) {
|
|
@@ -5247,7 +5254,7 @@ var ConfigValidator = class {
|
|
|
5247
5254
|
// package.json
|
|
5248
5255
|
var package_default = {
|
|
5249
5256
|
name: "@retrivora-ai/rag-engine",
|
|
5250
|
-
version: "2.1.
|
|
5257
|
+
version: "2.1.9",
|
|
5251
5258
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
5252
5259
|
author: "Abhinav Alkuchi",
|
|
5253
5260
|
license: "UNLICENSED",
|
package/dist/handlers/index.mjs
CHANGED
|
@@ -792,20 +792,22 @@ var init_PineconeProvider = __esm({
|
|
|
792
792
|
PineconeProvider = class extends BaseVectorProvider {
|
|
793
793
|
constructor(config) {
|
|
794
794
|
super(config);
|
|
795
|
-
const opts = config.options;
|
|
796
|
-
|
|
797
|
-
this.apiKey = opts.apiKey;
|
|
795
|
+
const opts = config.options || {};
|
|
796
|
+
this.apiKey = opts.apiKey || process.env.PINECONE_API_KEY || "";
|
|
798
797
|
}
|
|
799
798
|
static getValidator() {
|
|
800
799
|
return {
|
|
801
800
|
validate(config) {
|
|
802
801
|
const errors = [];
|
|
803
802
|
const opts = config.options || {};
|
|
804
|
-
|
|
803
|
+
const hasLicenseKey = Boolean(
|
|
804
|
+
config.licenseKey || process.env.RETRIVORA_LICENSE_KEY || process.env.NEXT_PUBLIC_RETRIVORA_LICENSE_KEY
|
|
805
|
+
);
|
|
806
|
+
if (!opts.apiKey && !hasLicenseKey) {
|
|
805
807
|
errors.push({
|
|
806
808
|
field: "vectorDb.options.apiKey",
|
|
807
|
-
message: "Pinecone API key is required",
|
|
808
|
-
suggestion: "Set PINECONE_API_KEY environment variable",
|
|
809
|
+
message: "Pinecone API key is required when RETRIVORA_LICENSE_KEY is not set",
|
|
810
|
+
suggestion: "Set PINECONE_API_KEY environment variable or supply RETRIVORA_LICENSE_KEY for keyless vector storage",
|
|
809
811
|
severity: "error"
|
|
810
812
|
});
|
|
811
813
|
}
|
|
@@ -852,7 +854,12 @@ var init_PineconeProvider = __esm({
|
|
|
852
854
|
}
|
|
853
855
|
async initialize() {
|
|
854
856
|
var _a2, _b;
|
|
855
|
-
|
|
857
|
+
const key = this.apiKey || process.env.PINECONE_API_KEY || "";
|
|
858
|
+
if (!key) {
|
|
859
|
+
console.log("[PineconeProvider] Keyless Mode active \u2014 Vector operations managed via Retrivora Cloud Gateway.");
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
this.client = new Pinecone({ apiKey: key });
|
|
856
863
|
const indexes = await this.client.listIndexes();
|
|
857
864
|
const names = (_b = (_a2 = indexes.indexes) == null ? void 0 : _a2.map((i) => i.name)) != null ? _b : [];
|
|
858
865
|
if (!names.includes(this.indexName)) {
|
|
@@ -5212,7 +5219,7 @@ var ConfigValidator = class {
|
|
|
5212
5219
|
// package.json
|
|
5213
5220
|
var package_default = {
|
|
5214
5221
|
name: "@retrivora-ai/rag-engine",
|
|
5215
|
-
version: "2.1.
|
|
5222
|
+
version: "2.1.9",
|
|
5216
5223
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
5217
5224
|
author: "Abhinav Alkuchi",
|
|
5218
5225
|
license: "UNLICENSED",
|
package/dist/index.js
CHANGED
|
@@ -3563,7 +3563,7 @@ function ChatWidget({ position = "bottom-right", onAddToCart, apiUrl, retrivoraA
|
|
|
3563
3563
|
// package.json
|
|
3564
3564
|
var package_default = {
|
|
3565
3565
|
name: "@retrivora-ai/rag-engine",
|
|
3566
|
-
version: "2.1.
|
|
3566
|
+
version: "2.1.9",
|
|
3567
3567
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
3568
3568
|
author: "Abhinav Alkuchi",
|
|
3569
3569
|
license: "UNLICENSED",
|
package/dist/index.mjs
CHANGED
|
@@ -3564,7 +3564,7 @@ function ChatWidget({ position = "bottom-right", onAddToCart, apiUrl, retrivoraA
|
|
|
3564
3564
|
// package.json
|
|
3565
3565
|
var package_default = {
|
|
3566
3566
|
name: "@retrivora-ai/rag-engine",
|
|
3567
|
-
version: "2.1.
|
|
3567
|
+
version: "2.1.9",
|
|
3568
3568
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
3569
3569
|
author: "Abhinav Alkuchi",
|
|
3570
3570
|
license: "UNLICENSED",
|
package/dist/server.js
CHANGED
|
@@ -807,20 +807,22 @@ var init_PineconeProvider = __esm({
|
|
|
807
807
|
PineconeProvider = class extends BaseVectorProvider {
|
|
808
808
|
constructor(config) {
|
|
809
809
|
super(config);
|
|
810
|
-
const opts = config.options;
|
|
811
|
-
|
|
812
|
-
this.apiKey = opts.apiKey;
|
|
810
|
+
const opts = config.options || {};
|
|
811
|
+
this.apiKey = opts.apiKey || process.env.PINECONE_API_KEY || "";
|
|
813
812
|
}
|
|
814
813
|
static getValidator() {
|
|
815
814
|
return {
|
|
816
815
|
validate(config) {
|
|
817
816
|
const errors = [];
|
|
818
817
|
const opts = config.options || {};
|
|
819
|
-
|
|
818
|
+
const hasLicenseKey = Boolean(
|
|
819
|
+
config.licenseKey || process.env.RETRIVORA_LICENSE_KEY || process.env.NEXT_PUBLIC_RETRIVORA_LICENSE_KEY
|
|
820
|
+
);
|
|
821
|
+
if (!opts.apiKey && !hasLicenseKey) {
|
|
820
822
|
errors.push({
|
|
821
823
|
field: "vectorDb.options.apiKey",
|
|
822
|
-
message: "Pinecone API key is required",
|
|
823
|
-
suggestion: "Set PINECONE_API_KEY environment variable",
|
|
824
|
+
message: "Pinecone API key is required when RETRIVORA_LICENSE_KEY is not set",
|
|
825
|
+
suggestion: "Set PINECONE_API_KEY environment variable or supply RETRIVORA_LICENSE_KEY for keyless vector storage",
|
|
824
826
|
severity: "error"
|
|
825
827
|
});
|
|
826
828
|
}
|
|
@@ -867,7 +869,12 @@ var init_PineconeProvider = __esm({
|
|
|
867
869
|
}
|
|
868
870
|
async initialize() {
|
|
869
871
|
var _a2, _b;
|
|
870
|
-
|
|
872
|
+
const key = this.apiKey || process.env.PINECONE_API_KEY || "";
|
|
873
|
+
if (!key) {
|
|
874
|
+
console.log("[PineconeProvider] Keyless Mode active \u2014 Vector operations managed via Retrivora Cloud Gateway.");
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
this.client = new import_pinecone.Pinecone({ apiKey: key });
|
|
871
878
|
const indexes = await this.client.listIndexes();
|
|
872
879
|
const names = (_b = (_a2 = indexes.indexes) == null ? void 0 : _a2.map((i) => i.name)) != null ? _b : [];
|
|
873
880
|
if (!names.includes(this.indexName)) {
|
|
@@ -5348,7 +5355,7 @@ var ConfigValidator = class {
|
|
|
5348
5355
|
// package.json
|
|
5349
5356
|
var package_default = {
|
|
5350
5357
|
name: "@retrivora-ai/rag-engine",
|
|
5351
|
-
version: "2.1.
|
|
5358
|
+
version: "2.1.9",
|
|
5352
5359
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
5353
5360
|
author: "Abhinav Alkuchi",
|
|
5354
5361
|
license: "UNLICENSED",
|
package/dist/server.mjs
CHANGED
|
@@ -792,20 +792,22 @@ var init_PineconeProvider = __esm({
|
|
|
792
792
|
PineconeProvider = class extends BaseVectorProvider {
|
|
793
793
|
constructor(config) {
|
|
794
794
|
super(config);
|
|
795
|
-
const opts = config.options;
|
|
796
|
-
|
|
797
|
-
this.apiKey = opts.apiKey;
|
|
795
|
+
const opts = config.options || {};
|
|
796
|
+
this.apiKey = opts.apiKey || process.env.PINECONE_API_KEY || "";
|
|
798
797
|
}
|
|
799
798
|
static getValidator() {
|
|
800
799
|
return {
|
|
801
800
|
validate(config) {
|
|
802
801
|
const errors = [];
|
|
803
802
|
const opts = config.options || {};
|
|
804
|
-
|
|
803
|
+
const hasLicenseKey = Boolean(
|
|
804
|
+
config.licenseKey || process.env.RETRIVORA_LICENSE_KEY || process.env.NEXT_PUBLIC_RETRIVORA_LICENSE_KEY
|
|
805
|
+
);
|
|
806
|
+
if (!opts.apiKey && !hasLicenseKey) {
|
|
805
807
|
errors.push({
|
|
806
808
|
field: "vectorDb.options.apiKey",
|
|
807
|
-
message: "Pinecone API key is required",
|
|
808
|
-
suggestion: "Set PINECONE_API_KEY environment variable",
|
|
809
|
+
message: "Pinecone API key is required when RETRIVORA_LICENSE_KEY is not set",
|
|
810
|
+
suggestion: "Set PINECONE_API_KEY environment variable or supply RETRIVORA_LICENSE_KEY for keyless vector storage",
|
|
809
811
|
severity: "error"
|
|
810
812
|
});
|
|
811
813
|
}
|
|
@@ -852,7 +854,12 @@ var init_PineconeProvider = __esm({
|
|
|
852
854
|
}
|
|
853
855
|
async initialize() {
|
|
854
856
|
var _a2, _b;
|
|
855
|
-
|
|
857
|
+
const key = this.apiKey || process.env.PINECONE_API_KEY || "";
|
|
858
|
+
if (!key) {
|
|
859
|
+
console.log("[PineconeProvider] Keyless Mode active \u2014 Vector operations managed via Retrivora Cloud Gateway.");
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
this.client = new Pinecone({ apiKey: key });
|
|
856
863
|
const indexes = await this.client.listIndexes();
|
|
857
864
|
const names = (_b = (_a2 = indexes.indexes) == null ? void 0 : _a2.map((i) => i.name)) != null ? _b : [];
|
|
858
865
|
if (!names.includes(this.indexName)) {
|
|
@@ -5251,7 +5258,7 @@ var ConfigValidator = class {
|
|
|
5251
5258
|
// package.json
|
|
5252
5259
|
var package_default = {
|
|
5253
5260
|
name: "@retrivora-ai/rag-engine",
|
|
5254
|
-
version: "2.1.
|
|
5261
|
+
version: "2.1.9",
|
|
5255
5262
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
5256
5263
|
author: "Abhinav Alkuchi",
|
|
5257
5264
|
license: "UNLICENSED",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retrivora-ai/rag-engine",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
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",
|
|
@@ -14,9 +14,8 @@ export class PineconeProvider extends BaseVectorProvider {
|
|
|
14
14
|
|
|
15
15
|
constructor(config: VectorDBConfig) {
|
|
16
16
|
super(config);
|
|
17
|
-
const opts = config.options as Record<string, string>;
|
|
18
|
-
|
|
19
|
-
this.apiKey = opts.apiKey;
|
|
17
|
+
const opts = (config.options || {}) as Record<string, string>;
|
|
18
|
+
this.apiKey = opts.apiKey || process.env.PINECONE_API_KEY || '';
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
static getValidator(): IProviderValidator {
|
|
@@ -24,12 +23,17 @@ export class PineconeProvider extends BaseVectorProvider {
|
|
|
24
23
|
validate(config: Record<string, unknown>): ValidationError[] {
|
|
25
24
|
const errors: ValidationError[] = [];
|
|
26
25
|
const opts = (config.options || {}) as Record<string, unknown>;
|
|
26
|
+
const hasLicenseKey = Boolean(
|
|
27
|
+
config.licenseKey ||
|
|
28
|
+
process.env.RETRIVORA_LICENSE_KEY ||
|
|
29
|
+
process.env.NEXT_PUBLIC_RETRIVORA_LICENSE_KEY
|
|
30
|
+
);
|
|
27
31
|
|
|
28
|
-
if (!opts.apiKey) {
|
|
32
|
+
if (!opts.apiKey && !hasLicenseKey) {
|
|
29
33
|
errors.push({
|
|
30
34
|
field: 'vectorDb.options.apiKey',
|
|
31
|
-
message: 'Pinecone API key is required',
|
|
32
|
-
suggestion: 'Set PINECONE_API_KEY environment variable',
|
|
35
|
+
message: 'Pinecone API key is required when RETRIVORA_LICENSE_KEY is not set',
|
|
36
|
+
suggestion: 'Set PINECONE_API_KEY environment variable or supply RETRIVORA_LICENSE_KEY for keyless vector storage',
|
|
33
37
|
severity: 'error',
|
|
34
38
|
});
|
|
35
39
|
}
|
|
@@ -78,7 +82,12 @@ export class PineconeProvider extends BaseVectorProvider {
|
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
async initialize(): Promise<void> {
|
|
81
|
-
|
|
85
|
+
const key = this.apiKey || process.env.PINECONE_API_KEY || '';
|
|
86
|
+
if (!key) {
|
|
87
|
+
console.log('[PineconeProvider] Keyless Mode active — Vector operations managed via Retrivora Cloud Gateway.');
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.client = new Pinecone({ apiKey: key });
|
|
82
91
|
const indexes = await this.client.listIndexes();
|
|
83
92
|
const names = indexes.indexes?.map((i) => i.name) ?? [];
|
|
84
93
|
if (!names.includes(this.indexName)) {
|