@retrivora-ai/rag-engine 1.8.0 → 1.8.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 (46) hide show
  1. package/dist/DocumentChunker-Dh9TvmGG.d.mts +45 -0
  2. package/dist/DocumentChunker-Dh9TvmGG.d.ts +45 -0
  3. package/dist/{index-DPsQodME.d.mts → ILLMProvider-BfRgI1Xh.d.mts} +58 -1
  4. package/dist/{index-DPsQodME.d.ts → ILLMProvider-BfRgI1Xh.d.ts} +58 -1
  5. package/dist/MultiTablePostgresProvider-YY7LPNJK.mjs +8 -0
  6. package/dist/{chunk-PV3MFHWU.mjs → chunk-BFYLQYQU.mjs} +808 -439
  7. package/dist/chunk-R3RGUMHE.mjs +218 -0
  8. package/dist/handlers/index.d.mts +2 -2
  9. package/dist/handlers/index.d.ts +2 -2
  10. package/dist/handlers/index.js +995 -603
  11. package/dist/handlers/index.mjs +1 -1
  12. package/dist/{index-Bb2yEopi.d.mts → index-1Z4GuYBi.d.ts} +7 -1
  13. package/dist/{index-CkbTzj9J.d.ts → index-BV0z5mb6.d.mts} +7 -1
  14. package/dist/index.d.mts +3 -3
  15. package/dist/index.d.ts +3 -3
  16. package/dist/index.js +491 -316
  17. package/dist/index.mjs +411 -217
  18. package/dist/server.d.mts +35 -5
  19. package/dist/server.d.ts +35 -5
  20. package/dist/server.js +1146 -777
  21. package/dist/server.mjs +163 -176
  22. package/package.json +4 -2
  23. package/src/app/page.tsx +1 -2
  24. package/src/components/MessageBubble.tsx +211 -69
  25. package/src/components/ProductCard.tsx +2 -2
  26. package/src/components/VisualizationRenderer.tsx +347 -247
  27. package/src/config/RagConfig.ts +5 -0
  28. package/src/config/serverConfig.ts +3 -1
  29. package/src/core/Pipeline.ts +65 -206
  30. package/src/core/ProviderRegistry.ts +2 -2
  31. package/src/core/VectorPlugin.ts +9 -0
  32. package/src/handlers/index.ts +23 -7
  33. package/src/hooks/useRagChat.ts +2 -2
  34. package/src/llm/LLMFactory.ts +54 -2
  35. package/src/llm/providers/AnthropicProvider.ts +12 -8
  36. package/src/llm/providers/GeminiProvider.ts +188 -143
  37. package/src/llm/providers/OllamaProvider.ts +7 -3
  38. package/src/llm/providers/OpenAIProvider.ts +12 -8
  39. package/src/types/chat.ts +6 -0
  40. package/src/types/index.ts +80 -0
  41. package/src/utils/SchemaMapper.ts +129 -0
  42. package/src/utils/UITransformer.ts +491 -181
  43. package/dist/DocumentChunker-C1GEEosY.d.ts +0 -93
  44. package/dist/DocumentChunker-CFEiRopR.d.mts +0 -93
  45. package/dist/PostgreSQLProvider-BMOETDZA.mjs +0 -8
  46. package/dist/chunk-FLOSGE6A.mjs +0 -202
@@ -10,7 +10,7 @@ import {
10
10
  sseMetaFrame,
11
11
  sseTextFrame,
12
12
  sseUIFrame
13
- } from "../chunk-PV3MFHWU.mjs";
13
+ } from "../chunk-BFYLQYQU.mjs";
14
14
  import "../chunk-YLTMFW4M.mjs";
15
15
  import "../chunk-X4TOT24V.mjs";
16
16
  export {
@@ -1,4 +1,4 @@
1
- import { h as RagConfig, C as ChatMessage, d as ChatResponse, I as IngestDocument } from './index-DPsQodME.mjs';
1
+ import { j as RagConfig, I as ILLMProvider, C as ChatMessage, d as ChatResponse, g as IngestDocument } from './ILLMProvider-BfRgI1Xh.js';
2
2
  import { NextRequest, NextResponse } from 'next/server';
3
3
 
4
4
  interface ValidationError {
@@ -85,6 +85,12 @@ declare class VectorPlugin {
85
85
  * Get the current resolved configuration.
86
86
  */
87
87
  getConfig(): RagConfig;
88
+ /**
89
+ * Get the initialized LLM provider (available after the first request).
90
+ * Used by handlers to pass to UITransformer.analyzeAndDecide() for
91
+ * LLM-driven visualization decisions.
92
+ */
93
+ getLLMProvider(): ILLMProvider | undefined;
88
94
  /**
89
95
  * Perform pre-flight health checks on all configured providers.
90
96
  * Useful to verify connectivity before running operations.
@@ -1,4 +1,4 @@
1
- import { h as RagConfig, C as ChatMessage, d as ChatResponse, I as IngestDocument } from './index-DPsQodME.js';
1
+ import { j as RagConfig, I as ILLMProvider, C as ChatMessage, d as ChatResponse, g as IngestDocument } from './ILLMProvider-BfRgI1Xh.mjs';
2
2
  import { NextRequest, NextResponse } from 'next/server';
3
3
 
4
4
  interface ValidationError {
@@ -85,6 +85,12 @@ declare class VectorPlugin {
85
85
  * Get the current resolved configuration.
86
86
  */
87
87
  getConfig(): RagConfig;
88
+ /**
89
+ * Get the initialized LLM provider (available after the first request).
90
+ * Used by handlers to pass to UITransformer.analyzeAndDecide() for
91
+ * LLM-driven visualization decisions.
92
+ */
93
+ getLLMProvider(): ILLMProvider | undefined;
88
94
  /**
89
95
  * Perform pre-flight health checks on all configured providers.
90
96
  * Useful to verify connectivity before running operations.
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { CSSProperties, MouseEvent, ReactNode } from 'react';
2
- import { P as Product, U as UIConfig, R as RagMessage, V as VectorMatch, a as UseRagChatOptions, b as UseRagChatReturn } from './index-DPsQodME.mjs';
3
- export { C as ChatMessage, c as ChatOptions, d as ChatResponse, E as EmbeddingConfig, e as EmbeddingProvider, I as IngestDocument, L as LLMConfig, f as LLMProvider, g as RAGConfig, h as RagConfig, i as UpsertDocument, j as VectorDBConfig, k as VectorDBProvider } from './index-DPsQodME.mjs';
4
- export { C as Chunk, a as ChunkOptions, E as EmbedOptions, I as ILLMProvider } from './DocumentChunker-CFEiRopR.mjs';
2
+ import { P as Product, U as UIConfig, R as RagMessage, V as VectorMatch, a as UseRagChatOptions, b as UseRagChatReturn } from './ILLMProvider-BfRgI1Xh.mjs';
3
+ 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 RAGConfig, j as RagConfig, k as UpsertDocument, l as VectorDBConfig, m as VectorDBProvider } from './ILLMProvider-BfRgI1Xh.mjs';
4
+ export { C as Chunk, a as ChunkOptions } from './DocumentChunker-Dh9TvmGG.mjs';
5
5
 
6
6
  type ChatViewportSize = 'compact' | 'medium' | 'large';
7
7
  interface ChatWindowProps {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { CSSProperties, MouseEvent, ReactNode } from 'react';
2
- import { P as Product, U as UIConfig, R as RagMessage, V as VectorMatch, a as UseRagChatOptions, b as UseRagChatReturn } from './index-DPsQodME.js';
3
- export { C as ChatMessage, c as ChatOptions, d as ChatResponse, E as EmbeddingConfig, e as EmbeddingProvider, I as IngestDocument, L as LLMConfig, f as LLMProvider, g as RAGConfig, h as RagConfig, i as UpsertDocument, j as VectorDBConfig, k as VectorDBProvider } from './index-DPsQodME.js';
4
- export { C as Chunk, a as ChunkOptions, E as EmbedOptions, I as ILLMProvider } from './DocumentChunker-C1GEEosY.js';
2
+ import { P as Product, U as UIConfig, R as RagMessage, V as VectorMatch, a as UseRagChatOptions, b as UseRagChatReturn } from './ILLMProvider-BfRgI1Xh.js';
3
+ 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 RAGConfig, j as RagConfig, k as UpsertDocument, l as VectorDBConfig, m as VectorDBProvider } from './ILLMProvider-BfRgI1Xh.js';
4
+ export { C as Chunk, a as ChunkOptions } from './DocumentChunker-Dh9TvmGG.js';
5
5
 
6
6
  type ChatViewportSize = 'compact' | 'medium' | 'large';
7
7
  interface ChatWindowProps {