@retrivora-ai/rag-engine 1.9.8 → 2.0.0
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/README.md +36 -28
- package/dist/{ILLMProvider-B8ROITYK.d.mts → ILLMProvider-DMxLyTdq.d.mts} +2 -2
- package/dist/{ILLMProvider-B8ROITYK.d.ts → ILLMProvider-DMxLyTdq.d.ts} +2 -2
- package/dist/handlers/index.d.mts +2 -2
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.js +248 -74
- package/dist/handlers/index.mjs +254 -74
- package/dist/{index-DNvoi-sV.d.ts → index-CfkqZd2Y.d.ts} +1 -1
- package/dist/{index-BCPKUAVL.d.ts → index-DHsFLJXQ.d.mts} +2 -31
- package/dist/{index-CrxCy36A.d.mts → index-tzwc7UhY.d.ts} +2 -31
- package/dist/{index-B8PbEFSY.d.mts → index-xygonxpW.d.mts} +1 -1
- package/dist/index.css +485 -557
- package/dist/index.d.mts +16 -10
- package/dist/index.d.ts +16 -10
- package/dist/index.js +36 -768
- package/dist/index.mjs +32 -782
- package/dist/server.d.mts +8 -5
- package/dist/server.d.ts +8 -5
- package/dist/server.js +249 -74
- package/dist/server.mjs +255 -74
- package/package.json +3 -2
- package/src/app/page.tsx +2 -0
- package/src/components/ChatWindow.tsx +14 -3
- package/src/components/constants.tsx +224 -0
- package/src/config/RagConfig.ts +2 -2
- package/src/config/serverConfig.ts +14 -1
- package/src/core/ConfigResolver.ts +32 -6
- package/src/core/LicenseVerifier.ts +106 -0
- package/src/core/Pipeline.ts +11 -8
- package/src/core/Retrivora.ts +1 -0
- package/src/handlers/index.ts +84 -48
- package/src/index.ts +3 -5
- package/src/components/AmbientBackground.tsx +0 -29
- package/src/components/ArchitectureCard.tsx +0 -53
- package/src/components/ArchitectureCardsSection.tsx +0 -48
- package/src/components/DocViewer.tsx +0 -97
- package/src/components/Documentation.tsx +0 -141
- package/src/components/Hero.tsx +0 -142
- package/src/components/Lifecycle.tsx +0 -77
- package/src/components/Navbar.tsx +0 -55
package/README.md
CHANGED
|
@@ -18,34 +18,42 @@ The SDK is a unified suite designed to abstract the complexity of building produ
|
|
|
18
18
|
|
|
19
19
|
The SDK is built with modularity, performance, and security at its core:
|
|
20
20
|
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
21
|
+
```mermaid
|
|
22
|
+
sequenceDiagram
|
|
23
|
+
autonumber
|
|
24
|
+
actor Client as Host Client (Next.js/React)
|
|
25
|
+
participant Facade as Retrivora Facade
|
|
26
|
+
participant Lic as LicenseVerifier
|
|
27
|
+
participant Pipe as Pipeline Engine
|
|
28
|
+
participant DB as Vector Database
|
|
29
|
+
participant LLM as LLM Provider
|
|
30
|
+
|
|
31
|
+
Client->>Facade: initialize(config)
|
|
32
|
+
activate Facade
|
|
33
|
+
Facade->>Lic: verify(licenseKey, projectId)
|
|
34
|
+
activate Lic
|
|
35
|
+
Note over Lic: Offline RS256 JWT Decryption
|
|
36
|
+
Lic-->>Facade: Valid Signature (Green)
|
|
37
|
+
deactivate Lic
|
|
38
|
+
Facade-->>Client: Ready
|
|
39
|
+
deactivate Facade
|
|
40
|
+
|
|
41
|
+
Client->>Facade: ask(question, history)
|
|
42
|
+
activate Facade
|
|
43
|
+
Facade->>Pipe: ask(question, history)
|
|
44
|
+
activate Pipe
|
|
45
|
+
Pipe->>DB: search(queryVector)
|
|
46
|
+
activate DB
|
|
47
|
+
DB-->>Pipe: relevant chunks & meta
|
|
48
|
+
deactivate DB
|
|
49
|
+
Pipe->>LLM: chatCompletion(context, prompt)
|
|
50
|
+
activate LLM
|
|
51
|
+
LLM-->>Pipe: generated response
|
|
52
|
+
deactivate LLM
|
|
53
|
+
Pipe-->>Facade: ChatResponse (reply + sources)
|
|
54
|
+
deactivate Pipe
|
|
55
|
+
Facade-->>Client: SSE Streaming Chunk / JSON
|
|
56
|
+
deactivate Facade
|
|
49
57
|
```
|
|
50
58
|
|
|
51
59
|
### Key Components:
|
|
@@ -227,7 +227,7 @@ interface RAGConfig {
|
|
|
227
227
|
/** Characters used to split text, in order of priority */
|
|
228
228
|
separators?: string[];
|
|
229
229
|
/** Overall RAG architecture pattern */
|
|
230
|
-
architecture?: 'simple' | 'graph' | 'hybrid' | 'agentic';
|
|
230
|
+
architecture?: 'simple' | 'graph' | 'hybrid' | 'agentic' | 'naive' | 'retrieve-and-rerank' | 'multimodal' | 'agentic-router' | 'multi-agent';
|
|
231
231
|
/** Chunking strategy to use during ingestion */
|
|
232
232
|
chunkingStrategy?: 'recursive' | 'markdown' | 'semantic' | 'llamaindex';
|
|
233
233
|
/** Whether to use query transformation (e.g. HyDE) */
|
|
@@ -282,7 +282,7 @@ interface RetrievalConfig {
|
|
|
282
282
|
}
|
|
283
283
|
interface WorkflowConfig {
|
|
284
284
|
/** High-level workflow selector from the SDK prompt. */
|
|
285
|
-
type?: 'simple-rag' | 'rag' | 'hybrid-rag' | 'graph-rag' | 'agentic-rag' | 'agentic';
|
|
285
|
+
type?: 'simple-rag' | 'rag' | 'hybrid-rag' | 'graph-rag' | 'agentic-rag' | 'agentic' | 'naive-rag' | 'retrieve-and-rerank' | 'multimodal-rag' | 'agentic-router' | 'multi-agent-rag' | 'multi-agent';
|
|
286
286
|
/** Future workflow/provider-specific options. */
|
|
287
287
|
options?: Record<string, unknown>;
|
|
288
288
|
}
|
|
@@ -227,7 +227,7 @@ interface RAGConfig {
|
|
|
227
227
|
/** Characters used to split text, in order of priority */
|
|
228
228
|
separators?: string[];
|
|
229
229
|
/** Overall RAG architecture pattern */
|
|
230
|
-
architecture?: 'simple' | 'graph' | 'hybrid' | 'agentic';
|
|
230
|
+
architecture?: 'simple' | 'graph' | 'hybrid' | 'agentic' | 'naive' | 'retrieve-and-rerank' | 'multimodal' | 'agentic-router' | 'multi-agent';
|
|
231
231
|
/** Chunking strategy to use during ingestion */
|
|
232
232
|
chunkingStrategy?: 'recursive' | 'markdown' | 'semantic' | 'llamaindex';
|
|
233
233
|
/** Whether to use query transformation (e.g. HyDE) */
|
|
@@ -282,7 +282,7 @@ interface RetrievalConfig {
|
|
|
282
282
|
}
|
|
283
283
|
interface WorkflowConfig {
|
|
284
284
|
/** High-level workflow selector from the SDK prompt. */
|
|
285
|
-
type?: 'simple-rag' | 'rag' | 'hybrid-rag' | 'graph-rag' | 'agentic-rag' | 'agentic';
|
|
285
|
+
type?: 'simple-rag' | 'rag' | 'hybrid-rag' | 'graph-rag' | 'agentic-rag' | 'agentic' | 'naive-rag' | 'retrieve-and-rerank' | 'multimodal-rag' | 'agentic-router' | 'multi-agent-rag' | 'multi-agent';
|
|
286
286
|
/** Future workflow/provider-specific options. */
|
|
287
287
|
options?: Record<string, unknown>;
|
|
288
288
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'next/server';
|
|
2
|
-
export { o as HandlerOptions, c as createChatHandler, d as createFeedbackHandler, e as createHealthHandler, f as createHistoryHandler, g as createIngestHandler, h as createRagHandler, i as createSessionsHandler, j as createStreamHandler, p as createSuggestionsHandler, k as createUploadHandler, s as sseErrorFrame, l as sseFrame, m as sseMetaFrame, q as sseObservabilityFrame, n as sseTextFrame, r as sseUIFrame } from '../index-
|
|
3
|
-
import '../ILLMProvider-
|
|
2
|
+
export { o as HandlerOptions, c as createChatHandler, d as createFeedbackHandler, e as createHealthHandler, f as createHistoryHandler, g as createIngestHandler, h as createRagHandler, i as createSessionsHandler, j as createStreamHandler, p as createSuggestionsHandler, k as createUploadHandler, s as sseErrorFrame, l as sseFrame, m as sseMetaFrame, q as sseObservabilityFrame, n as sseTextFrame, r as sseUIFrame } from '../index-DHsFLJXQ.mjs';
|
|
3
|
+
import '../ILLMProvider-DMxLyTdq.mjs';
|
package/dist/handlers/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'next/server';
|
|
2
|
-
export { o as HandlerOptions, c as createChatHandler, d as createFeedbackHandler, e as createHealthHandler, f as createHistoryHandler, g as createIngestHandler, h as createRagHandler, i as createSessionsHandler, j as createStreamHandler, p as createSuggestionsHandler, k as createUploadHandler, s as sseErrorFrame, l as sseFrame, m as sseMetaFrame, q as sseObservabilityFrame, n as sseTextFrame, r as sseUIFrame } from '../index-
|
|
3
|
-
import '../ILLMProvider-
|
|
2
|
+
export { o as HandlerOptions, c as createChatHandler, d as createFeedbackHandler, e as createHealthHandler, f as createHistoryHandler, g as createIngestHandler, h as createRagHandler, i as createSessionsHandler, j as createStreamHandler, p as createSuggestionsHandler, k as createUploadHandler, s as sseErrorFrame, l as sseFrame, m as sseMetaFrame, q as sseObservabilityFrame, n as sseTextFrame, r as sseUIFrame } from '../index-tzwc7UhY.js';
|
|
3
|
+
import '../ILLMProvider-DMxLyTdq.js';
|