@retrivora-ai/rag-engine 1.8.2 → 1.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/handlers/index.js +142 -16
  2. package/dist/handlers/index.mjs +5848 -17
  3. package/dist/index.css +3162 -0
  4. package/dist/index.d.mts +9 -15
  5. package/dist/index.d.ts +9 -15
  6. package/dist/index.js +1355 -919
  7. package/dist/index.mjs +1437 -896
  8. package/dist/server.d.mts +6 -0
  9. package/dist/server.d.ts +6 -0
  10. package/dist/server.js +171 -17
  11. package/dist/server.mjs +5923 -68
  12. package/package.json +8 -6
  13. package/src/app/globals.css +35 -11
  14. package/src/components/ChatWidget.tsx +0 -1
  15. package/src/components/MarkdownComponents.tsx +3 -0
  16. package/src/components/MessageBubble.tsx +3 -2
  17. package/src/components/ObservabilityPanel.tsx +1 -1
  18. package/src/components/UIDispatcher.tsx +0 -3
  19. package/src/config/ConfigBuilder.ts +38 -1
  20. package/src/core/LangChainAgent.ts +1 -4
  21. package/src/core/Pipeline.ts +31 -18
  22. package/src/core/QueryProcessor.ts +65 -0
  23. package/src/rag/Reranker.ts +99 -6
  24. package/src/tailwind.css +2 -0
  25. package/src/utils/ProductExtractor.ts +3 -3
  26. package/dist/ChromaDBProvider-MIDOR4FW.mjs +0 -8
  27. package/dist/MilvusProvider-U7SKC27V.mjs +0 -8
  28. package/dist/MongoDBProvider-YNKC7EJ6.mjs +0 -8
  29. package/dist/MultiTablePostgresProvider-ZLGSKTJR.mjs +0 -8
  30. package/dist/PineconeProvider-QZNRKTN2.mjs +0 -8
  31. package/dist/QdrantProvider-RLJTNGPY.mjs +0 -8
  32. package/dist/RedisProvider-SR65SCKV.mjs +0 -8
  33. package/dist/SimpleGraphProvider-SLOXO4M7.mjs +0 -62
  34. package/dist/UniversalVectorProvider-IN67OS56.mjs +0 -9
  35. package/dist/WeaviateProvider-5FWDFITI.mjs +0 -8
  36. package/dist/chunk-5AJ4XHLW.mjs +0 -201
  37. package/dist/chunk-5YGUXK7Z.mjs +0 -80
  38. package/dist/chunk-CFVEZTBJ.mjs +0 -102
  39. package/dist/chunk-ICKRMZQK.mjs +0 -76
  40. package/dist/chunk-IMP6FUCY.mjs +0 -30
  41. package/dist/chunk-LR3VMDVK.mjs +0 -157
  42. package/dist/chunk-LZVVLSDN.mjs +0 -4077
  43. package/dist/chunk-M6JSPGAR.mjs +0 -117
  44. package/dist/chunk-OZFBG4BA.mjs +0 -291
  45. package/dist/chunk-PSFPZXHX.mjs +0 -245
  46. package/dist/chunk-U55XRW3U.mjs +0 -96
  47. package/dist/chunk-VUQJVIJT.mjs +0 -148
  48. package/dist/chunk-X4TOT24V.mjs +0 -89
  49. package/dist/chunk-YLTMFW4M.mjs +0 -49
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
- import React, { CSSProperties, MouseEvent, ReactNode } from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { CSSProperties, MouseEvent, ReactNode } from 'react';
2
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-BOJFz3Na.mjs';
3
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-BOJFz3Na.mjs';
4
5
  export { C as Chunk, a as ChunkOptions } from './DocumentChunker-Dh9TvmGG.mjs';
@@ -83,30 +84,23 @@ interface ConfigProviderProps {
83
84
  children: ReactNode;
84
85
  }
85
86
 
86
- declare function ChatWidget({ position, onAddToCart }: ChatWidgetProps): React.JSX.Element | null;
87
+ declare function ChatWidget({ position, onAddToCart }: ChatWidgetProps): react_jsx_runtime.JSX.Element | null;
87
88
 
88
- declare function ChatWindow({ className, style, onClose, showClose, onResizeStart, onResetResize, isResized, onMaximize, isMaximized, onAddToCart }: ChatWindowProps): React.JSX.Element;
89
+ declare function ChatWindow({ className, style, onClose, showClose, onResizeStart, onResetResize, isResized, onMaximize, isMaximized, onAddToCart }: ChatWindowProps): react_jsx_runtime.JSX.Element;
89
90
 
90
- declare function DocumentUpload({ namespace, onUploadComplete, className }: DocumentUploadProps): React.JSX.Element;
91
+ declare function DocumentUpload({ namespace, onUploadComplete, className }: DocumentUploadProps): react_jsx_runtime.JSX.Element;
91
92
 
92
- declare function MessageBubble({ message, sources, isStreaming, primaryColor, accentColor, onAddToCart, viewportSize, }: MessageBubbleProps): React.JSX.Element;
93
+ declare function MessageBubble({ message, sources, isStreaming, primaryColor, accentColor, onAddToCart, viewportSize, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
93
94
 
94
- declare function SourceCard({ source, index }: SourceCardProps): React.JSX.Element;
95
+ declare function SourceCard({ source, index }: SourceCardProps): react_jsx_runtime.JSX.Element;
95
96
 
96
97
  interface ObservabilityPanelProps {
97
98
  trace: ObservabilityTrace;
98
99
  primaryColor?: string;
99
100
  }
100
- declare function ObservabilityPanel({ trace, primaryColor }: ObservabilityPanelProps): React.JSX.Element;
101
+ declare function ObservabilityPanel({ trace, primaryColor }: ObservabilityPanelProps): react_jsx_runtime.JSX.Element;
101
102
 
102
- /**
103
- * ConfigProvider — React Context that makes RagConfig (UI subset) available
104
- * to all child components without prop drilling.
105
- *
106
- * Only the UI-safe portions of RagConfig are exposed to the client.
107
- */
108
-
109
- declare function ConfigProvider({ config, children, }: ConfigProviderProps): React.JSX.Element;
103
+ declare function ConfigProvider({ config, children, }: ConfigProviderProps): react_jsx_runtime.JSX.Element;
110
104
  declare function useConfig(): ClientConfig;
111
105
 
112
106
  declare function useRagChat(projectId: string, options?: UseRagChatOptions): UseRagChatReturn;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import React, { CSSProperties, MouseEvent, ReactNode } from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { CSSProperties, MouseEvent, ReactNode } from 'react';
2
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-BOJFz3Na.js';
3
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-BOJFz3Na.js';
4
5
  export { C as Chunk, a as ChunkOptions } from './DocumentChunker-Dh9TvmGG.js';
@@ -83,30 +84,23 @@ interface ConfigProviderProps {
83
84
  children: ReactNode;
84
85
  }
85
86
 
86
- declare function ChatWidget({ position, onAddToCart }: ChatWidgetProps): React.JSX.Element | null;
87
+ declare function ChatWidget({ position, onAddToCart }: ChatWidgetProps): react_jsx_runtime.JSX.Element | null;
87
88
 
88
- declare function ChatWindow({ className, style, onClose, showClose, onResizeStart, onResetResize, isResized, onMaximize, isMaximized, onAddToCart }: ChatWindowProps): React.JSX.Element;
89
+ declare function ChatWindow({ className, style, onClose, showClose, onResizeStart, onResetResize, isResized, onMaximize, isMaximized, onAddToCart }: ChatWindowProps): react_jsx_runtime.JSX.Element;
89
90
 
90
- declare function DocumentUpload({ namespace, onUploadComplete, className }: DocumentUploadProps): React.JSX.Element;
91
+ declare function DocumentUpload({ namespace, onUploadComplete, className }: DocumentUploadProps): react_jsx_runtime.JSX.Element;
91
92
 
92
- declare function MessageBubble({ message, sources, isStreaming, primaryColor, accentColor, onAddToCart, viewportSize, }: MessageBubbleProps): React.JSX.Element;
93
+ declare function MessageBubble({ message, sources, isStreaming, primaryColor, accentColor, onAddToCart, viewportSize, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
93
94
 
94
- declare function SourceCard({ source, index }: SourceCardProps): React.JSX.Element;
95
+ declare function SourceCard({ source, index }: SourceCardProps): react_jsx_runtime.JSX.Element;
95
96
 
96
97
  interface ObservabilityPanelProps {
97
98
  trace: ObservabilityTrace;
98
99
  primaryColor?: string;
99
100
  }
100
- declare function ObservabilityPanel({ trace, primaryColor }: ObservabilityPanelProps): React.JSX.Element;
101
+ declare function ObservabilityPanel({ trace, primaryColor }: ObservabilityPanelProps): react_jsx_runtime.JSX.Element;
101
102
 
102
- /**
103
- * ConfigProvider — React Context that makes RagConfig (UI subset) available
104
- * to all child components without prop drilling.
105
- *
106
- * Only the UI-safe portions of RagConfig are exposed to the client.
107
- */
108
-
109
- declare function ConfigProvider({ config, children, }: ConfigProviderProps): React.JSX.Element;
103
+ declare function ConfigProvider({ config, children, }: ConfigProviderProps): react_jsx_runtime.JSX.Element;
110
104
  declare function useConfig(): ClientConfig;
111
105
 
112
106
  declare function useRagChat(projectId: string, options?: UseRagChatOptions): UseRagChatReturn;