@retrivora-ai/rag-engine 0.1.3 → 0.1.4

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.
Files changed (73) hide show
  1. package/dist/ChromaDBProvider-QNI7UCX4.mjs +8 -0
  2. package/dist/DocumentChunker-BQ5kQD7B.d.ts +155 -0
  3. package/dist/DocumentChunker-D9-fObJp.d.mts +155 -0
  4. package/dist/LLMFactory-XC55FTD2.mjs +7 -0
  5. package/dist/MilvusProvider-OO6QGZDZ.mjs +8 -0
  6. package/dist/MongoDBProvider-WWVJG3WT.mjs +8 -0
  7. package/dist/PineconeProvider-NJ675H7U.mjs +8 -0
  8. package/dist/{RAGPipeline-BmkIv1HD.d.mts → Pipeline-Bo6CUCox.d.mts} +76 -159
  9. package/dist/{RAGPipeline-BmkIv1HD.d.ts → Pipeline-Bo6CUCox.d.ts} +76 -159
  10. package/dist/PostgreSQLProvider-ISNMD3BE.mjs +8 -0
  11. package/dist/QdrantProvider-LJWOIGES.mjs +8 -0
  12. package/dist/RedisProvider-ASONNYBI.mjs +8 -0
  13. package/dist/WeaviateProvider-PSDCUGC7.mjs +8 -0
  14. package/dist/chunk-6FODXNUF.mjs +91 -0
  15. package/dist/chunk-7NXI6ZWX.mjs +89 -0
  16. package/dist/chunk-AALIF3AL.mjs +91 -0
  17. package/dist/chunk-AIAB2IEE.mjs +394 -0
  18. package/dist/chunk-FGGSVVSY.mjs +162 -0
  19. package/dist/chunk-GD3QJFNN.mjs +424 -0
  20. package/dist/chunk-HUGLYKD6.mjs +84 -0
  21. package/dist/chunk-I4E63NIC.mjs +24 -0
  22. package/dist/chunk-QEYVWVT5.mjs +102 -0
  23. package/dist/chunk-S5DRHETN.mjs +110 -0
  24. package/dist/chunk-V75V7BT2.mjs +117 -0
  25. package/dist/chunk-VOIWNO5O.mjs +11 -0
  26. package/dist/chunk-VPNRDXIA.mjs +74 -0
  27. package/dist/handlers/index.d.mts +9 -33
  28. package/dist/handlers/index.d.ts +9 -33
  29. package/dist/handlers/index.js +1477 -962
  30. package/dist/handlers/index.mjs +4 -2
  31. package/dist/index.d.mts +3 -3
  32. package/dist/index.d.ts +3 -3
  33. package/dist/index.js +1646 -19
  34. package/dist/index.mjs +14 -2
  35. package/dist/server.d.mts +93 -56
  36. package/dist/server.d.ts +93 -56
  37. package/dist/server.js +1531 -1099
  38. package/dist/server.mjs +56 -131
  39. package/package.json +1 -1
  40. package/src/app/page.tsx +1 -1
  41. package/src/components/MessageBubble.tsx +1 -1
  42. package/src/components/SourceCard.tsx +1 -1
  43. package/src/config/RagConfig.ts +1 -1
  44. package/src/config/serverConfig.ts +2 -2
  45. package/src/core/ConfigResolver.ts +69 -0
  46. package/src/core/Pipeline.ts +109 -0
  47. package/src/core/ProviderRegistry.ts +71 -0
  48. package/src/core/VectorPlugin.ts +51 -0
  49. package/src/handlers/index.ts +21 -100
  50. package/src/hooks/useRagChat.ts +1 -1
  51. package/src/index.ts +8 -6
  52. package/src/providers/vectordb/BaseVectorProvider.ts +61 -0
  53. package/src/providers/vectordb/ChromaDBProvider.ts +94 -0
  54. package/src/providers/vectordb/MilvusProvider.ts +100 -0
  55. package/src/providers/vectordb/MongoDBProvider.ts +118 -0
  56. package/src/{vectordb/adapters/PineconeAdapter.ts → providers/vectordb/PineconeProvider.ts} +21 -56
  57. package/src/{vectordb/adapters/PgVectorAdapter.ts → providers/vectordb/PostgreSQLProvider.ts} +23 -58
  58. package/src/providers/vectordb/QdrantProvider.ts +95 -0
  59. package/src/providers/vectordb/RedisProvider.ts +84 -0
  60. package/src/providers/vectordb/WeaviateProvider.ts +124 -0
  61. package/src/server.ts +16 -8
  62. package/src/test-refactor.ts +59 -0
  63. package/src/types/index.ts +13 -0
  64. package/src/utils/templateUtils.ts +6 -6
  65. package/dist/DocumentChunker-BUrIrcPk.d.mts +0 -43
  66. package/dist/DocumentChunker-BUrIrcPk.d.ts +0 -43
  67. package/dist/chunk-NVOMLHXW.mjs +0 -1259
  68. package/dist/chunk-ZPXLQR5Q.mjs +0 -67
  69. package/src/rag/RAGPipeline.ts +0 -200
  70. package/src/vectordb/IVectorDB.ts +0 -75
  71. package/src/vectordb/VectorDBFactory.ts +0 -41
  72. package/src/vectordb/adapters/MongoDbAdapter.ts +0 -175
  73. package/src/vectordb/adapters/UniversalVectorDBAdapter.ts +0 -177
package/dist/index.mjs CHANGED
@@ -1,7 +1,15 @@
1
1
  import {
2
- __spreadValues,
2
+ ConfigResolver,
3
+ Pipeline,
4
+ ProviderRegistry,
5
+ VectorPlugin
6
+ } from "./chunk-AIAB2IEE.mjs";
7
+ import {
3
8
  mergeDefined
4
- } from "./chunk-ZPXLQR5Q.mjs";
9
+ } from "./chunk-GD3QJFNN.mjs";
10
+ import {
11
+ __spreadValues
12
+ } from "./chunk-I4E63NIC.mjs";
5
13
 
6
14
  // src/components/ChatWidget.tsx
7
15
  import { useState as useState4 } from "react";
@@ -545,8 +553,12 @@ export {
545
553
  ChatWidget,
546
554
  ChatWindow,
547
555
  ConfigProvider,
556
+ ConfigResolver,
548
557
  MessageBubble,
558
+ Pipeline,
559
+ ProviderRegistry,
549
560
  SourceCard,
561
+ VectorPlugin,
550
562
  useConfig,
551
563
  useRagChat
552
564
  };
package/dist/server.d.mts CHANGED
@@ -1,6 +1,7 @@
1
- import { f as RagConfig, h as VectorDBConfig, d as IVectorDB, g as UpsertDocument, V as VectorMatch, L as LLMConfig, c as EmbeddingConfig, I as ILLMProvider, C as ChatMessage, a as ChatOptions, E as EmbedOptions } from './RAGPipeline-BmkIv1HD.mjs';
2
- export { b as ChatResponse, e as IngestDocument, R as RAGConfig, i as RAGPipeline, U as UIConfig } from './RAGPipeline-BmkIv1HD.mjs';
3
- export { C as Chunk, a as ChunkOptions, D as DocumentChunker } from './DocumentChunker-BUrIrcPk.mjs';
1
+ import { e as RagConfig, g as VectorDBConfig, f as UpsertDocument, V as VectorMatch, L as LLMConfig, c as EmbeddingConfig, I as ILLMProvider, C as ChatMessage, a as ChatOptions, E as EmbedOptions } from './Pipeline-Bo6CUCox.mjs';
2
+ export { b as ChatResponse, d as IngestDocument, P as Pipeline, R as RAGConfig, U as UIConfig } from './Pipeline-Bo6CUCox.mjs';
3
+ import { B as BaseVectorProvider } from './DocumentChunker-D9-fObJp.mjs';
4
+ export { C as Chunk, a as ChunkOptions, b as ConfigResolver, D as DocumentChunker, P as ProviderRegistry, V as VectorPlugin } from './DocumentChunker-D9-fObJp.mjs';
4
5
  export { createChatHandler, createHealthHandler, createIngestHandler, createUploadHandler } from './handlers/index.mjs';
5
6
  import 'next/server';
6
7
 
@@ -13,30 +14,8 @@ import 'next/server';
13
14
 
14
15
  declare function getRagConfig(env?: Record<string, string | undefined>): RagConfig;
15
16
 
16
- /**
17
- * VectorDBFactory — instantiates the correct IVectorDB adapter
18
- * based on the VectorDBConfig.provider value.
19
- *
20
- * Usage:
21
- * const db = VectorDBFactory.create(config.vectorDb);
22
- * await db.initialize();
23
- */
24
-
25
- declare class VectorDBFactory {
26
- static create(config: VectorDBConfig): IVectorDB;
27
- }
28
-
29
- /**
30
- * Pinecone Vector DB Adapter
31
- *
32
- * Required options in VectorDBConfig.options:
33
- * - apiKey: string – Pinecone API key
34
- * - environment?: string – Pinecone environment (legacy, optional for new projects)
35
- */
36
-
37
- declare class PineconeAdapter implements IVectorDB {
17
+ declare class PineconeProvider extends BaseVectorProvider {
38
18
  private client;
39
- private readonly indexName;
40
19
  private readonly apiKey;
41
20
  constructor(config: VectorDBConfig);
42
21
  initialize(): Promise<void>;
@@ -51,21 +30,13 @@ declare class PineconeAdapter implements IVectorDB {
51
30
  }
52
31
 
53
32
  /**
54
- * pgVector Adapter
55
- *
56
- * Stores embeddings in a PostgreSQL table using the pgvector extension.
57
- * Required options in VectorDBConfig.options:
58
- * - connectionString: string – PostgreSQL connection string
59
- * - dimensions?: number – vector dimensions (default 1536 for OpenAI ada-002)
60
- *
61
- * The adapter auto-creates the table and index on initialize().
33
+ * PostgreSQLProvider — PostgreSQL implementation using the pgvector extension.
62
34
  */
63
-
64
- declare class PgVectorAdapter implements IVectorDB {
35
+ declare class PostgreSQLProvider extends BaseVectorProvider {
65
36
  private pool;
66
- private readonly tableName;
67
37
  private readonly dimensions;
68
38
  private readonly connectionString;
39
+ private readonly tableName;
69
40
  constructor(config: VectorDBConfig);
70
41
  initialize(): Promise<void>;
71
42
  upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
@@ -78,33 +49,18 @@ declare class PgVectorAdapter implements IVectorDB {
78
49
  }
79
50
 
80
51
  /**
81
- * MongoDB Adapter for Atlas Vector Search.
82
- *
83
- * Requirements:
84
- * 1. A MongoDB Atlas cluster (v6.0.11+, v7.0.2+).
85
- * 2. A Vector Search Index created on the collection.
86
- *
87
- * Config Options:
88
- * - uri: string (Required)
89
- * - database: string (Required)
90
- * - collection: string (Required)
91
- * - indexName: string (Default: 'vector_index')
92
- * - embeddingKey: string (Default: 'embedding')
93
- * - contentKey: string (Default: 'content')
94
- * - metadataKey: string (Default: 'metadata')
52
+ * MongoDBProvider MongoDB Atlas Vector Search implementation.
95
53
  */
96
- declare class MongoDbAdapter implements IVectorDB {
54
+ declare class MongoDBProvider extends BaseVectorProvider {
97
55
  private client;
98
56
  private db?;
99
57
  private collection?;
100
- private uri;
101
58
  private dbName;
102
59
  private collectionName;
103
- private indexName;
104
60
  private embeddingKey;
105
61
  private contentKey;
106
62
  private metadataKey;
107
- constructor(options: Record<string, unknown>);
63
+ constructor(config: VectorDBConfig);
108
64
  initialize(): Promise<void>;
109
65
  upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
110
66
  batchUpsert(docs: UpsertDocument[], namespace?: string): Promise<void>;
@@ -115,6 +71,87 @@ declare class MongoDbAdapter implements IVectorDB {
115
71
  disconnect(): Promise<void>;
116
72
  }
117
73
 
74
+ /**
75
+ * MilvusProvider — implementation for Milvus using its REST API.
76
+ */
77
+ declare class MilvusProvider extends BaseVectorProvider {
78
+ private http;
79
+ constructor(config: VectorDBConfig);
80
+ initialize(): Promise<void>;
81
+ upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
82
+ batchUpsert(docs: UpsertDocument[], namespace?: string): Promise<void>;
83
+ query(vector: number[], topK: number, namespace?: string, _filter?: Record<string, unknown>): Promise<VectorMatch[]>;
84
+ delete(id: string, _namespace?: string): Promise<void>;
85
+ deleteNamespace(_namespace: string): Promise<void>;
86
+ ping(): Promise<boolean>;
87
+ disconnect(): Promise<void>;
88
+ }
89
+
90
+ /**
91
+ * QdrantProvider — implementation for Qdrant using its REST API.
92
+ */
93
+ declare class QdrantProvider extends BaseVectorProvider {
94
+ private http;
95
+ constructor(config: VectorDBConfig);
96
+ initialize(): Promise<void>;
97
+ upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
98
+ batchUpsert(docs: UpsertDocument[], namespace?: string): Promise<void>;
99
+ query(vector: number[], topK: number, namespace?: string, _filter?: Record<string, unknown>): Promise<VectorMatch[]>;
100
+ delete(id: string, _namespace?: string): Promise<void>;
101
+ deleteNamespace(_namespace: string): Promise<void>;
102
+ ping(): Promise<boolean>;
103
+ disconnect(): Promise<void>;
104
+ }
105
+
106
+ /**
107
+ * ChromaDBProvider — implementation for ChromaDB using its REST API.
108
+ */
109
+ declare class ChromaDBProvider extends BaseVectorProvider {
110
+ private http;
111
+ private collectionId;
112
+ constructor(config: VectorDBConfig);
113
+ initialize(): Promise<void>;
114
+ upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
115
+ batchUpsert(docs: UpsertDocument[], namespace?: string): Promise<void>;
116
+ query(vector: number[], topK: number, namespace?: string, _filter?: Record<string, unknown>): Promise<VectorMatch[]>;
117
+ delete(id: string, _namespace?: string): Promise<void>;
118
+ deleteNamespace(_namespace: string): Promise<void>;
119
+ ping(): Promise<boolean>;
120
+ disconnect(): Promise<void>;
121
+ }
122
+
123
+ /**
124
+ * RedisProvider — implementation for Redis (e.g. Upstash) using its REST API.
125
+ */
126
+ declare class RedisProvider extends BaseVectorProvider {
127
+ private http;
128
+ constructor(config: VectorDBConfig);
129
+ initialize(): Promise<void>;
130
+ upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
131
+ batchUpsert(docs: UpsertDocument[], namespace?: string): Promise<void>;
132
+ query(vector: number[], topK: number, namespace?: string, _filter?: Record<string, unknown>): Promise<VectorMatch[]>;
133
+ delete(id: string, namespace?: string): Promise<void>;
134
+ deleteNamespace(_namespace: string): Promise<void>;
135
+ ping(): Promise<boolean>;
136
+ disconnect(): Promise<void>;
137
+ }
138
+
139
+ /**
140
+ * WeaviateProvider — implementation for Weaviate using its REST/GraphQL API.
141
+ */
142
+ declare class WeaviateProvider extends BaseVectorProvider {
143
+ private http;
144
+ constructor(config: VectorDBConfig);
145
+ initialize(): Promise<void>;
146
+ upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
147
+ batchUpsert(docs: UpsertDocument[], namespace?: string): Promise<void>;
148
+ query(vector: number[], topK: number, namespace?: string, _filter?: Record<string, unknown>): Promise<VectorMatch[]>;
149
+ delete(id: string, _namespace?: string): Promise<void>;
150
+ deleteNamespace(namespace: string): Promise<void>;
151
+ ping(): Promise<boolean>;
152
+ disconnect(): Promise<void>;
153
+ }
154
+
118
155
  /**
119
156
  * LLMFactory — instantiates the correct ILLMProvider based on llmConfig.provider.
120
157
  *
@@ -208,4 +245,4 @@ declare class OllamaProvider implements ILLMProvider {
208
245
  ping(): Promise<boolean>;
209
246
  }
210
247
 
211
- export { AnthropicProvider, ChatMessage, ChatOptions, EmbedOptions, EmbeddingConfig, ILLMProvider, IVectorDB, LLMConfig, LLMFactory, MongoDbAdapter, OllamaProvider, OpenAIProvider, PgVectorAdapter, PineconeAdapter, RagConfig, UpsertDocument, VectorDBConfig, VectorDBFactory, VectorMatch, getRagConfig };
248
+ export { AnthropicProvider, BaseVectorProvider, ChatMessage, ChatOptions, ChromaDBProvider, EmbedOptions, EmbeddingConfig, ILLMProvider, LLMConfig, LLMFactory, MilvusProvider, MongoDBProvider, OllamaProvider, OpenAIProvider, PineconeProvider, PostgreSQLProvider, QdrantProvider, RagConfig, RedisProvider, UpsertDocument, VectorDBConfig, VectorMatch, WeaviateProvider, getRagConfig };
package/dist/server.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import { f as RagConfig, h as VectorDBConfig, d as IVectorDB, g as UpsertDocument, V as VectorMatch, L as LLMConfig, c as EmbeddingConfig, I as ILLMProvider, C as ChatMessage, a as ChatOptions, E as EmbedOptions } from './RAGPipeline-BmkIv1HD.js';
2
- export { b as ChatResponse, e as IngestDocument, R as RAGConfig, i as RAGPipeline, U as UIConfig } from './RAGPipeline-BmkIv1HD.js';
3
- export { C as Chunk, a as ChunkOptions, D as DocumentChunker } from './DocumentChunker-BUrIrcPk.js';
1
+ import { e as RagConfig, g as VectorDBConfig, f as UpsertDocument, V as VectorMatch, L as LLMConfig, c as EmbeddingConfig, I as ILLMProvider, C as ChatMessage, a as ChatOptions, E as EmbedOptions } from './Pipeline-Bo6CUCox.js';
2
+ export { b as ChatResponse, d as IngestDocument, P as Pipeline, R as RAGConfig, U as UIConfig } from './Pipeline-Bo6CUCox.js';
3
+ import { B as BaseVectorProvider } from './DocumentChunker-BQ5kQD7B.js';
4
+ export { C as Chunk, a as ChunkOptions, b as ConfigResolver, D as DocumentChunker, P as ProviderRegistry, V as VectorPlugin } from './DocumentChunker-BQ5kQD7B.js';
4
5
  export { createChatHandler, createHealthHandler, createIngestHandler, createUploadHandler } from './handlers/index.js';
5
6
  import 'next/server';
6
7
 
@@ -13,30 +14,8 @@ import 'next/server';
13
14
 
14
15
  declare function getRagConfig(env?: Record<string, string | undefined>): RagConfig;
15
16
 
16
- /**
17
- * VectorDBFactory — instantiates the correct IVectorDB adapter
18
- * based on the VectorDBConfig.provider value.
19
- *
20
- * Usage:
21
- * const db = VectorDBFactory.create(config.vectorDb);
22
- * await db.initialize();
23
- */
24
-
25
- declare class VectorDBFactory {
26
- static create(config: VectorDBConfig): IVectorDB;
27
- }
28
-
29
- /**
30
- * Pinecone Vector DB Adapter
31
- *
32
- * Required options in VectorDBConfig.options:
33
- * - apiKey: string – Pinecone API key
34
- * - environment?: string – Pinecone environment (legacy, optional for new projects)
35
- */
36
-
37
- declare class PineconeAdapter implements IVectorDB {
17
+ declare class PineconeProvider extends BaseVectorProvider {
38
18
  private client;
39
- private readonly indexName;
40
19
  private readonly apiKey;
41
20
  constructor(config: VectorDBConfig);
42
21
  initialize(): Promise<void>;
@@ -51,21 +30,13 @@ declare class PineconeAdapter implements IVectorDB {
51
30
  }
52
31
 
53
32
  /**
54
- * pgVector Adapter
55
- *
56
- * Stores embeddings in a PostgreSQL table using the pgvector extension.
57
- * Required options in VectorDBConfig.options:
58
- * - connectionString: string – PostgreSQL connection string
59
- * - dimensions?: number – vector dimensions (default 1536 for OpenAI ada-002)
60
- *
61
- * The adapter auto-creates the table and index on initialize().
33
+ * PostgreSQLProvider — PostgreSQL implementation using the pgvector extension.
62
34
  */
63
-
64
- declare class PgVectorAdapter implements IVectorDB {
35
+ declare class PostgreSQLProvider extends BaseVectorProvider {
65
36
  private pool;
66
- private readonly tableName;
67
37
  private readonly dimensions;
68
38
  private readonly connectionString;
39
+ private readonly tableName;
69
40
  constructor(config: VectorDBConfig);
70
41
  initialize(): Promise<void>;
71
42
  upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
@@ -78,33 +49,18 @@ declare class PgVectorAdapter implements IVectorDB {
78
49
  }
79
50
 
80
51
  /**
81
- * MongoDB Adapter for Atlas Vector Search.
82
- *
83
- * Requirements:
84
- * 1. A MongoDB Atlas cluster (v6.0.11+, v7.0.2+).
85
- * 2. A Vector Search Index created on the collection.
86
- *
87
- * Config Options:
88
- * - uri: string (Required)
89
- * - database: string (Required)
90
- * - collection: string (Required)
91
- * - indexName: string (Default: 'vector_index')
92
- * - embeddingKey: string (Default: 'embedding')
93
- * - contentKey: string (Default: 'content')
94
- * - metadataKey: string (Default: 'metadata')
52
+ * MongoDBProvider MongoDB Atlas Vector Search implementation.
95
53
  */
96
- declare class MongoDbAdapter implements IVectorDB {
54
+ declare class MongoDBProvider extends BaseVectorProvider {
97
55
  private client;
98
56
  private db?;
99
57
  private collection?;
100
- private uri;
101
58
  private dbName;
102
59
  private collectionName;
103
- private indexName;
104
60
  private embeddingKey;
105
61
  private contentKey;
106
62
  private metadataKey;
107
- constructor(options: Record<string, unknown>);
63
+ constructor(config: VectorDBConfig);
108
64
  initialize(): Promise<void>;
109
65
  upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
110
66
  batchUpsert(docs: UpsertDocument[], namespace?: string): Promise<void>;
@@ -115,6 +71,87 @@ declare class MongoDbAdapter implements IVectorDB {
115
71
  disconnect(): Promise<void>;
116
72
  }
117
73
 
74
+ /**
75
+ * MilvusProvider — implementation for Milvus using its REST API.
76
+ */
77
+ declare class MilvusProvider extends BaseVectorProvider {
78
+ private http;
79
+ constructor(config: VectorDBConfig);
80
+ initialize(): Promise<void>;
81
+ upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
82
+ batchUpsert(docs: UpsertDocument[], namespace?: string): Promise<void>;
83
+ query(vector: number[], topK: number, namespace?: string, _filter?: Record<string, unknown>): Promise<VectorMatch[]>;
84
+ delete(id: string, _namespace?: string): Promise<void>;
85
+ deleteNamespace(_namespace: string): Promise<void>;
86
+ ping(): Promise<boolean>;
87
+ disconnect(): Promise<void>;
88
+ }
89
+
90
+ /**
91
+ * QdrantProvider — implementation for Qdrant using its REST API.
92
+ */
93
+ declare class QdrantProvider extends BaseVectorProvider {
94
+ private http;
95
+ constructor(config: VectorDBConfig);
96
+ initialize(): Promise<void>;
97
+ upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
98
+ batchUpsert(docs: UpsertDocument[], namespace?: string): Promise<void>;
99
+ query(vector: number[], topK: number, namespace?: string, _filter?: Record<string, unknown>): Promise<VectorMatch[]>;
100
+ delete(id: string, _namespace?: string): Promise<void>;
101
+ deleteNamespace(_namespace: string): Promise<void>;
102
+ ping(): Promise<boolean>;
103
+ disconnect(): Promise<void>;
104
+ }
105
+
106
+ /**
107
+ * ChromaDBProvider — implementation for ChromaDB using its REST API.
108
+ */
109
+ declare class ChromaDBProvider extends BaseVectorProvider {
110
+ private http;
111
+ private collectionId;
112
+ constructor(config: VectorDBConfig);
113
+ initialize(): Promise<void>;
114
+ upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
115
+ batchUpsert(docs: UpsertDocument[], namespace?: string): Promise<void>;
116
+ query(vector: number[], topK: number, namespace?: string, _filter?: Record<string, unknown>): Promise<VectorMatch[]>;
117
+ delete(id: string, _namespace?: string): Promise<void>;
118
+ deleteNamespace(_namespace: string): Promise<void>;
119
+ ping(): Promise<boolean>;
120
+ disconnect(): Promise<void>;
121
+ }
122
+
123
+ /**
124
+ * RedisProvider — implementation for Redis (e.g. Upstash) using its REST API.
125
+ */
126
+ declare class RedisProvider extends BaseVectorProvider {
127
+ private http;
128
+ constructor(config: VectorDBConfig);
129
+ initialize(): Promise<void>;
130
+ upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
131
+ batchUpsert(docs: UpsertDocument[], namespace?: string): Promise<void>;
132
+ query(vector: number[], topK: number, namespace?: string, _filter?: Record<string, unknown>): Promise<VectorMatch[]>;
133
+ delete(id: string, namespace?: string): Promise<void>;
134
+ deleteNamespace(_namespace: string): Promise<void>;
135
+ ping(): Promise<boolean>;
136
+ disconnect(): Promise<void>;
137
+ }
138
+
139
+ /**
140
+ * WeaviateProvider — implementation for Weaviate using its REST/GraphQL API.
141
+ */
142
+ declare class WeaviateProvider extends BaseVectorProvider {
143
+ private http;
144
+ constructor(config: VectorDBConfig);
145
+ initialize(): Promise<void>;
146
+ upsert(doc: UpsertDocument, namespace?: string): Promise<void>;
147
+ batchUpsert(docs: UpsertDocument[], namespace?: string): Promise<void>;
148
+ query(vector: number[], topK: number, namespace?: string, _filter?: Record<string, unknown>): Promise<VectorMatch[]>;
149
+ delete(id: string, _namespace?: string): Promise<void>;
150
+ deleteNamespace(namespace: string): Promise<void>;
151
+ ping(): Promise<boolean>;
152
+ disconnect(): Promise<void>;
153
+ }
154
+
118
155
  /**
119
156
  * LLMFactory — instantiates the correct ILLMProvider based on llmConfig.provider.
120
157
  *
@@ -208,4 +245,4 @@ declare class OllamaProvider implements ILLMProvider {
208
245
  ping(): Promise<boolean>;
209
246
  }
210
247
 
211
- export { AnthropicProvider, ChatMessage, ChatOptions, EmbedOptions, EmbeddingConfig, ILLMProvider, IVectorDB, LLMConfig, LLMFactory, MongoDbAdapter, OllamaProvider, OpenAIProvider, PgVectorAdapter, PineconeAdapter, RagConfig, UpsertDocument, VectorDBConfig, VectorDBFactory, VectorMatch, getRagConfig };
248
+ export { AnthropicProvider, BaseVectorProvider, ChatMessage, ChatOptions, ChromaDBProvider, EmbedOptions, EmbeddingConfig, ILLMProvider, LLMConfig, LLMFactory, MilvusProvider, MongoDBProvider, OllamaProvider, OpenAIProvider, PineconeProvider, PostgreSQLProvider, QdrantProvider, RagConfig, RedisProvider, UpsertDocument, VectorDBConfig, VectorMatch, WeaviateProvider, getRagConfig };