@retrivora-ai/rag-engine 1.9.3 → 1.9.7
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/README.md +59 -7
- package/dist/{ILLMProvider-Bw2A28nU.d.mts → ILLMProvider-Bhk6zJOK.d.mts} +43 -7
- package/dist/{ILLMProvider-Bw2A28nU.d.ts → ILLMProvider-Bhk6zJOK.d.ts} +43 -7
- package/dist/handlers/index.d.mts +2 -2
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.js +737 -237
- package/dist/handlers/index.mjs +736 -237
- package/dist/index-B9J_XEh0.d.ts +187 -0
- package/dist/index-BJ4cd-t5.d.mts +187 -0
- package/dist/{index-B70ZLkfG.d.mts → index-Bu7T6xgr.d.ts} +20 -3
- package/dist/{index-DVu-mkAM.d.ts → index-C3SVtPYg.d.mts} +20 -3
- package/dist/index.css +237 -10
- package/dist/index.d.mts +13 -5
- package/dist/index.d.ts +13 -5
- package/dist/index.js +365 -164
- package/dist/index.mjs +350 -158
- package/dist/server.d.mts +15 -94
- package/dist/server.d.ts +15 -94
- package/dist/server.js +850 -239
- package/dist/server.mjs +839 -238
- package/package.json +2 -4
- package/src/app/api/chat/route.ts +2 -2
- package/src/app/api/health/route.ts +3 -2
- package/src/app/api/ingest/route.ts +3 -2
- package/src/app/api/suggestions/route.ts +3 -2
- package/src/app/api/upload/route.ts +3 -2
- package/src/app/constants.tsx +168 -148
- package/src/app/layout.tsx +5 -18
- package/src/app/types.ts +17 -17
- package/src/components/ChatWidget.tsx +3 -1
- package/src/components/ChatWindow.tsx +5 -1
- package/src/components/DocViewer.tsx +71 -5
- package/src/components/Documentation.tsx +74 -11
- package/src/components/MessageBubble.tsx +39 -2
- package/src/components/ThinkingBlock.tsx +75 -0
- package/src/components/VisualizationRenderer.tsx +27 -1
- package/src/components/constants.tsx +275 -0
- package/src/config/RagConfig.ts +47 -0
- package/src/config/constants.ts +1 -0
- package/src/config/serverConfig.ts +25 -0
- package/src/core/ConfigResolver.ts +73 -22
- package/src/core/ConfigValidator.ts +2 -1
- package/src/core/Pipeline.ts +226 -68
- package/src/core/ProviderRegistry.ts +16 -7
- package/src/core/QueryProcessor.ts +38 -4
- package/src/core/Retrivora.ts +91 -0
- package/src/core/VectorPlugin.ts +62 -8
- package/src/exceptions/index.ts +111 -0
- package/src/handlers/index.ts +73 -0
- package/src/hooks/useRagChat.ts +30 -5
- package/src/index.ts +27 -1
- package/src/lib/plugin.ts +24 -0
- package/src/llm/LLMFactory.ts +8 -4
- package/src/llm/providers/AnthropicProvider.ts +70 -20
- package/src/llm/providers/GeminiProvider.ts +14 -15
- package/src/llm/providers/OllamaProvider.ts +13 -16
- package/src/llm/providers/OpenAIProvider.ts +9 -14
- package/src/llm/providers/UniversalLLMAdapter.ts +5 -5
- package/src/llm/utils.ts +46 -0
- package/src/providers/vectordb/MongoDBProvider.ts +9 -4
- package/src/providers/vectordb/MultiTablePostgresProvider.ts +45 -13
- package/src/rag/EntityExtractor.ts +2 -2
- package/src/rag/Reranker.ts +9 -16
- package/src/server.ts +30 -1
- package/src/types/chat.ts +9 -0
- package/src/types/props.ts +38 -1
- package/src/utils/UITransformer.ts +73 -4
- package/dist/DocumentChunker-Dh9TvmGG.d.mts +0 -45
- package/dist/DocumentChunker-Dh9TvmGG.d.ts +0 -45
package/dist/server.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { p as VectorDBConfig, L as LLMConfig, e as EmbeddingConfig, k as RagConfig, n as UniversalRagConfig, o as UpsertDocument, V as VectorMatch, G as GraphDBConfig, r as GraphNode, s as Edge, t as GraphSearchResult, I as ILLMProvider, q as VectorDBProvider, h as LLMProvider, f as EmbeddingProvider, j as RAGConfig, U as UIConfig, C as ChatMessage, c as ChatOptions, E as EmbedOptions } from './ILLMProvider-Bhk6zJOK.mjs';
|
|
2
|
+
export { d as ChatResponse, g as IngestDocument, l as RetrievalConfig, W as WorkflowConfig } from './ILLMProvider-Bhk6zJOK.mjs';
|
|
3
|
+
export { A as AuthenticationException, C as Chunk, a as ChunkOptions, b as ConfigurationException, D as DocumentChunker, E as EmbeddingFailedException, g as Pipeline, P as ProviderNotFoundException, R as RateLimitException, c as RetrievalException, d as Retrivora, e as RetrivoraError, f as RetrivoraErrorCode, w as wrapError } from './index-BJ4cd-t5.mjs';
|
|
4
|
+
import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-C3SVtPYg.mjs';
|
|
5
|
+
export { C as ConfigValidator, V as ValidationError, b as VectorPlugin, c as createChatHandler, d as createHealthHandler, e as createIngestHandler, f as createRagHandler, g as createStreamHandler, h as createUploadHandler, s as sseErrorFrame, i as sseFrame, j as sseMetaFrame, k as sseTextFrame } from './index-C3SVtPYg.mjs';
|
|
5
6
|
import 'next/server';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -95,94 +96,6 @@ declare class ProviderHealthCheck {
|
|
|
95
96
|
}>;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
|
-
/**
|
|
99
|
-
* Pipeline — orchestrates the RAG flow: Embed → Search → Augment → Generate.
|
|
100
|
-
*
|
|
101
|
-
* Features:
|
|
102
|
-
* - Lazy initialization of providers
|
|
103
|
-
* - Batch processing with retry logic
|
|
104
|
-
* - Smart embedding strategy (integrated / separate / external)
|
|
105
|
-
* - Error recovery for transient failures
|
|
106
|
-
* - Multi-tenancy support via namespacing
|
|
107
|
-
* - LRU-bounded embedding cache (max 500 entries, prevents memory leaks)
|
|
108
|
-
* - Full observability tracing (latency, tokens, hallucination scoring)
|
|
109
|
-
*/
|
|
110
|
-
declare class Pipeline {
|
|
111
|
-
private config;
|
|
112
|
-
private vectorDB;
|
|
113
|
-
private graphDB?;
|
|
114
|
-
private llmProvider;
|
|
115
|
-
private embeddingProvider;
|
|
116
|
-
private llmRouter;
|
|
117
|
-
private chunker;
|
|
118
|
-
private llamaIngestor?;
|
|
119
|
-
private entityExtractor?;
|
|
120
|
-
private reranker;
|
|
121
|
-
private agent?;
|
|
122
|
-
/** LRU-bounded cache: avoids re-embedding identical queries within the same process. */
|
|
123
|
-
private embeddingCache;
|
|
124
|
-
private initialised;
|
|
125
|
-
constructor(config: RagConfig);
|
|
126
|
-
/**
|
|
127
|
-
* Expose the underlying LLM provider (set after initialize()).
|
|
128
|
-
* Used by the stream handler to pass to UITransformer.analyzeAndDecide().
|
|
129
|
-
*/
|
|
130
|
-
getLLMProvider(): ILLMProvider | undefined;
|
|
131
|
-
initialize(): Promise<void>;
|
|
132
|
-
/**
|
|
133
|
-
* Ingest documents with automatic chunking, embedding, and batch upsert.
|
|
134
|
-
*/
|
|
135
|
-
ingest(documents: IngestDocument[], namespace?: string): Promise<Array<{
|
|
136
|
-
docId: string | number;
|
|
137
|
-
chunksIngested: number;
|
|
138
|
-
}>>;
|
|
139
|
-
/** Step 1: Chunk the document content. */
|
|
140
|
-
private prepareChunks;
|
|
141
|
-
/**
|
|
142
|
-
* Step 2: Generate embeddings for chunks with retry logic.
|
|
143
|
-
* Uses batchEmbed when available for efficiency; falls back to sequential embedding.
|
|
144
|
-
*/
|
|
145
|
-
private processEmbeddings;
|
|
146
|
-
/** Step 3: Upsert chunks to vector database with retry logic. */
|
|
147
|
-
private processUpserts;
|
|
148
|
-
/** Step 4: Optional graph-based entity extraction and ingestion. */
|
|
149
|
-
private processGraphIngestion;
|
|
150
|
-
ask(question: string, history?: ChatMessage[], namespace?: string): Promise<ChatResponse>;
|
|
151
|
-
/**
|
|
152
|
-
* High-performance streaming RAG flow.
|
|
153
|
-
* Yields text chunks first, then the retrieval metadata + observability trace at the end.
|
|
154
|
-
*
|
|
155
|
-
* Latency optimizations:
|
|
156
|
-
* - Strategy classification runs in parallel with query embedding (saves ~400ms)
|
|
157
|
-
* - Hallucination scoring is fire-and-forget (doesn't block metadata yield)
|
|
158
|
-
* - UITransformation is computed after text streaming and emitted with metadata
|
|
159
|
-
* - SchemaMapper.train runs while answer generation streams
|
|
160
|
-
*/
|
|
161
|
-
askStream(question: string, history?: ChatMessage[], namespace?: string): AsyncIterable<string | ChatResponse>;
|
|
162
|
-
/**
|
|
163
|
-
* Universal retrieval method combining all enabled providers.
|
|
164
|
-
* Uses an LRU-bounded embedding cache to avoid re-embedding the same query.
|
|
165
|
-
*/
|
|
166
|
-
private generateUiTransformation;
|
|
167
|
-
private applyStructuredFilters;
|
|
168
|
-
private resolveNumericPredicateValue;
|
|
169
|
-
private extractNumericValueFromContent;
|
|
170
|
-
private matchesNumericPredicate;
|
|
171
|
-
private normalizeComparableField;
|
|
172
|
-
private fieldSimilarityScore;
|
|
173
|
-
private fieldTokens;
|
|
174
|
-
private toFiniteNumber;
|
|
175
|
-
retrieve(query: string, options: {
|
|
176
|
-
namespace?: string;
|
|
177
|
-
topK?: number;
|
|
178
|
-
filter?: Record<string, unknown>;
|
|
179
|
-
}): Promise<RetrievalResult>;
|
|
180
|
-
/** Rewrite the user query for better retrieval performance. */
|
|
181
|
-
private rewriteQuery;
|
|
182
|
-
/** Generate 3-5 short, relevant questions based on the vector database content. */
|
|
183
|
-
getSuggestions(query: string, namespace?: string): Promise<string[]>;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
99
|
/**
|
|
187
100
|
* ConfigResolver — validates and normalizes host configuration.
|
|
188
101
|
* It merges host-provided config with environment defaults.
|
|
@@ -198,10 +111,17 @@ declare class ConfigResolver {
|
|
|
198
111
|
* @param hostConfig - Partial configuration passed from the host application.
|
|
199
112
|
*/
|
|
200
113
|
static resolve(hostConfig?: Partial<RagConfig>, env?: Record<string, string | undefined>): RagConfig;
|
|
114
|
+
/**
|
|
115
|
+
* Resolves the public SDK config shape used by `new Retrivora({...})`.
|
|
116
|
+
* Supports aliases from the product prompt while preserving existing env
|
|
117
|
+
* fallback behavior.
|
|
118
|
+
*/
|
|
119
|
+
static resolveUniversal(hostConfig?: UniversalRagConfig, env?: Record<string, string | undefined>): RagConfig;
|
|
201
120
|
/**
|
|
202
121
|
* Validates the configuration for required fields.
|
|
203
122
|
*/
|
|
204
123
|
static validate(config: RagConfig): void;
|
|
124
|
+
private static mergeRetrievalWorkflow;
|
|
205
125
|
}
|
|
206
126
|
|
|
207
127
|
/**
|
|
@@ -313,6 +233,8 @@ declare class ProviderRegistry {
|
|
|
313
233
|
static createVectorProvider(config: VectorDBConfig): Promise<BaseVectorProvider>;
|
|
314
234
|
static createGraphProvider(config: GraphDBConfig): Promise<BaseGraphProvider>;
|
|
315
235
|
static createLLMProvider(llmConfig: LLMConfig, embeddingConfig?: EmbeddingConfig): ILLMProvider;
|
|
236
|
+
static registerLLMProvider(name: string, factory: (config: LLMConfig) => ILLMProvider): void;
|
|
237
|
+
static createEmbeddingProvider(embeddingConfig: EmbeddingConfig): ILLMProvider;
|
|
316
238
|
}
|
|
317
239
|
|
|
318
240
|
/**
|
|
@@ -974,7 +896,6 @@ declare class OllamaProvider implements ILLMProvider {
|
|
|
974
896
|
static getHealthChecker(): IProviderHealthChecker;
|
|
975
897
|
chat(messages: ChatMessage[], context: string, options?: ChatOptions): Promise<string>;
|
|
976
898
|
chatStream(messages: ChatMessage[], context: string, options?: ChatOptions): AsyncIterable<string>;
|
|
977
|
-
private buildSystemPrompt;
|
|
978
899
|
embed(text: string, options?: EmbedOptions): Promise<number[]>;
|
|
979
900
|
batchEmbed(texts: string[], options?: EmbedOptions): Promise<number[][]>;
|
|
980
901
|
ping(): Promise<boolean>;
|
|
@@ -1003,4 +924,4 @@ declare class UniversalLLMAdapter implements ILLMProvider {
|
|
|
1003
924
|
ping(): Promise<boolean>;
|
|
1004
925
|
}
|
|
1005
926
|
|
|
1006
|
-
export { AnthropicProvider, BaseVectorProvider, type BatchOptions, BatchProcessor, type BatchResult, ChatMessage, ChatOptions,
|
|
927
|
+
export { AnthropicProvider, BaseVectorProvider, type BatchOptions, BatchProcessor, type BatchResult, ChatMessage, ChatOptions, ChromaDBProvider, ConfigBuilder, ConfigResolver, DocumentParser, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, HealthCheckResult, ILLMProvider, IProviderHealthChecker, IProviderValidator, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, MilvusProvider, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, PRESETS, PineconeProvider, PostgreSQLProvider, ProviderHealthCheck, ProviderRegistry, QdrantProvider, RAGConfig, RagConfig, RedisProvider, UIConfig, UniversalLLMAdapter, UniversalRagConfig, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, WeaviateProvider, createFromPreset, getRagConfig };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { p as VectorDBConfig, L as LLMConfig, e as EmbeddingConfig, k as RagConfig, n as UniversalRagConfig, o as UpsertDocument, V as VectorMatch, G as GraphDBConfig, r as GraphNode, s as Edge, t as GraphSearchResult, I as ILLMProvider, q as VectorDBProvider, h as LLMProvider, f as EmbeddingProvider, j as RAGConfig, U as UIConfig, C as ChatMessage, c as ChatOptions, E as EmbedOptions } from './ILLMProvider-Bhk6zJOK.js';
|
|
2
|
+
export { d as ChatResponse, g as IngestDocument, l as RetrievalConfig, W as WorkflowConfig } from './ILLMProvider-Bhk6zJOK.js';
|
|
3
|
+
export { A as AuthenticationException, C as Chunk, a as ChunkOptions, b as ConfigurationException, D as DocumentChunker, E as EmbeddingFailedException, g as Pipeline, P as ProviderNotFoundException, R as RateLimitException, c as RetrievalException, d as Retrivora, e as RetrivoraError, f as RetrivoraErrorCode, w as wrapError } from './index-B9J_XEh0.js';
|
|
4
|
+
import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-Bu7T6xgr.js';
|
|
5
|
+
export { C as ConfigValidator, V as ValidationError, b as VectorPlugin, c as createChatHandler, d as createHealthHandler, e as createIngestHandler, f as createRagHandler, g as createStreamHandler, h as createUploadHandler, s as sseErrorFrame, i as sseFrame, j as sseMetaFrame, k as sseTextFrame } from './index-Bu7T6xgr.js';
|
|
5
6
|
import 'next/server';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -95,94 +96,6 @@ declare class ProviderHealthCheck {
|
|
|
95
96
|
}>;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
|
-
/**
|
|
99
|
-
* Pipeline — orchestrates the RAG flow: Embed → Search → Augment → Generate.
|
|
100
|
-
*
|
|
101
|
-
* Features:
|
|
102
|
-
* - Lazy initialization of providers
|
|
103
|
-
* - Batch processing with retry logic
|
|
104
|
-
* - Smart embedding strategy (integrated / separate / external)
|
|
105
|
-
* - Error recovery for transient failures
|
|
106
|
-
* - Multi-tenancy support via namespacing
|
|
107
|
-
* - LRU-bounded embedding cache (max 500 entries, prevents memory leaks)
|
|
108
|
-
* - Full observability tracing (latency, tokens, hallucination scoring)
|
|
109
|
-
*/
|
|
110
|
-
declare class Pipeline {
|
|
111
|
-
private config;
|
|
112
|
-
private vectorDB;
|
|
113
|
-
private graphDB?;
|
|
114
|
-
private llmProvider;
|
|
115
|
-
private embeddingProvider;
|
|
116
|
-
private llmRouter;
|
|
117
|
-
private chunker;
|
|
118
|
-
private llamaIngestor?;
|
|
119
|
-
private entityExtractor?;
|
|
120
|
-
private reranker;
|
|
121
|
-
private agent?;
|
|
122
|
-
/** LRU-bounded cache: avoids re-embedding identical queries within the same process. */
|
|
123
|
-
private embeddingCache;
|
|
124
|
-
private initialised;
|
|
125
|
-
constructor(config: RagConfig);
|
|
126
|
-
/**
|
|
127
|
-
* Expose the underlying LLM provider (set after initialize()).
|
|
128
|
-
* Used by the stream handler to pass to UITransformer.analyzeAndDecide().
|
|
129
|
-
*/
|
|
130
|
-
getLLMProvider(): ILLMProvider | undefined;
|
|
131
|
-
initialize(): Promise<void>;
|
|
132
|
-
/**
|
|
133
|
-
* Ingest documents with automatic chunking, embedding, and batch upsert.
|
|
134
|
-
*/
|
|
135
|
-
ingest(documents: IngestDocument[], namespace?: string): Promise<Array<{
|
|
136
|
-
docId: string | number;
|
|
137
|
-
chunksIngested: number;
|
|
138
|
-
}>>;
|
|
139
|
-
/** Step 1: Chunk the document content. */
|
|
140
|
-
private prepareChunks;
|
|
141
|
-
/**
|
|
142
|
-
* Step 2: Generate embeddings for chunks with retry logic.
|
|
143
|
-
* Uses batchEmbed when available for efficiency; falls back to sequential embedding.
|
|
144
|
-
*/
|
|
145
|
-
private processEmbeddings;
|
|
146
|
-
/** Step 3: Upsert chunks to vector database with retry logic. */
|
|
147
|
-
private processUpserts;
|
|
148
|
-
/** Step 4: Optional graph-based entity extraction and ingestion. */
|
|
149
|
-
private processGraphIngestion;
|
|
150
|
-
ask(question: string, history?: ChatMessage[], namespace?: string): Promise<ChatResponse>;
|
|
151
|
-
/**
|
|
152
|
-
* High-performance streaming RAG flow.
|
|
153
|
-
* Yields text chunks first, then the retrieval metadata + observability trace at the end.
|
|
154
|
-
*
|
|
155
|
-
* Latency optimizations:
|
|
156
|
-
* - Strategy classification runs in parallel with query embedding (saves ~400ms)
|
|
157
|
-
* - Hallucination scoring is fire-and-forget (doesn't block metadata yield)
|
|
158
|
-
* - UITransformation is computed after text streaming and emitted with metadata
|
|
159
|
-
* - SchemaMapper.train runs while answer generation streams
|
|
160
|
-
*/
|
|
161
|
-
askStream(question: string, history?: ChatMessage[], namespace?: string): AsyncIterable<string | ChatResponse>;
|
|
162
|
-
/**
|
|
163
|
-
* Universal retrieval method combining all enabled providers.
|
|
164
|
-
* Uses an LRU-bounded embedding cache to avoid re-embedding the same query.
|
|
165
|
-
*/
|
|
166
|
-
private generateUiTransformation;
|
|
167
|
-
private applyStructuredFilters;
|
|
168
|
-
private resolveNumericPredicateValue;
|
|
169
|
-
private extractNumericValueFromContent;
|
|
170
|
-
private matchesNumericPredicate;
|
|
171
|
-
private normalizeComparableField;
|
|
172
|
-
private fieldSimilarityScore;
|
|
173
|
-
private fieldTokens;
|
|
174
|
-
private toFiniteNumber;
|
|
175
|
-
retrieve(query: string, options: {
|
|
176
|
-
namespace?: string;
|
|
177
|
-
topK?: number;
|
|
178
|
-
filter?: Record<string, unknown>;
|
|
179
|
-
}): Promise<RetrievalResult>;
|
|
180
|
-
/** Rewrite the user query for better retrieval performance. */
|
|
181
|
-
private rewriteQuery;
|
|
182
|
-
/** Generate 3-5 short, relevant questions based on the vector database content. */
|
|
183
|
-
getSuggestions(query: string, namespace?: string): Promise<string[]>;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
99
|
/**
|
|
187
100
|
* ConfigResolver — validates and normalizes host configuration.
|
|
188
101
|
* It merges host-provided config with environment defaults.
|
|
@@ -198,10 +111,17 @@ declare class ConfigResolver {
|
|
|
198
111
|
* @param hostConfig - Partial configuration passed from the host application.
|
|
199
112
|
*/
|
|
200
113
|
static resolve(hostConfig?: Partial<RagConfig>, env?: Record<string, string | undefined>): RagConfig;
|
|
114
|
+
/**
|
|
115
|
+
* Resolves the public SDK config shape used by `new Retrivora({...})`.
|
|
116
|
+
* Supports aliases from the product prompt while preserving existing env
|
|
117
|
+
* fallback behavior.
|
|
118
|
+
*/
|
|
119
|
+
static resolveUniversal(hostConfig?: UniversalRagConfig, env?: Record<string, string | undefined>): RagConfig;
|
|
201
120
|
/**
|
|
202
121
|
* Validates the configuration for required fields.
|
|
203
122
|
*/
|
|
204
123
|
static validate(config: RagConfig): void;
|
|
124
|
+
private static mergeRetrievalWorkflow;
|
|
205
125
|
}
|
|
206
126
|
|
|
207
127
|
/**
|
|
@@ -313,6 +233,8 @@ declare class ProviderRegistry {
|
|
|
313
233
|
static createVectorProvider(config: VectorDBConfig): Promise<BaseVectorProvider>;
|
|
314
234
|
static createGraphProvider(config: GraphDBConfig): Promise<BaseGraphProvider>;
|
|
315
235
|
static createLLMProvider(llmConfig: LLMConfig, embeddingConfig?: EmbeddingConfig): ILLMProvider;
|
|
236
|
+
static registerLLMProvider(name: string, factory: (config: LLMConfig) => ILLMProvider): void;
|
|
237
|
+
static createEmbeddingProvider(embeddingConfig: EmbeddingConfig): ILLMProvider;
|
|
316
238
|
}
|
|
317
239
|
|
|
318
240
|
/**
|
|
@@ -974,7 +896,6 @@ declare class OllamaProvider implements ILLMProvider {
|
|
|
974
896
|
static getHealthChecker(): IProviderHealthChecker;
|
|
975
897
|
chat(messages: ChatMessage[], context: string, options?: ChatOptions): Promise<string>;
|
|
976
898
|
chatStream(messages: ChatMessage[], context: string, options?: ChatOptions): AsyncIterable<string>;
|
|
977
|
-
private buildSystemPrompt;
|
|
978
899
|
embed(text: string, options?: EmbedOptions): Promise<number[]>;
|
|
979
900
|
batchEmbed(texts: string[], options?: EmbedOptions): Promise<number[][]>;
|
|
980
901
|
ping(): Promise<boolean>;
|
|
@@ -1003,4 +924,4 @@ declare class UniversalLLMAdapter implements ILLMProvider {
|
|
|
1003
924
|
ping(): Promise<boolean>;
|
|
1004
925
|
}
|
|
1005
926
|
|
|
1006
|
-
export { AnthropicProvider, BaseVectorProvider, type BatchOptions, BatchProcessor, type BatchResult, ChatMessage, ChatOptions,
|
|
927
|
+
export { AnthropicProvider, BaseVectorProvider, type BatchOptions, BatchProcessor, type BatchResult, ChatMessage, ChatOptions, ChromaDBProvider, ConfigBuilder, ConfigResolver, DocumentParser, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, HealthCheckResult, ILLMProvider, IProviderHealthChecker, IProviderValidator, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, MilvusProvider, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, PRESETS, PineconeProvider, PostgreSQLProvider, ProviderHealthCheck, ProviderRegistry, QdrantProvider, RAGConfig, RagConfig, RedisProvider, UIConfig, UniversalLLMAdapter, UniversalRagConfig, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, WeaviateProvider, createFromPreset, getRagConfig };
|