@retrivora-ai/rag-engine 1.8.9 → 1.9.1

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 (44) hide show
  1. package/dist/{ILLMProvider-CbUtvWAW.d.mts → ILLMProvider-BQyKZLnd.d.mts} +10 -2
  2. package/dist/{ILLMProvider-CbUtvWAW.d.ts → ILLMProvider-BQyKZLnd.d.ts} +10 -2
  3. package/dist/handlers/index.d.mts +2 -2
  4. package/dist/handlers/index.d.ts +2 -2
  5. package/dist/handlers/index.js +1726 -522
  6. package/dist/handlers/index.mjs +1725 -521
  7. package/dist/{index-DgzcnqZs.d.ts → index-A0GqPsaG.d.ts} +1 -1
  8. package/dist/{index-c_y_5qdw.d.mts → index-CDftK3qs.d.mts} +1 -1
  9. package/dist/index.css +26 -0
  10. package/dist/index.d.mts +2 -2
  11. package/dist/index.d.ts +2 -2
  12. package/dist/index.js +246 -76
  13. package/dist/index.mjs +248 -76
  14. package/dist/server.d.mts +32 -5
  15. package/dist/server.d.ts +32 -5
  16. package/dist/server.js +1735 -733
  17. package/dist/server.mjs +1733 -731
  18. package/package.json +1 -1
  19. package/src/components/MarkdownComponents.tsx +3 -3
  20. package/src/components/MessageBubble.tsx +49 -2
  21. package/src/components/ProductCard.tsx +33 -6
  22. package/src/components/UIDispatcher.tsx +1 -0
  23. package/src/components/VisualizationRenderer.tsx +143 -11
  24. package/src/config/EmbeddingStrategy.ts +5 -4
  25. package/src/config/RagConfig.ts +10 -2
  26. package/src/config/serverConfig.ts +16 -1
  27. package/src/core/LLMRouter.ts +79 -0
  28. package/src/core/Pipeline.ts +262 -45
  29. package/src/core/ProviderRegistry.ts +6 -0
  30. package/src/core/QueryProcessor.ts +98 -0
  31. package/src/handlers/index.ts +8 -5
  32. package/src/hooks/useRagChat.ts +53 -17
  33. package/src/llm/providers/UniversalLLMAdapter.ts +110 -13
  34. package/src/providers/vectordb/ChromaDBProvider.ts +13 -6
  35. package/src/providers/vectordb/MilvusProvider.ts +18 -2
  36. package/src/providers/vectordb/MultiTablePostgresProvider.ts +16 -29
  37. package/src/providers/vectordb/PostgreSQLProvider.ts +4 -15
  38. package/src/providers/vectordb/QdrantProvider.ts +2 -5
  39. package/src/providers/vectordb/RedisProvider.ts +3 -4
  40. package/src/providers/vectordb/WeaviateProvider.ts +41 -3
  41. package/src/types/index.ts +26 -0
  42. package/src/utils/ProductExtractor.ts +5 -3
  43. package/src/utils/UITransformer.ts +1345 -534
  44. package/src/utils/synonyms.ts +2 -0
@@ -1,4 +1,4 @@
1
- import { k as RagConfig, I as ILLMProvider, C as ChatMessage, d as ChatResponse, g as IngestDocument } from './ILLMProvider-CbUtvWAW.js';
1
+ import { k as RagConfig, I as ILLMProvider, C as ChatMessage, d as ChatResponse, g as IngestDocument } from './ILLMProvider-BQyKZLnd.js';
2
2
  import { NextRequest, NextResponse } from 'next/server';
3
3
 
4
4
  interface ValidationError {
@@ -1,4 +1,4 @@
1
- import { k as RagConfig, I as ILLMProvider, C as ChatMessage, d as ChatResponse, g as IngestDocument } from './ILLMProvider-CbUtvWAW.mjs';
1
+ import { k as RagConfig, I as ILLMProvider, C as ChatMessage, d as ChatResponse, g as IngestDocument } from './ILLMProvider-BQyKZLnd.mjs';
2
2
  import { NextRequest, NextResponse } from 'next/server';
3
3
 
4
4
  interface ValidationError {
package/dist/index.css CHANGED
@@ -42,6 +42,7 @@
42
42
  --color-rose-200: oklch(89.2% 0.058 10.001);
43
43
  --color-rose-400: oklch(71.2% 0.194 13.428);
44
44
  --color-rose-500: oklch(64.5% 0.246 16.439);
45
+ --color-rose-600: oklch(58.6% 0.253 17.585);
45
46
  --color-slate-50: oklch(98.4% 0.003 247.858);
46
47
  --color-slate-100: oklch(96.8% 0.007 247.896);
47
48
  --color-slate-200: oklch(92.9% 0.013 255.508);
@@ -66,6 +67,8 @@
66
67
  --text-xs--line-height: calc(1 / 0.75);
67
68
  --text-sm: 0.875rem;
68
69
  --text-sm--line-height: calc(1.25 / 0.875);
70
+ --text-base: 1rem;
71
+ --text-base--line-height: calc(1.5 / 1);
69
72
  --text-lg: 1.125rem;
70
73
  --text-lg--line-height: calc(1.75 / 1.125);
71
74
  --text-xl: 1.25rem;
@@ -535,6 +538,9 @@
535
538
  .hidden {
536
539
  display: none;
537
540
  }
541
+ .inline {
542
+ display: inline;
543
+ }
538
544
  .inline-block {
539
545
  display: inline-block;
540
546
  }
@@ -1427,6 +1433,10 @@
1427
1433
  font-size: var(--text-7xl);
1428
1434
  line-height: var(--tw-leading, var(--text-7xl--line-height));
1429
1435
  }
1436
+ .text-base {
1437
+ font-size: var(--text-base);
1438
+ line-height: var(--tw-leading, var(--text-base--line-height));
1439
+ }
1430
1440
  .text-lg {
1431
1441
  font-size: var(--text-lg);
1432
1442
  line-height: var(--tw-leading, var(--text-lg--line-height));
@@ -1576,6 +1586,9 @@
1576
1586
  .text-rose-500 {
1577
1587
  color: var(--color-rose-500);
1578
1588
  }
1589
+ .text-rose-600 {
1590
+ color: var(--color-rose-600);
1591
+ }
1579
1592
  .text-slate-100 {
1580
1593
  color: var(--color-slate-100);
1581
1594
  }
@@ -2119,6 +2132,11 @@
2119
2132
  }
2120
2133
  }
2121
2134
  }
2135
+ .sm\:grid-cols-2 {
2136
+ @media (width >= 40rem) {
2137
+ grid-template-columns: repeat(2, minmax(0, 1fr));
2138
+ }
2139
+ }
2122
2140
  .sm\:grid-cols-3 {
2123
2141
  @media (width >= 40rem) {
2124
2142
  grid-template-columns: repeat(3, minmax(0, 1fr));
@@ -2608,6 +2626,14 @@
2608
2626
  }
2609
2627
  }
2610
2628
  }
2629
+ .dark\:text-white\/75 {
2630
+ @media (prefers-color-scheme: dark) {
2631
+ color: color-mix(in srgb, #fff 75%, transparent);
2632
+ @supports (color: color-mix(in lab, red, red)) {
2633
+ color: color-mix(in oklab, var(--color-white) 75%, transparent);
2634
+ }
2635
+ }
2636
+ }
2611
2637
  .dark\:text-white\/80 {
2612
2638
  @media (prefers-color-scheme: dark) {
2613
2639
  color: color-mix(in srgb, #fff 80%, transparent);
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { CSSProperties, MouseEvent, ReactNode } from 'react';
3
- import { P as Product, U as UIConfig, R as RagMessage, V as VectorMatch, O as ObservabilityTrace, a as UseRagChatOptions, b as UseRagChatReturn } from './ILLMProvider-CbUtvWAW.mjs';
4
- export { C as ChatMessage, c as ChatOptions, d as ChatResponse, E as EmbedOptions, e as EmbeddingConfig, f as EmbeddingProvider, I as ILLMProvider, g as IngestDocument, L as LLMConfig, h as LLMProvider, i as LatencyBreakdown, j as RAGConfig, k as RagConfig, l as RetrievedChunk, T as TokenUsage, m as UpsertDocument, n as VectorDBConfig, o as VectorDBProvider } from './ILLMProvider-CbUtvWAW.mjs';
3
+ import { P as Product, U as UIConfig, R as RagMessage, V as VectorMatch, O as ObservabilityTrace, a as UseRagChatOptions, b as UseRagChatReturn } from './ILLMProvider-BQyKZLnd.mjs';
4
+ export { C as ChatMessage, c as ChatOptions, d as ChatResponse, E as EmbedOptions, e as EmbeddingConfig, f as EmbeddingProvider, I as ILLMProvider, g as IngestDocument, L as LLMConfig, h as LLMProvider, i as LatencyBreakdown, j as RAGConfig, k as RagConfig, l as RetrievedChunk, T as TokenUsage, m as UpsertDocument, n as VectorDBConfig, o as VectorDBProvider } from './ILLMProvider-BQyKZLnd.mjs';
5
5
  export { C as Chunk, a as ChunkOptions } from './DocumentChunker-Dh9TvmGG.mjs';
6
6
 
7
7
  type ChatViewportSize = 'compact' | 'medium' | 'large';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { CSSProperties, MouseEvent, ReactNode } from 'react';
3
- import { P as Product, U as UIConfig, R as RagMessage, V as VectorMatch, O as ObservabilityTrace, a as UseRagChatOptions, b as UseRagChatReturn } from './ILLMProvider-CbUtvWAW.js';
4
- export { C as ChatMessage, c as ChatOptions, d as ChatResponse, E as EmbedOptions, e as EmbeddingConfig, f as EmbeddingProvider, I as ILLMProvider, g as IngestDocument, L as LLMConfig, h as LLMProvider, i as LatencyBreakdown, j as RAGConfig, k as RagConfig, l as RetrievedChunk, T as TokenUsage, m as UpsertDocument, n as VectorDBConfig, o as VectorDBProvider } from './ILLMProvider-CbUtvWAW.js';
3
+ import { P as Product, U as UIConfig, R as RagMessage, V as VectorMatch, O as ObservabilityTrace, a as UseRagChatOptions, b as UseRagChatReturn } from './ILLMProvider-BQyKZLnd.js';
4
+ export { C as ChatMessage, c as ChatOptions, d as ChatResponse, E as EmbedOptions, e as EmbeddingConfig, f as EmbeddingProvider, I as ILLMProvider, g as IngestDocument, L as LLMConfig, h as LLMProvider, i as LatencyBreakdown, j as RAGConfig, k as RagConfig, l as RetrievedChunk, T as TokenUsage, m as UpsertDocument, n as VectorDBConfig, o as VectorDBProvider } from './ILLMProvider-BQyKZLnd.js';
5
5
  export { C as Chunk, a as ChunkOptions } from './DocumentChunker-Dh9TvmGG.js';
6
6
 
7
7
  type ChatViewportSize = 'compact' | 'medium' | 'large';