@retrivora-ai/rag-engine 0.3.7 → 0.3.8

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MongoDBProvider
3
- } from "./chunk-DESUAKF3.mjs";
3
+ } from "./chunk-WKBINM4Z.mjs";
4
4
  import "./chunk-IMP6FUCY.mjs";
5
5
  import "./chunk-FWCSY2DS.mjs";
6
6
  export {
@@ -1079,7 +1079,6 @@ ${context}`;
1079
1079
  }
1080
1080
  async batchEmbed(texts, options) {
1081
1081
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
1082
- const vectors = [];
1083
1082
  const model = this.sanitizeModel(
1084
1083
  (_c = (_b = options == null ? void 0 : options.model) != null ? _b : (_a = this.embeddingConfig) == null ? void 0 : _a.model) != null ? _c : "text-embedding-004"
1085
1084
  );
@@ -1379,7 +1378,7 @@ var ProviderRegistry = class {
1379
1378
  return new PostgreSQLProvider(config);
1380
1379
  }
1381
1380
  case "mongodb": {
1382
- const { MongoDBProvider } = await import("./MongoDBProvider-6X5F5YZS.mjs");
1381
+ const { MongoDBProvider } = await import("./MongoDBProvider-APKBGMST.mjs");
1383
1382
  return new MongoDBProvider(config);
1384
1383
  }
1385
1384
  case "milvus": {
@@ -56,7 +56,7 @@ var MongoDBProvider = class extends BaseVectorProvider {
56
56
  const pipeline = [
57
57
  {
58
58
  $vectorSearch: __spreadValues({
59
- index: this.config.options.indexName || "vector_index",
59
+ index: this.config.indexName || "vector_index",
60
60
  path: this.embeddingKey,
61
61
  queryVector: vector,
62
62
  numCandidates: Math.max(topK * 10, 100),
@@ -424,7 +424,7 @@ var init_MongoDBProvider = __esm({
424
424
  const pipeline = [
425
425
  {
426
426
  $vectorSearch: __spreadValues({
427
- index: this.config.options.indexName || "vector_index",
427
+ index: this.config.indexName || "vector_index",
428
428
  path: this.embeddingKey,
429
429
  queryVector: vector,
430
430
  numCandidates: Math.max(topK * 10, 100),
@@ -2273,7 +2273,6 @@ ${context}`;
2273
2273
  }
2274
2274
  async batchEmbed(texts, options) {
2275
2275
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2276
- const vectors = [];
2277
2276
  const model = this.sanitizeModel(
2278
2277
  (_c = (_b = options == null ? void 0 : options.model) != null ? _b : (_a = this.embeddingConfig) == null ? void 0 : _a.model) != null ? _c : "text-embedding-004"
2279
2278
  );
@@ -3,7 +3,7 @@ import {
3
3
  createHealthHandler,
4
4
  createIngestHandler,
5
5
  createUploadHandler
6
- } from "../chunk-TYZC74CO.mjs";
6
+ } from "../chunk-FIOUSUW7.mjs";
7
7
  import "../chunk-EDLTMSNY.mjs";
8
8
  import "../chunk-FWCSY2DS.mjs";
9
9
  export {
package/dist/server.js CHANGED
@@ -436,7 +436,7 @@ var init_MongoDBProvider = __esm({
436
436
  const pipeline = [
437
437
  {
438
438
  $vectorSearch: __spreadValues({
439
- index: this.config.options.indexName || "vector_index",
439
+ index: this.config.indexName || "vector_index",
440
440
  path: this.embeddingKey,
441
441
  queryVector: vector,
442
442
  numCandidates: Math.max(topK * 10, 100),
@@ -2317,7 +2317,6 @@ ${context}`;
2317
2317
  }
2318
2318
  async batchEmbed(texts, options) {
2319
2319
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2320
- const vectors = [];
2321
2320
  const model = this.sanitizeModel(
2322
2321
  (_c = (_b = options == null ? void 0 : options.model) != null ? _b : (_a = this.embeddingConfig) == null ? void 0 : _a.model) != null ? _c : "text-embedding-004"
2323
2322
  );
package/dist/server.mjs CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  createIngestHandler,
35
35
  createUploadHandler,
36
36
  getRagConfig
37
- } from "./chunk-TYZC74CO.mjs";
37
+ } from "./chunk-FIOUSUW7.mjs";
38
38
  import "./chunk-EDLTMSNY.mjs";
39
39
  import {
40
40
  PineconeProvider
@@ -44,7 +44,7 @@ import {
44
44
  } from "./chunk-LJWWPTWE.mjs";
45
45
  import {
46
46
  MongoDBProvider
47
- } from "./chunk-DESUAKF3.mjs";
47
+ } from "./chunk-WKBINM4Z.mjs";
48
48
  import {
49
49
  MilvusProvider
50
50
  } from "./chunk-3QWAK3RZ.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retrivora-ai/rag-engine",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
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": "MIT",
@@ -512,7 +512,7 @@ export class ConfigValidator {
512
512
  }
513
513
 
514
514
  if (config.borderRadius) {
515
- if (!UI_BORDER_RADIUS_OPTIONS.includes(config.borderRadius as any)) {
515
+ if (!UI_BORDER_RADIUS_OPTIONS.includes(config.borderRadius as (typeof UI_BORDER_RADIUS_OPTIONS)[number])) {
516
516
  errors.push({
517
517
  field: 'ui.borderRadius',
518
518
  message: `borderRadius must be one of: ${UI_BORDER_RADIUS_OPTIONS.join(', ')}`,
@@ -522,7 +522,7 @@ export class ConfigValidator {
522
522
  }
523
523
 
524
524
  if (config.visualStyle) {
525
- if (!UI_VISUAL_STYLES.includes(config.visualStyle as any)) {
525
+ if (!UI_VISUAL_STYLES.includes(config.visualStyle as (typeof UI_VISUAL_STYLES)[number])) {
526
526
  errors.push({
527
527
  field: 'ui.visualStyle',
528
528
  message: `visualStyle must be one of: ${UI_VISUAL_STYLES.join(', ')}`,
@@ -120,7 +120,6 @@ export class GeminiProvider implements ILLMProvider {
120
120
  }
121
121
 
122
122
  async batchEmbed(texts: string[], options?: EmbedOptions): Promise<number[][]> {
123
- const vectors: number[][] = [];
124
123
  // Sequential fallback for Gemini (API doesn't have a direct batch endpoint in the same way, though you can pass multiple contents.
125
124
  // For simplicity and to match the other providers' structure, we'll iterate or pass array.
126
125
  // The new SDK supports an array of contents.
@@ -71,7 +71,7 @@ export class MongoDBProvider extends BaseVectorProvider {
71
71
  const pipeline: Record<string, unknown>[] = [
72
72
  {
73
73
  $vectorSearch: {
74
- index: this.config.options.indexName || 'vector_index',
74
+ index: this.config.indexName || 'vector_index',
75
75
  path: this.embeddingKey,
76
76
  queryVector: vector,
77
77
  numCandidates: Math.max(topK * 10, 100),
@@ -71,7 +71,7 @@ export class PineconeProvider extends BaseVectorProvider {
71
71
  vector,
72
72
  topK,
73
73
  includeMetadata: true,
74
- ...(Object.keys(pineconeFilter).length > 0 ? { filter: pineconeFilter as any } : {}),
74
+ ...(Object.keys(pineconeFilter).length > 0 ? { filter: pineconeFilter as Record<string, string | number | boolean | string[] | number[]> } : {}),
75
75
  });
76
76
  return (result.matches ?? []).map((m) => ({
77
77
  id: m.id,