@retrivora-ai/rag-engine 1.9.2 → 1.9.6

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 (60) hide show
  1. package/README.md +27 -0
  2. package/dist/{ILLMProvider-Bw2A28nU.d.mts → ILLMProvider-DNhyOYoK.d.mts} +41 -1
  3. package/dist/{ILLMProvider-Bw2A28nU.d.ts → ILLMProvider-DNhyOYoK.d.ts} +41 -1
  4. package/dist/handlers/index.d.mts +2 -2
  5. package/dist/handlers/index.d.ts +2 -2
  6. package/dist/handlers/index.js +563 -205
  7. package/dist/handlers/index.mjs +563 -205
  8. package/dist/index-C9v7-tWd.d.mts +183 -0
  9. package/dist/{index-B70ZLkfG.d.mts → index-CHL1jdYm.d.mts} +1 -1
  10. package/dist/index-CjQdL0cX.d.ts +183 -0
  11. package/dist/{index-DVu-mkAM.d.ts → index-Hgbwl9X4.d.ts} +1 -1
  12. package/dist/index.css +40 -0
  13. package/dist/index.d.mts +3 -3
  14. package/dist/index.d.ts +3 -3
  15. package/dist/index.js +326 -158
  16. package/dist/index.mjs +312 -151
  17. package/dist/server.d.mts +15 -94
  18. package/dist/server.d.ts +15 -94
  19. package/dist/server.js +623 -205
  20. package/dist/server.mjs +615 -205
  21. package/package.json +1 -1
  22. package/src/app/api/chat/route.ts +2 -2
  23. package/src/app/api/health/route.ts +3 -2
  24. package/src/app/api/ingest/route.ts +3 -2
  25. package/src/app/api/suggestions/route.ts +3 -2
  26. package/src/app/api/upload/route.ts +3 -2
  27. package/src/app/constants.tsx +85 -30
  28. package/src/app/layout.tsx +18 -7
  29. package/src/components/MessageBubble.tsx +39 -2
  30. package/src/components/ThinkingBlock.tsx +75 -0
  31. package/src/components/VisualizationRenderer.tsx +27 -1
  32. package/src/config/RagConfig.ts +47 -0
  33. package/src/config/serverConfig.ts +25 -0
  34. package/src/core/ConfigResolver.ts +56 -4
  35. package/src/core/ConfigValidator.ts +2 -1
  36. package/src/core/Pipeline.ts +226 -68
  37. package/src/core/ProviderRegistry.ts +11 -2
  38. package/src/core/QueryProcessor.ts +38 -4
  39. package/src/core/Retrivora.ts +51 -0
  40. package/src/exceptions/index.ts +59 -0
  41. package/src/handlers/index.ts +2 -0
  42. package/src/hooks/useRagChat.ts +26 -4
  43. package/src/index.ts +25 -1
  44. package/src/lib/plugin.ts +24 -0
  45. package/src/llm/LLMFactory.ts +4 -1
  46. package/src/llm/providers/AnthropicProvider.ts +70 -20
  47. package/src/llm/providers/GeminiProvider.ts +14 -15
  48. package/src/llm/providers/OllamaProvider.ts +13 -16
  49. package/src/llm/providers/OpenAIProvider.ts +9 -14
  50. package/src/llm/providers/UniversalLLMAdapter.ts +5 -5
  51. package/src/llm/utils.ts +46 -0
  52. package/src/providers/vectordb/MongoDBProvider.ts +19 -7
  53. package/src/providers/vectordb/MultiTablePostgresProvider.ts +45 -13
  54. package/src/rag/EntityExtractor.ts +2 -2
  55. package/src/rag/Reranker.ts +9 -16
  56. package/src/server.ts +27 -1
  57. package/src/types/chat.ts +7 -0
  58. package/src/utils/UITransformer.ts +73 -4
  59. package/dist/DocumentChunker-Dh9TvmGG.d.mts +0 -45
  60. package/dist/DocumentChunker-Dh9TvmGG.d.ts +0 -45
@@ -0,0 +1,183 @@
1
+ import { k as RagConfig, I as ILLMProvider, g as IngestDocument, C as ChatMessage, d as ChatResponse, u as RetrievalResult, n as UniversalRagConfig } from './ILLMProvider-DNhyOYoK.mjs';
2
+
3
+ /**
4
+ * DocumentChunker — splits long text into overlapping chunks
5
+ * suitable for vector embedding and retrieval.
6
+ *
7
+ * Strategy: sentence-aware sliding window
8
+ * 1. Split on sentence boundaries
9
+ * 2. Accumulate sentences into chunks up to `chunkSize` characters
10
+ * 3. Carry over `chunkOverlap` characters from the previous chunk
11
+ */
12
+ interface Chunk {
13
+ id: string;
14
+ content: string;
15
+ metadata?: Record<string, unknown>;
16
+ }
17
+ interface ChunkOptions {
18
+ /** Target chunk size in characters (default 1000) */
19
+ chunkSize?: number;
20
+ /** Overlap between consecutive chunks in characters (default 200) */
21
+ chunkOverlap?: number;
22
+ /** Source document identifier used as ID prefix */
23
+ docId?: string | number;
24
+ /** Extra metadata to attach to every chunk */
25
+ metadata?: Record<string, unknown>;
26
+ /** Characters used to split text, in order of priority */
27
+ separators?: string[];
28
+ }
29
+ declare class DocumentChunker {
30
+ private readonly chunkSize;
31
+ private readonly chunkOverlap;
32
+ private readonly separators;
33
+ constructor(chunkSize?: number, chunkOverlap?: number, separators?: string[]);
34
+ /**
35
+ * Split a single text string into overlapping chunks using a recursive strategy.
36
+ * Preserves structural boundaries (Markdown headers) where possible.
37
+ */
38
+ chunk(text: string, options?: ChunkOptions): Chunk[];
39
+ private recursiveSplit;
40
+ chunkMany(documents: Array<{
41
+ content: string;
42
+ docId?: string | number;
43
+ metadata?: Record<string, unknown>;
44
+ }>): Chunk[];
45
+ }
46
+
47
+ /**
48
+ * Pipeline — orchestrates the RAG flow: Embed → Search → Augment → Generate.
49
+ *
50
+ * Features:
51
+ * - Lazy initialization of providers
52
+ * - Batch processing with retry logic
53
+ * - Smart embedding strategy (integrated / separate / external)
54
+ * - Error recovery for transient failures
55
+ * - Multi-tenancy support via namespacing
56
+ * - LRU-bounded embedding cache (max 500 entries, prevents memory leaks)
57
+ * - Full observability tracing (latency, tokens, hallucination scoring)
58
+ */
59
+ declare class Pipeline {
60
+ private config;
61
+ private vectorDB;
62
+ private graphDB?;
63
+ private llmProvider;
64
+ private embeddingProvider;
65
+ private llmRouter;
66
+ private chunker;
67
+ private llamaIngestor?;
68
+ private entityExtractor?;
69
+ private reranker;
70
+ private agent?;
71
+ /** LRU-bounded cache: avoids re-embedding identical queries within the same process. */
72
+ private embeddingCache;
73
+ private initialised;
74
+ constructor(config: RagConfig);
75
+ /**
76
+ * Expose the underlying LLM provider (set after initialize()).
77
+ * Used by the stream handler to pass to UITransformer.analyzeAndDecide().
78
+ */
79
+ getLLMProvider(): ILLMProvider | undefined;
80
+ initialize(): Promise<void>;
81
+ /**
82
+ * Ingest documents with automatic chunking, embedding, and batch upsert.
83
+ */
84
+ ingest(documents: IngestDocument[], namespace?: string): Promise<Array<{
85
+ docId: string | number;
86
+ chunksIngested: number;
87
+ }>>;
88
+ /** Step 1: Chunk the document content. */
89
+ private prepareChunks;
90
+ /**
91
+ * Step 2: Generate embeddings for chunks with retry logic.
92
+ * Uses batchEmbed when available for efficiency; falls back to sequential embedding.
93
+ */
94
+ private processEmbeddings;
95
+ /** Step 3: Upsert chunks to vector database with retry logic. */
96
+ private processUpserts;
97
+ /** Step 4: Optional graph-based entity extraction and ingestion. */
98
+ private processGraphIngestion;
99
+ ask(question: string, history?: ChatMessage[], namespace?: string): Promise<ChatResponse>;
100
+ /**
101
+ * High-performance streaming RAG flow.
102
+ * Yields text chunks first, then the retrieval metadata + observability trace at the end.
103
+ *
104
+ * Latency optimizations:
105
+ * - Strategy classification runs in parallel with query embedding (saves ~400ms)
106
+ * - Hallucination scoring is fire-and-forget (doesn't block metadata yield)
107
+ * - UITransformation is computed after text streaming and emitted with metadata
108
+ * - SchemaMapper.train runs while answer generation streams
109
+ */
110
+ askStream(question: string, history?: ChatMessage[], namespace?: string): AsyncIterable<string | ChatResponse>;
111
+ /**
112
+ * Universal retrieval method combining all enabled providers.
113
+ * Uses an LRU-bounded embedding cache to avoid re-embedding the same query.
114
+ */
115
+ private generateUiTransformation;
116
+ private applyStructuredFilters;
117
+ private resolveNumericPredicateValue;
118
+ private extractNumericValueFromContent;
119
+ private matchesNumericPredicate;
120
+ private normalizeComparableField;
121
+ private fieldSimilarityScore;
122
+ private fieldTokens;
123
+ private toFiniteNumber;
124
+ retrieve(query: string, options: {
125
+ namespace?: string;
126
+ topK?: number;
127
+ filter?: Record<string, unknown>;
128
+ }): Promise<RetrievalResult>;
129
+ /** Rewrite the user query for better retrieval performance. */
130
+ private rewriteQuery;
131
+ /** Generate 3-5 short, relevant questions based on the vector database content. */
132
+ getSuggestions(query: string, namespace?: string): Promise<string[]>;
133
+ }
134
+
135
+ /**
136
+ * Public SDK facade matching the prompt-level Retrivora API.
137
+ *
138
+ * It keeps provider details behind configuration and delegates execution to the
139
+ * existing Pipeline implementation.
140
+ */
141
+ declare class Retrivora {
142
+ private readonly pipeline;
143
+ readonly config: RagConfig;
144
+ constructor(config?: UniversalRagConfig);
145
+ initialize(): Promise<void>;
146
+ ingest(documents: IngestDocument[], namespace?: string): Promise<Array<{
147
+ docId: string | number;
148
+ chunksIngested: number;
149
+ }>>;
150
+ ask(question: string, history?: ChatMessage[], namespace?: string): Promise<ChatResponse>;
151
+ askStream(question: string, history?: ChatMessage[], namespace?: string): AsyncIterable<string | ChatResponse>;
152
+ getPipeline(): Pipeline;
153
+ }
154
+
155
+ /**
156
+ * Named SDK exceptions make failures machine-readable for host applications.
157
+ */
158
+ type RetrivoraErrorCode = 'PROVIDER_NOT_FOUND' | 'EMBEDDING_FAILED' | 'RETRIEVAL_FAILED' | 'RATE_LIMITED' | 'CONFIGURATION_ERROR' | 'AUTHENTICATION_ERROR';
159
+ declare class RetrivoraError extends Error {
160
+ readonly code: RetrivoraErrorCode;
161
+ readonly details?: unknown;
162
+ constructor(message: string, code: RetrivoraErrorCode, details?: unknown);
163
+ }
164
+ declare class ProviderNotFoundException extends RetrivoraError {
165
+ constructor(providerType: string, provider: string, details?: unknown);
166
+ }
167
+ declare class EmbeddingFailedException extends RetrivoraError {
168
+ constructor(message?: string, details?: unknown);
169
+ }
170
+ declare class RetrievalException extends RetrivoraError {
171
+ constructor(message?: string, details?: unknown);
172
+ }
173
+ declare class RateLimitException extends RetrivoraError {
174
+ constructor(message?: string, details?: unknown);
175
+ }
176
+ declare class ConfigurationException extends RetrivoraError {
177
+ constructor(message: string, details?: unknown);
178
+ }
179
+ declare class AuthenticationException extends RetrivoraError {
180
+ constructor(message?: string, details?: unknown);
181
+ }
182
+
183
+ export { AuthenticationException as A, type Chunk as C, DocumentChunker as D, EmbeddingFailedException as E, ProviderNotFoundException as P, RateLimitException as R, type ChunkOptions as a, ConfigurationException as b, RetrievalException as c, Retrivora as d, RetrivoraError as e, type RetrivoraErrorCode as f, Pipeline as g };
@@ -1,4 +1,4 @@
1
- import { k as RagConfig, I as ILLMProvider, C as ChatMessage, d as ChatResponse, g as IngestDocument } from './ILLMProvider-Bw2A28nU.mjs';
1
+ import { k as RagConfig, I as ILLMProvider, C as ChatMessage, d as ChatResponse, g as IngestDocument } from './ILLMProvider-DNhyOYoK.mjs';
2
2
  import { NextRequest, NextResponse } from 'next/server';
3
3
 
4
4
  interface ValidationError {
@@ -0,0 +1,183 @@
1
+ import { k as RagConfig, I as ILLMProvider, g as IngestDocument, C as ChatMessage, d as ChatResponse, u as RetrievalResult, n as UniversalRagConfig } from './ILLMProvider-DNhyOYoK.js';
2
+
3
+ /**
4
+ * DocumentChunker — splits long text into overlapping chunks
5
+ * suitable for vector embedding and retrieval.
6
+ *
7
+ * Strategy: sentence-aware sliding window
8
+ * 1. Split on sentence boundaries
9
+ * 2. Accumulate sentences into chunks up to `chunkSize` characters
10
+ * 3. Carry over `chunkOverlap` characters from the previous chunk
11
+ */
12
+ interface Chunk {
13
+ id: string;
14
+ content: string;
15
+ metadata?: Record<string, unknown>;
16
+ }
17
+ interface ChunkOptions {
18
+ /** Target chunk size in characters (default 1000) */
19
+ chunkSize?: number;
20
+ /** Overlap between consecutive chunks in characters (default 200) */
21
+ chunkOverlap?: number;
22
+ /** Source document identifier used as ID prefix */
23
+ docId?: string | number;
24
+ /** Extra metadata to attach to every chunk */
25
+ metadata?: Record<string, unknown>;
26
+ /** Characters used to split text, in order of priority */
27
+ separators?: string[];
28
+ }
29
+ declare class DocumentChunker {
30
+ private readonly chunkSize;
31
+ private readonly chunkOverlap;
32
+ private readonly separators;
33
+ constructor(chunkSize?: number, chunkOverlap?: number, separators?: string[]);
34
+ /**
35
+ * Split a single text string into overlapping chunks using a recursive strategy.
36
+ * Preserves structural boundaries (Markdown headers) where possible.
37
+ */
38
+ chunk(text: string, options?: ChunkOptions): Chunk[];
39
+ private recursiveSplit;
40
+ chunkMany(documents: Array<{
41
+ content: string;
42
+ docId?: string | number;
43
+ metadata?: Record<string, unknown>;
44
+ }>): Chunk[];
45
+ }
46
+
47
+ /**
48
+ * Pipeline — orchestrates the RAG flow: Embed → Search → Augment → Generate.
49
+ *
50
+ * Features:
51
+ * - Lazy initialization of providers
52
+ * - Batch processing with retry logic
53
+ * - Smart embedding strategy (integrated / separate / external)
54
+ * - Error recovery for transient failures
55
+ * - Multi-tenancy support via namespacing
56
+ * - LRU-bounded embedding cache (max 500 entries, prevents memory leaks)
57
+ * - Full observability tracing (latency, tokens, hallucination scoring)
58
+ */
59
+ declare class Pipeline {
60
+ private config;
61
+ private vectorDB;
62
+ private graphDB?;
63
+ private llmProvider;
64
+ private embeddingProvider;
65
+ private llmRouter;
66
+ private chunker;
67
+ private llamaIngestor?;
68
+ private entityExtractor?;
69
+ private reranker;
70
+ private agent?;
71
+ /** LRU-bounded cache: avoids re-embedding identical queries within the same process. */
72
+ private embeddingCache;
73
+ private initialised;
74
+ constructor(config: RagConfig);
75
+ /**
76
+ * Expose the underlying LLM provider (set after initialize()).
77
+ * Used by the stream handler to pass to UITransformer.analyzeAndDecide().
78
+ */
79
+ getLLMProvider(): ILLMProvider | undefined;
80
+ initialize(): Promise<void>;
81
+ /**
82
+ * Ingest documents with automatic chunking, embedding, and batch upsert.
83
+ */
84
+ ingest(documents: IngestDocument[], namespace?: string): Promise<Array<{
85
+ docId: string | number;
86
+ chunksIngested: number;
87
+ }>>;
88
+ /** Step 1: Chunk the document content. */
89
+ private prepareChunks;
90
+ /**
91
+ * Step 2: Generate embeddings for chunks with retry logic.
92
+ * Uses batchEmbed when available for efficiency; falls back to sequential embedding.
93
+ */
94
+ private processEmbeddings;
95
+ /** Step 3: Upsert chunks to vector database with retry logic. */
96
+ private processUpserts;
97
+ /** Step 4: Optional graph-based entity extraction and ingestion. */
98
+ private processGraphIngestion;
99
+ ask(question: string, history?: ChatMessage[], namespace?: string): Promise<ChatResponse>;
100
+ /**
101
+ * High-performance streaming RAG flow.
102
+ * Yields text chunks first, then the retrieval metadata + observability trace at the end.
103
+ *
104
+ * Latency optimizations:
105
+ * - Strategy classification runs in parallel with query embedding (saves ~400ms)
106
+ * - Hallucination scoring is fire-and-forget (doesn't block metadata yield)
107
+ * - UITransformation is computed after text streaming and emitted with metadata
108
+ * - SchemaMapper.train runs while answer generation streams
109
+ */
110
+ askStream(question: string, history?: ChatMessage[], namespace?: string): AsyncIterable<string | ChatResponse>;
111
+ /**
112
+ * Universal retrieval method combining all enabled providers.
113
+ * Uses an LRU-bounded embedding cache to avoid re-embedding the same query.
114
+ */
115
+ private generateUiTransformation;
116
+ private applyStructuredFilters;
117
+ private resolveNumericPredicateValue;
118
+ private extractNumericValueFromContent;
119
+ private matchesNumericPredicate;
120
+ private normalizeComparableField;
121
+ private fieldSimilarityScore;
122
+ private fieldTokens;
123
+ private toFiniteNumber;
124
+ retrieve(query: string, options: {
125
+ namespace?: string;
126
+ topK?: number;
127
+ filter?: Record<string, unknown>;
128
+ }): Promise<RetrievalResult>;
129
+ /** Rewrite the user query for better retrieval performance. */
130
+ private rewriteQuery;
131
+ /** Generate 3-5 short, relevant questions based on the vector database content. */
132
+ getSuggestions(query: string, namespace?: string): Promise<string[]>;
133
+ }
134
+
135
+ /**
136
+ * Public SDK facade matching the prompt-level Retrivora API.
137
+ *
138
+ * It keeps provider details behind configuration and delegates execution to the
139
+ * existing Pipeline implementation.
140
+ */
141
+ declare class Retrivora {
142
+ private readonly pipeline;
143
+ readonly config: RagConfig;
144
+ constructor(config?: UniversalRagConfig);
145
+ initialize(): Promise<void>;
146
+ ingest(documents: IngestDocument[], namespace?: string): Promise<Array<{
147
+ docId: string | number;
148
+ chunksIngested: number;
149
+ }>>;
150
+ ask(question: string, history?: ChatMessage[], namespace?: string): Promise<ChatResponse>;
151
+ askStream(question: string, history?: ChatMessage[], namespace?: string): AsyncIterable<string | ChatResponse>;
152
+ getPipeline(): Pipeline;
153
+ }
154
+
155
+ /**
156
+ * Named SDK exceptions make failures machine-readable for host applications.
157
+ */
158
+ type RetrivoraErrorCode = 'PROVIDER_NOT_FOUND' | 'EMBEDDING_FAILED' | 'RETRIEVAL_FAILED' | 'RATE_LIMITED' | 'CONFIGURATION_ERROR' | 'AUTHENTICATION_ERROR';
159
+ declare class RetrivoraError extends Error {
160
+ readonly code: RetrivoraErrorCode;
161
+ readonly details?: unknown;
162
+ constructor(message: string, code: RetrivoraErrorCode, details?: unknown);
163
+ }
164
+ declare class ProviderNotFoundException extends RetrivoraError {
165
+ constructor(providerType: string, provider: string, details?: unknown);
166
+ }
167
+ declare class EmbeddingFailedException extends RetrivoraError {
168
+ constructor(message?: string, details?: unknown);
169
+ }
170
+ declare class RetrievalException extends RetrivoraError {
171
+ constructor(message?: string, details?: unknown);
172
+ }
173
+ declare class RateLimitException extends RetrivoraError {
174
+ constructor(message?: string, details?: unknown);
175
+ }
176
+ declare class ConfigurationException extends RetrivoraError {
177
+ constructor(message: string, details?: unknown);
178
+ }
179
+ declare class AuthenticationException extends RetrivoraError {
180
+ constructor(message?: string, details?: unknown);
181
+ }
182
+
183
+ export { AuthenticationException as A, type Chunk as C, DocumentChunker as D, EmbeddingFailedException as E, ProviderNotFoundException as P, RateLimitException as R, type ChunkOptions as a, ConfigurationException as b, RetrievalException as c, Retrivora as d, RetrivoraError as e, type RetrivoraErrorCode as f, Pipeline as g };
@@ -1,4 +1,4 @@
1
- import { k as RagConfig, I as ILLMProvider, C as ChatMessage, d as ChatResponse, g as IngestDocument } from './ILLMProvider-Bw2A28nU.js';
1
+ import { k as RagConfig, I as ILLMProvider, C as ChatMessage, d as ChatResponse, g as IngestDocument } from './ILLMProvider-DNhyOYoK.js';
2
2
  import { NextRequest, NextResponse } from 'next/server';
3
3
 
4
4
  interface ValidationError {
package/dist/index.css CHANGED
@@ -409,6 +409,9 @@
409
409
  .mx-auto {
410
410
  margin-inline: auto;
411
411
  }
412
+ .my-1\.5 {
413
+ margin-block: calc(var(--spacing) * 1.5);
414
+ }
412
415
  .my-2 {
413
416
  margin-block: calc(var(--spacing) * 2);
414
417
  }
@@ -607,6 +610,9 @@
607
610
  .h-16 {
608
611
  height: calc(var(--spacing) * 16);
609
612
  }
613
+ .h-28 {
614
+ height: calc(var(--spacing) * 28);
615
+ }
610
616
  .h-32 {
611
617
  height: calc(var(--spacing) * 32);
612
618
  }
@@ -637,6 +643,9 @@
637
643
  .max-h-56 {
638
644
  max-height: calc(var(--spacing) * 56);
639
645
  }
646
+ .max-h-60 {
647
+ max-height: calc(var(--spacing) * 60);
648
+ }
640
649
  .max-h-64 {
641
650
  max-height: calc(var(--spacing) * 64);
642
651
  }
@@ -712,9 +721,21 @@
712
721
  .w-16 {
713
722
  width: calc(var(--spacing) * 16);
714
723
  }
724
+ .w-20 {
725
+ width: calc(var(--spacing) * 20);
726
+ }
727
+ .w-28 {
728
+ width: calc(var(--spacing) * 28);
729
+ }
730
+ .w-36 {
731
+ width: calc(var(--spacing) * 36);
732
+ }
715
733
  .w-40 {
716
734
  width: calc(var(--spacing) * 40);
717
735
  }
736
+ .w-44 {
737
+ width: calc(var(--spacing) * 44);
738
+ }
718
739
  .w-\[400\%\] {
719
740
  width: 400%;
720
741
  }
@@ -1234,6 +1255,9 @@
1234
1255
  background-color: color-mix(in oklab, var(--color-emerald-50) 50%, transparent);
1235
1256
  }
1236
1257
  }
1258
+ .bg-emerald-100 {
1259
+ background-color: var(--color-emerald-100);
1260
+ }
1237
1261
  .bg-emerald-500 {
1238
1262
  background-color: var(--color-emerald-500);
1239
1263
  }
@@ -1270,6 +1294,18 @@
1270
1294
  .bg-slate-50 {
1271
1295
  background-color: var(--color-slate-50);
1272
1296
  }
1297
+ .bg-slate-50\/20 {
1298
+ background-color: color-mix(in srgb, oklch(98.4% 0.003 247.858) 20%, transparent);
1299
+ @supports (color: color-mix(in lab, red, red)) {
1300
+ background-color: color-mix(in oklab, var(--color-slate-50) 20%, transparent);
1301
+ }
1302
+ }
1303
+ .bg-slate-50\/50 {
1304
+ background-color: color-mix(in srgb, oklch(98.4% 0.003 247.858) 50%, transparent);
1305
+ @supports (color: color-mix(in lab, red, red)) {
1306
+ background-color: color-mix(in oklab, var(--color-slate-50) 50%, transparent);
1307
+ }
1308
+ }
1273
1309
  .bg-slate-100 {
1274
1310
  background-color: var(--color-slate-100);
1275
1311
  }
@@ -1815,6 +1851,10 @@
1815
1851
  -webkit-user-select: none;
1816
1852
  user-select: none;
1817
1853
  }
1854
+ .select-text {
1855
+ -webkit-user-select: text;
1856
+ user-select: text;
1857
+ }
1818
1858
  .\[animation-delay\:0ms\] {
1819
1859
  animation-delay: 0ms;
1820
1860
  }
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
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-Bw2A28nU.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-Bw2A28nU.mjs';
5
- export { C as Chunk, a as ChunkOptions } from './DocumentChunker-Dh9TvmGG.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-DNhyOYoK.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 RetrievalConfig, m as RetrievedChunk, T as TokenUsage, n as UniversalRagConfig, o as UpsertDocument, p as VectorDBConfig, q as VectorDBProvider, W as WorkflowConfig } from './ILLMProvider-DNhyOYoK.mjs';
5
+ export { A as AuthenticationException, C as Chunk, a as ChunkOptions, b as ConfigurationException, E as EmbeddingFailedException, P as ProviderNotFoundException, R as RateLimitException, c as RetrievalException, d as Retrivora, e as RetrivoraError, f as RetrivoraErrorCode } from './index-C9v7-tWd.mjs';
6
6
 
7
7
  type ChatViewportSize = 'compact' | 'medium' | 'large';
8
8
  interface ChatWindowProps {
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
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-Bw2A28nU.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-Bw2A28nU.js';
5
- export { C as Chunk, a as ChunkOptions } from './DocumentChunker-Dh9TvmGG.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-DNhyOYoK.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 RetrievalConfig, m as RetrievedChunk, T as TokenUsage, n as UniversalRagConfig, o as UpsertDocument, p as VectorDBConfig, q as VectorDBProvider, W as WorkflowConfig } from './ILLMProvider-DNhyOYoK.js';
5
+ export { A as AuthenticationException, C as Chunk, a as ChunkOptions, b as ConfigurationException, E as EmbeddingFailedException, P as ProviderNotFoundException, R as RateLimitException, c as RetrievalException, d as Retrivora, e as RetrivoraError, f as RetrivoraErrorCode } from './index-CjQdL0cX.js';
6
6
 
7
7
  type ChatViewportSize = 'compact' | 'medium' | 'large';
8
8
  interface ChatWindowProps {