@retrivora-ai/rag-engine 2.3.1 → 2.3.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/{BatchProcessor-BfzuU4cK.d.ts → BatchProcessor-CQDtlggz.d.ts} +2 -139
- package/dist/{BatchProcessor-7yV-UCHW.d.mts → BatchProcessor-tVzb9CdE.d.mts} +2 -139
- package/dist/{ILLMProvider-teTNQ1lh.d.mts → ILLMProvider-CcJ5N6XD.d.mts} +1 -1
- package/dist/{ILLMProvider-teTNQ1lh.d.ts → ILLMProvider-CcJ5N6XD.d.ts} +1 -1
- package/dist/handlers/index.d.mts +2 -2
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.js +2 -5
- package/dist/handlers/index.mjs +2 -5
- package/dist/{index-DR_O_B-W.d.ts → index-BwmyPJHp.d.ts} +1 -1
- package/dist/{index-fnpaCuma.d.mts → index-CL-zF6bD.d.mts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -1964
- package/dist/index.mjs +3 -1959
- package/dist/server.d.mts +186 -49
- package/dist/server.d.ts +186 -49
- package/dist/server.js +2 -5
- package/dist/server.mjs +2 -5
- package/package.json +3 -2
- package/src/components/ChatWidget.tsx +2 -2
- package/src/components/ChatWindow.tsx +0 -1
- package/src/components/CodeViewer.tsx +1 -1
- package/src/core/LangChainAgent.ts +0 -2
- package/src/index.ts +4 -9
- package/src/providers/vectordb/MilvusProvider.ts +0 -1
- package/src/providers/vectordb/MongoDBProvider.ts +0 -1
- package/src/providers/vectordb/MultiTablePostgresProvider.ts +2 -2
- package/src/providers/vectordb/RedisProvider.ts +0 -1
- package/src/providers/vectordb/WeaviateProvider.ts +0 -1
- package/src/rag/LlamaIndexIngestor.ts +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, MouseEvent, ReactNode, ElementType } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { z as Product, m as UIConfig, j as RagMessage, q as VectorMatch, u as UITransformationResponse, i as RagConfig, I as ILLMProvider, f as IngestDocument, C as ChatMessage, c as ChatResponse, A as RetrievalResult, n as UniversalRagConfig } from './ILLMProvider-CcJ5N6XD.js';
|
|
3
3
|
|
|
4
4
|
interface ArchitectureCardProps {
|
|
5
5
|
icon: ReactNode;
|
|
@@ -210,143 +210,6 @@ interface IRendererStrategy {
|
|
|
210
210
|
render(data: unknown, options?: Record<string, unknown>): UITransformationResponse;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
interface DataSignals {
|
|
214
|
-
rowCount: number;
|
|
215
|
-
hasNumericFields: boolean;
|
|
216
|
-
hasDateFields: boolean;
|
|
217
|
-
hasCategoricalFields: boolean;
|
|
218
|
-
isProductLike: boolean;
|
|
219
|
-
numericFieldCount: number;
|
|
220
|
-
categoricalFieldCount: number;
|
|
221
|
-
}
|
|
222
|
-
declare class IntentClassifier {
|
|
223
|
-
/**
|
|
224
|
-
* Fast, zero-latency classifier that maps a user query and optional data context
|
|
225
|
-
* into a high-level IntentCategory.
|
|
226
|
-
*/
|
|
227
|
-
static classify(context: DecisionContext): {
|
|
228
|
-
intent: IntentCategory;
|
|
229
|
-
signals: DataSignals;
|
|
230
|
-
};
|
|
231
|
-
/**
|
|
232
|
-
* Extract key data structure signals from retrieved documents.
|
|
233
|
-
*/
|
|
234
|
-
static extractDataSignals(context: DecisionContext): DataSignals;
|
|
235
|
-
private static isInformationLookup;
|
|
236
|
-
private static isComparisonQuery;
|
|
237
|
-
private static isProductQuery;
|
|
238
|
-
private static isRecommendationQuery;
|
|
239
|
-
private static isTrendQuery;
|
|
240
|
-
private static isRankingQuery;
|
|
241
|
-
private static isAnalyticsQuery;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
declare class RuleEngine {
|
|
245
|
-
private rules;
|
|
246
|
-
constructor();
|
|
247
|
-
/**
|
|
248
|
-
* Register standard rules in priority order.
|
|
249
|
-
*/
|
|
250
|
-
private registerDefaultRules;
|
|
251
|
-
/**
|
|
252
|
-
* Add or replace a rule in the engine.
|
|
253
|
-
* Automatically keeps rules sorted by descending priority.
|
|
254
|
-
*/
|
|
255
|
-
registerRule(rule: IRenderRule): void;
|
|
256
|
-
/**
|
|
257
|
-
* Evaluate context against rules in descending priority order.
|
|
258
|
-
* Returns the first non-null RenderDecision.
|
|
259
|
-
*/
|
|
260
|
-
evaluate(context: DecisionContext, intent: IntentCategory): RenderDecision;
|
|
261
|
-
/**
|
|
262
|
-
* List all registered rules.
|
|
263
|
-
*/
|
|
264
|
-
getRegisteredRules(): Array<{
|
|
265
|
-
name: string;
|
|
266
|
-
priority: number;
|
|
267
|
-
}>;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
declare class TextRendererStrategy implements IRendererStrategy {
|
|
271
|
-
readonly type = "text";
|
|
272
|
-
render(data: unknown, options?: Record<string, unknown>): UITransformationResponse;
|
|
273
|
-
}
|
|
274
|
-
declare class TableRendererStrategy implements IRendererStrategy {
|
|
275
|
-
readonly type = "table";
|
|
276
|
-
render(data: unknown, options?: Record<string, unknown>): UITransformationResponse;
|
|
277
|
-
}
|
|
278
|
-
declare class CarouselRendererStrategy implements IRendererStrategy {
|
|
279
|
-
readonly type = "carousel";
|
|
280
|
-
render(data: unknown, options?: Record<string, unknown>): UITransformationResponse;
|
|
281
|
-
}
|
|
282
|
-
declare class ChartRendererStrategy implements IRendererStrategy {
|
|
283
|
-
readonly type = "chart";
|
|
284
|
-
render(data: unknown, options?: Record<string, unknown>): UITransformationResponse;
|
|
285
|
-
}
|
|
286
|
-
declare class MixedRendererStrategy implements IRendererStrategy {
|
|
287
|
-
readonly type = "mixed";
|
|
288
|
-
render(data: unknown, options?: Record<string, unknown>): UITransformationResponse;
|
|
289
|
-
}
|
|
290
|
-
declare class RendererRegistry {
|
|
291
|
-
private static strategies;
|
|
292
|
-
/**
|
|
293
|
-
* Register a new renderer strategy.
|
|
294
|
-
* Enables seamless addition of custom visualizers (Timeline, Maps, Flow Diagrams, etc.).
|
|
295
|
-
*/
|
|
296
|
-
static registerStrategy(strategy: IRendererStrategy): void;
|
|
297
|
-
/**
|
|
298
|
-
* Retrieve a registered renderer strategy by type string.
|
|
299
|
-
*/
|
|
300
|
-
static getStrategy(type: string): IRendererStrategy;
|
|
301
|
-
/**
|
|
302
|
-
* Check if a renderer strategy is registered.
|
|
303
|
-
*/
|
|
304
|
-
static hasStrategy(type: string): boolean;
|
|
305
|
-
/**
|
|
306
|
-
* List all registered strategy types.
|
|
307
|
-
*/
|
|
308
|
-
static getRegisteredTypes(): string[];
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* High-Performance Visualization Decision Engine.
|
|
313
|
-
* Intelligently determines whether to render text, table, carousel, chart, or mixed sections
|
|
314
|
-
* BEFORE expensive visual generation or LLM visual calls execute.
|
|
315
|
-
*/
|
|
316
|
-
declare class VisualizationDecisionEngine {
|
|
317
|
-
private static ruleEngine;
|
|
318
|
-
private static cache;
|
|
319
|
-
/**
|
|
320
|
-
* Evaluate user query, documents, and context to produce a RenderDecision.
|
|
321
|
-
* Execution time is < 1ms for cached or rule-matched queries.
|
|
322
|
-
*/
|
|
323
|
-
static decideVisualization(userQuery: string, retrievedDocuments?: VectorMatch[], llmResponse?: string, metadata?: Record<string, unknown>): RenderDecision;
|
|
324
|
-
/**
|
|
325
|
-
* Convenience helper to decide AND render the data into a UITransformationResponse.
|
|
326
|
-
*/
|
|
327
|
-
static render(userQuery: string, retrievedDocuments?: VectorMatch[], llmResponse?: string, metadata?: Record<string, unknown>): UITransformationResponse;
|
|
328
|
-
/**
|
|
329
|
-
* Register a custom rule in the rule engine.
|
|
330
|
-
*/
|
|
331
|
-
static registerRule(rule: IRenderRule): void;
|
|
332
|
-
/**
|
|
333
|
-
* Register a custom renderer strategy.
|
|
334
|
-
*/
|
|
335
|
-
static registerRendererStrategy(strategy: IRendererStrategy): void;
|
|
336
|
-
/**
|
|
337
|
-
* Clear the decision cache.
|
|
338
|
-
*/
|
|
339
|
-
static clearCache(): void;
|
|
340
|
-
/**
|
|
341
|
-
* Get size of current decision cache.
|
|
342
|
-
*/
|
|
343
|
-
static getCacheSize(): number;
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* Top-level function export matching prompt specification.
|
|
347
|
-
*/
|
|
348
|
-
declare function decideVisualization(userQuery: string, retrievedDocuments?: VectorMatch[], llmResponse?: string, metadata?: Record<string, unknown>): RenderDecision;
|
|
349
|
-
|
|
350
213
|
/**
|
|
351
214
|
* DocumentChunker — splits long text into overlapping chunks
|
|
352
215
|
* suitable for vector embedding and retrieval.
|
|
@@ -720,4 +583,4 @@ declare class BatchProcessor {
|
|
|
720
583
|
static processConcurrent<T, R>(items: T[], processor: (item: T) => Promise<R>, concurrency?: number, options?: BatchOptions): Promise<BatchResult<R>>;
|
|
721
584
|
}
|
|
722
585
|
|
|
723
|
-
export {
|
|
586
|
+
export { AuthenticationException as A, type BatchOptions as B, type ChatWidgetProps as C, type DocumentUploadProps as D, EmbeddingFailedException as E, type ArchitectureCardProps as F, type ChatViewportSize as G, DocumentChunker as H, type IRenderRule as I, Pipeline as J, type PipelineStep as K, LicenseValidationError as L, type MessageBubbleProps as M, type ProviderPill as N, type RenderSectionDecision as O, type ProductCardProps as P, type Snippet as Q, RateLimitException as R, type SourceCardProps as S, wrapError as T, type ChatWindowProps as a, type ConfigProviderProps as b, type ClientConfig as c, type ProductCarouselProps as d, BatchProcessor as e, type BatchResult as f, type ChartType as g, type Chunk as h, type ChunkOptions as i, ConfigurationException as j, type DecisionContext as k, type IRendererStrategy as l, type IntentCategory as m, type LicenseValidationRequest as n, type LicenseValidationResponse as o, LicenseValidator as p, ProviderNotFoundException as q, type RenderDecision as r, type RenderType as s, RetrievalException as t, Retrivora as u, RetrivoraError as v, type RetrivoraErrorCode as w, SDKVersionUnsupportedError as x, SDK_VERSION as y, isTransientError as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, MouseEvent, ReactNode, ElementType } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { z as Product, m as UIConfig, j as RagMessage, q as VectorMatch, u as UITransformationResponse, i as RagConfig, I as ILLMProvider, f as IngestDocument, C as ChatMessage, c as ChatResponse, A as RetrievalResult, n as UniversalRagConfig } from './ILLMProvider-CcJ5N6XD.mjs';
|
|
3
3
|
|
|
4
4
|
interface ArchitectureCardProps {
|
|
5
5
|
icon: ReactNode;
|
|
@@ -210,143 +210,6 @@ interface IRendererStrategy {
|
|
|
210
210
|
render(data: unknown, options?: Record<string, unknown>): UITransformationResponse;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
interface DataSignals {
|
|
214
|
-
rowCount: number;
|
|
215
|
-
hasNumericFields: boolean;
|
|
216
|
-
hasDateFields: boolean;
|
|
217
|
-
hasCategoricalFields: boolean;
|
|
218
|
-
isProductLike: boolean;
|
|
219
|
-
numericFieldCount: number;
|
|
220
|
-
categoricalFieldCount: number;
|
|
221
|
-
}
|
|
222
|
-
declare class IntentClassifier {
|
|
223
|
-
/**
|
|
224
|
-
* Fast, zero-latency classifier that maps a user query and optional data context
|
|
225
|
-
* into a high-level IntentCategory.
|
|
226
|
-
*/
|
|
227
|
-
static classify(context: DecisionContext): {
|
|
228
|
-
intent: IntentCategory;
|
|
229
|
-
signals: DataSignals;
|
|
230
|
-
};
|
|
231
|
-
/**
|
|
232
|
-
* Extract key data structure signals from retrieved documents.
|
|
233
|
-
*/
|
|
234
|
-
static extractDataSignals(context: DecisionContext): DataSignals;
|
|
235
|
-
private static isInformationLookup;
|
|
236
|
-
private static isComparisonQuery;
|
|
237
|
-
private static isProductQuery;
|
|
238
|
-
private static isRecommendationQuery;
|
|
239
|
-
private static isTrendQuery;
|
|
240
|
-
private static isRankingQuery;
|
|
241
|
-
private static isAnalyticsQuery;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
declare class RuleEngine {
|
|
245
|
-
private rules;
|
|
246
|
-
constructor();
|
|
247
|
-
/**
|
|
248
|
-
* Register standard rules in priority order.
|
|
249
|
-
*/
|
|
250
|
-
private registerDefaultRules;
|
|
251
|
-
/**
|
|
252
|
-
* Add or replace a rule in the engine.
|
|
253
|
-
* Automatically keeps rules sorted by descending priority.
|
|
254
|
-
*/
|
|
255
|
-
registerRule(rule: IRenderRule): void;
|
|
256
|
-
/**
|
|
257
|
-
* Evaluate context against rules in descending priority order.
|
|
258
|
-
* Returns the first non-null RenderDecision.
|
|
259
|
-
*/
|
|
260
|
-
evaluate(context: DecisionContext, intent: IntentCategory): RenderDecision;
|
|
261
|
-
/**
|
|
262
|
-
* List all registered rules.
|
|
263
|
-
*/
|
|
264
|
-
getRegisteredRules(): Array<{
|
|
265
|
-
name: string;
|
|
266
|
-
priority: number;
|
|
267
|
-
}>;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
declare class TextRendererStrategy implements IRendererStrategy {
|
|
271
|
-
readonly type = "text";
|
|
272
|
-
render(data: unknown, options?: Record<string, unknown>): UITransformationResponse;
|
|
273
|
-
}
|
|
274
|
-
declare class TableRendererStrategy implements IRendererStrategy {
|
|
275
|
-
readonly type = "table";
|
|
276
|
-
render(data: unknown, options?: Record<string, unknown>): UITransformationResponse;
|
|
277
|
-
}
|
|
278
|
-
declare class CarouselRendererStrategy implements IRendererStrategy {
|
|
279
|
-
readonly type = "carousel";
|
|
280
|
-
render(data: unknown, options?: Record<string, unknown>): UITransformationResponse;
|
|
281
|
-
}
|
|
282
|
-
declare class ChartRendererStrategy implements IRendererStrategy {
|
|
283
|
-
readonly type = "chart";
|
|
284
|
-
render(data: unknown, options?: Record<string, unknown>): UITransformationResponse;
|
|
285
|
-
}
|
|
286
|
-
declare class MixedRendererStrategy implements IRendererStrategy {
|
|
287
|
-
readonly type = "mixed";
|
|
288
|
-
render(data: unknown, options?: Record<string, unknown>): UITransformationResponse;
|
|
289
|
-
}
|
|
290
|
-
declare class RendererRegistry {
|
|
291
|
-
private static strategies;
|
|
292
|
-
/**
|
|
293
|
-
* Register a new renderer strategy.
|
|
294
|
-
* Enables seamless addition of custom visualizers (Timeline, Maps, Flow Diagrams, etc.).
|
|
295
|
-
*/
|
|
296
|
-
static registerStrategy(strategy: IRendererStrategy): void;
|
|
297
|
-
/**
|
|
298
|
-
* Retrieve a registered renderer strategy by type string.
|
|
299
|
-
*/
|
|
300
|
-
static getStrategy(type: string): IRendererStrategy;
|
|
301
|
-
/**
|
|
302
|
-
* Check if a renderer strategy is registered.
|
|
303
|
-
*/
|
|
304
|
-
static hasStrategy(type: string): boolean;
|
|
305
|
-
/**
|
|
306
|
-
* List all registered strategy types.
|
|
307
|
-
*/
|
|
308
|
-
static getRegisteredTypes(): string[];
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* High-Performance Visualization Decision Engine.
|
|
313
|
-
* Intelligently determines whether to render text, table, carousel, chart, or mixed sections
|
|
314
|
-
* BEFORE expensive visual generation or LLM visual calls execute.
|
|
315
|
-
*/
|
|
316
|
-
declare class VisualizationDecisionEngine {
|
|
317
|
-
private static ruleEngine;
|
|
318
|
-
private static cache;
|
|
319
|
-
/**
|
|
320
|
-
* Evaluate user query, documents, and context to produce a RenderDecision.
|
|
321
|
-
* Execution time is < 1ms for cached or rule-matched queries.
|
|
322
|
-
*/
|
|
323
|
-
static decideVisualization(userQuery: string, retrievedDocuments?: VectorMatch[], llmResponse?: string, metadata?: Record<string, unknown>): RenderDecision;
|
|
324
|
-
/**
|
|
325
|
-
* Convenience helper to decide AND render the data into a UITransformationResponse.
|
|
326
|
-
*/
|
|
327
|
-
static render(userQuery: string, retrievedDocuments?: VectorMatch[], llmResponse?: string, metadata?: Record<string, unknown>): UITransformationResponse;
|
|
328
|
-
/**
|
|
329
|
-
* Register a custom rule in the rule engine.
|
|
330
|
-
*/
|
|
331
|
-
static registerRule(rule: IRenderRule): void;
|
|
332
|
-
/**
|
|
333
|
-
* Register a custom renderer strategy.
|
|
334
|
-
*/
|
|
335
|
-
static registerRendererStrategy(strategy: IRendererStrategy): void;
|
|
336
|
-
/**
|
|
337
|
-
* Clear the decision cache.
|
|
338
|
-
*/
|
|
339
|
-
static clearCache(): void;
|
|
340
|
-
/**
|
|
341
|
-
* Get size of current decision cache.
|
|
342
|
-
*/
|
|
343
|
-
static getCacheSize(): number;
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* Top-level function export matching prompt specification.
|
|
347
|
-
*/
|
|
348
|
-
declare function decideVisualization(userQuery: string, retrievedDocuments?: VectorMatch[], llmResponse?: string, metadata?: Record<string, unknown>): RenderDecision;
|
|
349
|
-
|
|
350
213
|
/**
|
|
351
214
|
* DocumentChunker — splits long text into overlapping chunks
|
|
352
215
|
* suitable for vector embedding and retrieval.
|
|
@@ -720,4 +583,4 @@ declare class BatchProcessor {
|
|
|
720
583
|
static processConcurrent<T, R>(items: T[], processor: (item: T) => Promise<R>, concurrency?: number, options?: BatchOptions): Promise<BatchResult<R>>;
|
|
721
584
|
}
|
|
722
585
|
|
|
723
|
-
export {
|
|
586
|
+
export { AuthenticationException as A, type BatchOptions as B, type ChatWidgetProps as C, type DocumentUploadProps as D, EmbeddingFailedException as E, type ArchitectureCardProps as F, type ChatViewportSize as G, DocumentChunker as H, type IRenderRule as I, Pipeline as J, type PipelineStep as K, LicenseValidationError as L, type MessageBubbleProps as M, type ProviderPill as N, type RenderSectionDecision as O, type ProductCardProps as P, type Snippet as Q, RateLimitException as R, type SourceCardProps as S, wrapError as T, type ChatWindowProps as a, type ConfigProviderProps as b, type ClientConfig as c, type ProductCarouselProps as d, BatchProcessor as e, type BatchResult as f, type ChartType as g, type Chunk as h, type ChunkOptions as i, ConfigurationException as j, type DecisionContext as k, type IRendererStrategy as l, type IntentCategory as m, type LicenseValidationRequest as n, type LicenseValidationResponse as o, LicenseValidator as p, ProviderNotFoundException as q, type RenderDecision as r, type RenderType as s, RetrievalException as t, Retrivora as u, RetrivoraError as v, type RetrivoraErrorCode as w, SDKVersionUnsupportedError as x, SDK_VERSION as y, isTransientError as z };
|
|
@@ -616,4 +616,4 @@ interface ILLMProvider {
|
|
|
616
616
|
ping(): Promise<boolean>;
|
|
617
617
|
}
|
|
618
618
|
|
|
619
|
-
export type {
|
|
619
|
+
export type { RetrievalResult as A, BarChartData as B, ChatMessage as C, RetrivoraChunkMetadata as D, EmbedOptions as E, RetrivoraIngestedDocument as F, GraphDBConfig as G, SuggestionsResponse as H, ILLMProvider as I, TableData as J, VisualizationType as K, LLMConfig as L, MessageRole as M, ObservabilityTrace as O, PieChartData as P, RAGConfig as R, ScatterPlotDataPoint as S, TokenUsage as T, UseRagChatOptions as U, VectorDBConfig as V, WorkflowConfig as W, UseRagChatReturn as a, ChatOptions as b, ChatResponse as c, EmbeddingConfig as d, EmbeddingProvider as e, IngestDocument as f, LLMProvider as g, LatencyBreakdown as h, RagConfig as i, RagMessage as j, RetrievalConfig as k, RetrievedChunk as l, UIConfig as m, UniversalRagConfig as n, UpsertDocument as o, VectorDBProvider as p, VectorMatch as q, GraphNode as r, Edge as s, GraphSearchResult as t, UITransformationResponse as u, CarouselProduct as v, IRetriever as w, LineChartDataPoint as x, MetricCardData as y, Product as z };
|
|
@@ -616,4 +616,4 @@ interface ILLMProvider {
|
|
|
616
616
|
ping(): Promise<boolean>;
|
|
617
617
|
}
|
|
618
618
|
|
|
619
|
-
export type {
|
|
619
|
+
export type { RetrievalResult as A, BarChartData as B, ChatMessage as C, RetrivoraChunkMetadata as D, EmbedOptions as E, RetrivoraIngestedDocument as F, GraphDBConfig as G, SuggestionsResponse as H, ILLMProvider as I, TableData as J, VisualizationType as K, LLMConfig as L, MessageRole as M, ObservabilityTrace as O, PieChartData as P, RAGConfig as R, ScatterPlotDataPoint as S, TokenUsage as T, UseRagChatOptions as U, VectorDBConfig as V, WorkflowConfig as W, UseRagChatReturn as a, ChatOptions as b, ChatResponse as c, EmbeddingConfig as d, EmbeddingProvider as e, IngestDocument as f, LLMProvider as g, LatencyBreakdown as h, RagConfig as i, RagMessage as j, RetrievalConfig as k, RetrievedChunk as l, UIConfig as m, UniversalRagConfig as n, UpsertDocument as o, VectorDBProvider as p, VectorMatch as q, GraphNode as r, Edge as s, GraphSearchResult as t, UITransformationResponse as u, CarouselProduct as v, IRetriever as w, LineChartDataPoint as x, MetricCardData as y, Product as z };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'next/server';
|
|
2
|
-
export { b as HandlerOptions, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, p as createLicenseHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, q as createSuggestionsHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, r as sseObservabilityFrame, o as sseTextFrame, t as sseUIFrame } from '../index-
|
|
3
|
-
import '../ILLMProvider-
|
|
2
|
+
export { b as HandlerOptions, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, p as createLicenseHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, q as createSuggestionsHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, r as sseObservabilityFrame, o as sseTextFrame, t as sseUIFrame } from '../index-CL-zF6bD.mjs';
|
|
3
|
+
import '../ILLMProvider-CcJ5N6XD.mjs';
|
package/dist/handlers/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'next/server';
|
|
2
|
-
export { b as HandlerOptions, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, p as createLicenseHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, q as createSuggestionsHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, r as sseObservabilityFrame, o as sseTextFrame, t as sseUIFrame } from '../index-
|
|
3
|
-
import '../ILLMProvider-
|
|
2
|
+
export { b as HandlerOptions, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, p as createLicenseHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, q as createSuggestionsHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, r as sseObservabilityFrame, o as sseTextFrame, t as sseUIFrame } from '../index-BwmyPJHp.js';
|
|
3
|
+
import '../ILLMProvider-CcJ5N6XD.js';
|
package/dist/handlers/index.js
CHANGED
|
@@ -1355,7 +1355,6 @@ var init_MilvusProvider = __esm({
|
|
|
1355
1355
|
metadata: res["metadata"] || {}
|
|
1356
1356
|
}));
|
|
1357
1357
|
}
|
|
1358
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1359
1358
|
async delete(id, _namespace) {
|
|
1360
1359
|
await this.http.post("/v1/vector/delete", {
|
|
1361
1360
|
collectionName: this.indexName,
|
|
@@ -1780,7 +1779,6 @@ var init_RedisProvider = __esm({
|
|
|
1780
1779
|
await this.upsert(doc, namespace);
|
|
1781
1780
|
}
|
|
1782
1781
|
}
|
|
1783
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1784
1782
|
async query(vector, topK, namespace, _filter) {
|
|
1785
1783
|
const payload = {
|
|
1786
1784
|
index: this.indexName,
|
|
@@ -1917,7 +1915,6 @@ var init_WeaviateProvider = __esm({
|
|
|
1917
1915
|
metadata: res["metadata"] ? JSON.parse(res["metadata"]) : {}
|
|
1918
1916
|
}));
|
|
1919
1917
|
}
|
|
1920
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1921
1918
|
async delete(id, _namespace) {
|
|
1922
1919
|
await this.http.delete(`/v1/objects/${this.indexName}/${id}`);
|
|
1923
1920
|
}
|
|
@@ -4711,7 +4708,7 @@ var ConfigValidator = class {
|
|
|
4711
4708
|
// package.json
|
|
4712
4709
|
var package_default = {
|
|
4713
4710
|
name: "@retrivora-ai/rag-engine",
|
|
4714
|
-
version: "2.3.
|
|
4711
|
+
version: "2.3.3",
|
|
4715
4712
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
4716
4713
|
author: "Abhinav Alkuchi",
|
|
4717
4714
|
license: "UNLICENSED",
|
|
@@ -4790,6 +4787,7 @@ var package_default = {
|
|
|
4790
4787
|
build: "npm run build:pkg",
|
|
4791
4788
|
"build:pkg": "npx @tailwindcss/cli -i src/tailwind.css -o src/index.css && tsup src/index.ts src/handlers/index.ts src/server.ts --format cjs,esm --dts --clean --no-splitting --tsconfig tsconfig.build.json --external react,react-dom,next,mongodb,pg,openai,@anthropic-ai/sdk,@pinecone-database/pinecone,axios,lucide-react,mammoth,pdf-parse,xlsx,react-markdown,remark-gfm,next-themes,langchain,@langchain/core,@langchain/openai,llamaindex --inject-style && npx @tailwindcss/cli -i src/tailwind.css -o dist/index.css",
|
|
4792
4789
|
lint: "eslint",
|
|
4790
|
+
typecheck: "tsc --noEmit -p tsconfig.build.json",
|
|
4793
4791
|
clean: "rm -rf dist"
|
|
4794
4792
|
},
|
|
4795
4793
|
peerDependencies: {
|
|
@@ -5176,7 +5174,6 @@ When presenting structured data, statistics, or comparisons, decide if it is bes
|
|
|
5176
5174
|
finalSystemPrompt += chartInstruction;
|
|
5177
5175
|
}
|
|
5178
5176
|
this.agent = createAgent({
|
|
5179
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5180
5177
|
model: chatModel,
|
|
5181
5178
|
tools: [searchTool],
|
|
5182
5179
|
systemPrompt: finalSystemPrompt
|
package/dist/handlers/index.mjs
CHANGED
|
@@ -1340,7 +1340,6 @@ var init_MilvusProvider = __esm({
|
|
|
1340
1340
|
metadata: res["metadata"] || {}
|
|
1341
1341
|
}));
|
|
1342
1342
|
}
|
|
1343
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1344
1343
|
async delete(id, _namespace) {
|
|
1345
1344
|
await this.http.post("/v1/vector/delete", {
|
|
1346
1345
|
collectionName: this.indexName,
|
|
@@ -1765,7 +1764,6 @@ var init_RedisProvider = __esm({
|
|
|
1765
1764
|
await this.upsert(doc, namespace);
|
|
1766
1765
|
}
|
|
1767
1766
|
}
|
|
1768
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1769
1767
|
async query(vector, topK, namespace, _filter) {
|
|
1770
1768
|
const payload = {
|
|
1771
1769
|
index: this.indexName,
|
|
@@ -1902,7 +1900,6 @@ var init_WeaviateProvider = __esm({
|
|
|
1902
1900
|
metadata: res["metadata"] ? JSON.parse(res["metadata"]) : {}
|
|
1903
1901
|
}));
|
|
1904
1902
|
}
|
|
1905
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1906
1903
|
async delete(id, _namespace) {
|
|
1907
1904
|
await this.http.delete(`/v1/objects/${this.indexName}/${id}`);
|
|
1908
1905
|
}
|
|
@@ -4675,7 +4672,7 @@ var ConfigValidator = class {
|
|
|
4675
4672
|
// package.json
|
|
4676
4673
|
var package_default = {
|
|
4677
4674
|
name: "@retrivora-ai/rag-engine",
|
|
4678
|
-
version: "2.3.
|
|
4675
|
+
version: "2.3.3",
|
|
4679
4676
|
description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
|
|
4680
4677
|
author: "Abhinav Alkuchi",
|
|
4681
4678
|
license: "UNLICENSED",
|
|
@@ -4754,6 +4751,7 @@ var package_default = {
|
|
|
4754
4751
|
build: "npm run build:pkg",
|
|
4755
4752
|
"build:pkg": "npx @tailwindcss/cli -i src/tailwind.css -o src/index.css && tsup src/index.ts src/handlers/index.ts src/server.ts --format cjs,esm --dts --clean --no-splitting --tsconfig tsconfig.build.json --external react,react-dom,next,mongodb,pg,openai,@anthropic-ai/sdk,@pinecone-database/pinecone,axios,lucide-react,mammoth,pdf-parse,xlsx,react-markdown,remark-gfm,next-themes,langchain,@langchain/core,@langchain/openai,llamaindex --inject-style && npx @tailwindcss/cli -i src/tailwind.css -o dist/index.css",
|
|
4756
4753
|
lint: "eslint",
|
|
4754
|
+
typecheck: "tsc --noEmit -p tsconfig.build.json",
|
|
4757
4755
|
clean: "rm -rf dist"
|
|
4758
4756
|
},
|
|
4759
4757
|
peerDependencies: {
|
|
@@ -5140,7 +5138,6 @@ When presenting structured data, statistics, or comparisons, decide if it is bes
|
|
|
5140
5138
|
finalSystemPrompt += chartInstruction;
|
|
5141
5139
|
}
|
|
5142
5140
|
this.agent = createAgent({
|
|
5143
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5144
5141
|
model: chatModel,
|
|
5145
5142
|
tools: [searchTool],
|
|
5146
5143
|
systemPrompt: finalSystemPrompt
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NextRequest } from 'next/server';
|
|
2
|
-
import { i as RagConfig, I as ILLMProvider, C as ChatMessage, c as ChatResponse, f as IngestDocument } from './ILLMProvider-
|
|
2
|
+
import { i as RagConfig, I as ILLMProvider, C as ChatMessage, c as ChatResponse, f as IngestDocument } from './ILLMProvider-CcJ5N6XD.js';
|
|
3
3
|
|
|
4
4
|
interface ValidationError {
|
|
5
5
|
field: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NextRequest } from 'next/server';
|
|
2
|
-
import { i as RagConfig, I as ILLMProvider, C as ChatMessage, c as ChatResponse, f as IngestDocument } from './ILLMProvider-
|
|
2
|
+
import { i as RagConfig, I as ILLMProvider, C as ChatMessage, c as ChatResponse, f as IngestDocument } from './ILLMProvider-CcJ5N6XD.mjs';
|
|
3
3
|
|
|
4
4
|
interface ValidationError {
|
|
5
5
|
field: string;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps } from './BatchProcessor-
|
|
3
|
-
export { A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, h as Chunk, i as ChunkOptions, j as ConfigurationException, k as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, l as IRendererStrategy, m as IntentCategory,
|
|
4
|
-
import { O as ObservabilityTrace, U as UseRagChatOptions, a as UseRagChatReturn } from './ILLMProvider-
|
|
5
|
-
export { C as ChatMessage, b as ChatOptions, c as ChatResponse, E as EmbedOptions, d as EmbeddingConfig, e as EmbeddingProvider, I as ILLMProvider, f as IngestDocument, L as LLMConfig, g as LLMProvider, h as LatencyBreakdown, R as RAGConfig, i as RagConfig, j as RagMessage, k as RetrievalConfig, l as RetrievedChunk, T as TokenUsage, m as UIConfig, n as UniversalRagConfig, o as UpsertDocument, V as VectorDBConfig, p as VectorDBProvider, q as VectorMatch, W as WorkflowConfig } from './ILLMProvider-
|
|
2
|
+
import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps } from './BatchProcessor-tVzb9CdE.mjs';
|
|
3
|
+
export { A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, h as Chunk, i as ChunkOptions, j as ConfigurationException, k as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, l as IRendererStrategy, m as IntentCategory, L as LicenseValidationError, n as LicenseValidationRequest, o as LicenseValidationResponse, p as LicenseValidator, q as ProviderNotFoundException, R as RateLimitException, r as RenderDecision, s as RenderType, t as RetrievalException, u as Retrivora, v as RetrivoraError, w as RetrivoraErrorCode, x as SDKVersionUnsupportedError, y as SDK_VERSION, z as isTransientError } from './BatchProcessor-tVzb9CdE.mjs';
|
|
4
|
+
import { O as ObservabilityTrace, U as UseRagChatOptions, a as UseRagChatReturn } from './ILLMProvider-CcJ5N6XD.mjs';
|
|
5
|
+
export { C as ChatMessage, b as ChatOptions, c as ChatResponse, E as EmbedOptions, d as EmbeddingConfig, e as EmbeddingProvider, I as ILLMProvider, f as IngestDocument, L as LLMConfig, g as LLMProvider, h as LatencyBreakdown, R as RAGConfig, i as RagConfig, j as RagMessage, k as RetrievalConfig, l as RetrievedChunk, T as TokenUsage, m as UIConfig, n as UniversalRagConfig, o as UpsertDocument, V as VectorDBConfig, p as VectorDBProvider, q as VectorMatch, W as WorkflowConfig } from './ILLMProvider-CcJ5N6XD.mjs';
|
|
6
6
|
import 'react';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps } from './BatchProcessor-
|
|
3
|
-
export { A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, h as Chunk, i as ChunkOptions, j as ConfigurationException, k as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, l as IRendererStrategy, m as IntentCategory,
|
|
4
|
-
import { O as ObservabilityTrace, U as UseRagChatOptions, a as UseRagChatReturn } from './ILLMProvider-
|
|
5
|
-
export { C as ChatMessage, b as ChatOptions, c as ChatResponse, E as EmbedOptions, d as EmbeddingConfig, e as EmbeddingProvider, I as ILLMProvider, f as IngestDocument, L as LLMConfig, g as LLMProvider, h as LatencyBreakdown, R as RAGConfig, i as RagConfig, j as RagMessage, k as RetrievalConfig, l as RetrievedChunk, T as TokenUsage, m as UIConfig, n as UniversalRagConfig, o as UpsertDocument, V as VectorDBConfig, p as VectorDBProvider, q as VectorMatch, W as WorkflowConfig } from './ILLMProvider-
|
|
2
|
+
import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps } from './BatchProcessor-CQDtlggz.js';
|
|
3
|
+
export { A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, h as Chunk, i as ChunkOptions, j as ConfigurationException, k as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, l as IRendererStrategy, m as IntentCategory, L as LicenseValidationError, n as LicenseValidationRequest, o as LicenseValidationResponse, p as LicenseValidator, q as ProviderNotFoundException, R as RateLimitException, r as RenderDecision, s as RenderType, t as RetrievalException, u as Retrivora, v as RetrivoraError, w as RetrivoraErrorCode, x as SDKVersionUnsupportedError, y as SDK_VERSION, z as isTransientError } from './BatchProcessor-CQDtlggz.js';
|
|
4
|
+
import { O as ObservabilityTrace, U as UseRagChatOptions, a as UseRagChatReturn } from './ILLMProvider-CcJ5N6XD.js';
|
|
5
|
+
export { C as ChatMessage, b as ChatOptions, c as ChatResponse, E as EmbedOptions, d as EmbeddingConfig, e as EmbeddingProvider, I as ILLMProvider, f as IngestDocument, L as LLMConfig, g as LLMProvider, h as LatencyBreakdown, R as RAGConfig, i as RagConfig, j as RagMessage, k as RetrievalConfig, l as RetrievedChunk, T as TokenUsage, m as UIConfig, n as UniversalRagConfig, o as UpsertDocument, V as VectorDBConfig, p as VectorDBProvider, q as VectorMatch, W as WorkflowConfig } from './ILLMProvider-CcJ5N6XD.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
|
|
8
8
|
/**
|