@retrivora-ai/rag-engine 2.3.5 → 2.3.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.
- package/dist/{BatchProcessor-CQDtlggz.d.ts → BatchProcessor-ByBl-1MA.d.ts} +81 -3
- package/dist/{BatchProcessor-tVzb9CdE.d.mts → BatchProcessor-Dfn23VAd.d.mts} +81 -3
- package/dist/{ILLMProvider-CcJ5N6XD.d.mts → ILLMProvider-B8TAVx3j.d.mts} +63 -1
- package/dist/{ILLMProvider-CcJ5N6XD.d.ts → ILLMProvider-B8TAVx3j.d.ts} +63 -1
- package/dist/handlers/index.d.mts +2 -2
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.js +373 -155
- package/dist/handlers/index.mjs +373 -155
- package/dist/{index-BwmyPJHp.d.ts → index-ejOWsaqb.d.ts} +1 -1
- package/dist/{index-CL-zF6bD.d.mts → index-xxQOFx-u.d.mts} +1 -1
- package/dist/index.css +9 -0
- package/dist/index.d.mts +19 -5
- package/dist/index.d.ts +19 -5
- package/dist/index.js +636 -200
- package/dist/index.mjs +676 -245
- package/dist/server.d.mts +6 -6
- package/dist/server.d.ts +6 -6
- package/dist/server.js +413 -166
- package/dist/server.mjs +409 -166
- package/package.json +1 -1
- package/src/components/ChatWidget.tsx +44 -19
- package/src/components/ChatWindow.tsx +30 -14
- package/src/components/ConfigProvider.tsx +86 -6
- package/src/components/DocumentUpload.tsx +8 -2
- package/src/config/RagConfig.ts +4 -0
- package/src/core/ConfigFetcher.ts +10 -1
- package/src/core/ConfigResolver.ts +1 -0
- package/src/core/LicenseValidator.ts +21 -12
- package/src/core/LicenseVerifier.ts +0 -4
- package/src/core/ProjectSettings.ts +247 -0
- package/src/handlers/index.ts +61 -5
- package/src/hooks/useProjectSettings.ts +105 -0
- package/src/index.css +9 -0
- package/src/index.ts +28 -0
- package/src/server.ts +23 -1
- package/src/types/props.ts +14 -2
package/dist/index.css
CHANGED
|
@@ -346,6 +346,15 @@
|
|
|
346
346
|
.top-4 {
|
|
347
347
|
top: calc(var(--spacing) * 4);
|
|
348
348
|
}
|
|
349
|
+
.top-6 {
|
|
350
|
+
top: calc(var(--spacing) * 6);
|
|
351
|
+
}
|
|
352
|
+
.top-20 {
|
|
353
|
+
top: calc(var(--spacing) * 20);
|
|
354
|
+
}
|
|
355
|
+
.top-24 {
|
|
356
|
+
top: calc(var(--spacing) * 24);
|
|
357
|
+
}
|
|
349
358
|
.-right-4 {
|
|
350
359
|
right: calc(var(--spacing) * -4);
|
|
351
360
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps } from './BatchProcessor-
|
|
3
|
-
export { A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, h as Chunk, i as ChunkOptions, j as
|
|
4
|
-
import { O as ObservabilityTrace, U as UseRagChatOptions, a as UseRagChatReturn } from './ILLMProvider-
|
|
5
|
-
export { C as ChatMessage, b as ChatOptions, c as ChatResponse, E as EmbedOptions, d as EmbeddingConfig, e as EmbeddingProvider, I as ILLMProvider, f as IngestDocument, L as LLMConfig, g as LLMProvider, h as LatencyBreakdown, R as RAGConfig,
|
|
2
|
+
import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps, R as RemoteConfig } from './BatchProcessor-Dfn23VAd.mjs';
|
|
3
|
+
export { A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, h as Chunk, i as ChunkOptions, j as ConfigFetcher, k as ConfigurationException, l as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, m as IRendererStrategy, n as IntentCategory, L as LicenseValidationError, o as LicenseValidationRequest, p as LicenseValidationResponse, q as LicenseValidator, r as ProviderNotFoundException, s as RateLimitException, t as RemoteEmbeddingConfig, u as RemoteLLMConfig, v as RemoteVectorConfig, w as RenderDecision, x as RenderType, y as RetrievalException, z as Retrivora, F as RetrivoraError, G as RetrivoraErrorCode, H as SDKVersionUnsupportedError, J as SDK_VERSION, K as isTransientError } from './BatchProcessor-Dfn23VAd.mjs';
|
|
4
|
+
import { O as ObservabilityTrace, U as UseRagChatOptions, a as UseRagChatReturn, P as ProjectChatSettings } from './ILLMProvider-B8TAVx3j.mjs';
|
|
5
|
+
export { A as AuthMode, C as ChatMessage, b as ChatOptions, c as ChatResponse, E as EmbedOptions, d as EmbeddingConfig, e as EmbeddingProvider, I as ILLMProvider, f as IngestDocument, L as LLMConfig, g as LLMProvider, h as LatencyBreakdown, i as ProjectAiSettings, j as ProjectAuthSettings, k as ProjectBrandingSettings, l as ProjectTelemetrySettings, m as ProjectWidgetSettings, R as RAGConfig, n as RagConfig, o as RagMessage, p as RetrievalConfig, q as RetrievedChunk, T as ThemeMode, r as TokenUsage, s as UIConfig, t as UniversalRagConfig, u as UpsertDocument, V as VectorDBConfig, v as VectorDBProvider, w as VectorMatch, W as WidgetPosition, x as WorkflowConfig, y as createDefaultProjectSettings, z as normalizeProjectSettings, B as projectSettingsToUiConfig } from './ILLMProvider-B8TAVx3j.mjs';
|
|
6
6
|
import 'react';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -78,6 +78,20 @@ declare function ProductCarousel({ products, primaryColor, onAddToCart }: Produc
|
|
|
78
78
|
|
|
79
79
|
declare function useRagChat(projectId: string, options?: UseRagChatOptions): UseRagChatReturn;
|
|
80
80
|
|
|
81
|
+
interface UseProjectSettingsOptions {
|
|
82
|
+
licenseKey?: string;
|
|
83
|
+
enabled?: boolean;
|
|
84
|
+
initialSettings?: Partial<ProjectChatSettings>;
|
|
85
|
+
}
|
|
86
|
+
interface UseProjectSettingsReturn {
|
|
87
|
+
settings: ProjectChatSettings;
|
|
88
|
+
remoteConfig: RemoteConfig | null;
|
|
89
|
+
isLoading: boolean;
|
|
90
|
+
error: string | null;
|
|
91
|
+
reload: () => Promise<void>;
|
|
92
|
+
}
|
|
93
|
+
declare function useProjectSettings(projectId: string, options?: UseProjectSettingsOptions): UseProjectSettingsReturn;
|
|
94
|
+
|
|
81
95
|
/**
|
|
82
96
|
* Dynamically registers new synonyms into the global FIELD_SYNONYMS dictionary.
|
|
83
97
|
* You can call this during your app initialization to support custom schema fields.
|
|
@@ -108,4 +122,4 @@ declare class CircuitBreaker {
|
|
|
108
122
|
reset(): void;
|
|
109
123
|
}
|
|
110
124
|
|
|
111
|
-
export { ChatWidget, ChatWidgetProps, ChatWindow, ChatWindowProps, CircuitBreaker, type CircuitBreakerOptions, ClientConfig, CodeViewer, ConfigProvider, DocumentUpload, DocumentUploadProps, MessageBubble, MessageBubbleProps, ObservabilityPanel, ObservabilityTrace, ProductCard, ProductCardProps, ProductCarousel, ProductCarouselProps, SourceCard, SourceCardProps, UseRagChatOptions, UseRagChatReturn, addSynonyms, useConfig, useRagChat };
|
|
125
|
+
export { ChatWidget, ChatWidgetProps, ChatWindow, ChatWindowProps, CircuitBreaker, type CircuitBreakerOptions, ClientConfig, CodeViewer, ConfigProvider, DocumentUpload, DocumentUploadProps, MessageBubble, MessageBubbleProps, ObservabilityPanel, ObservabilityTrace, ProductCard, ProductCardProps, ProductCarousel, ProductCarouselProps, ProjectChatSettings, RemoteConfig, SourceCard, SourceCardProps, type UseProjectSettingsOptions, type UseProjectSettingsReturn, UseRagChatOptions, UseRagChatReturn, addSynonyms, useConfig, useProjectSettings, useRagChat };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps } from './BatchProcessor-
|
|
3
|
-
export { A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, h as Chunk, i as ChunkOptions, j as
|
|
4
|
-
import { O as ObservabilityTrace, U as UseRagChatOptions, a as UseRagChatReturn } from './ILLMProvider-
|
|
5
|
-
export { C as ChatMessage, b as ChatOptions, c as ChatResponse, E as EmbedOptions, d as EmbeddingConfig, e as EmbeddingProvider, I as ILLMProvider, f as IngestDocument, L as LLMConfig, g as LLMProvider, h as LatencyBreakdown, R as RAGConfig,
|
|
2
|
+
import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps, R as RemoteConfig } from './BatchProcessor-ByBl-1MA.js';
|
|
3
|
+
export { A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, h as Chunk, i as ChunkOptions, j as ConfigFetcher, k as ConfigurationException, l as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, m as IRendererStrategy, n as IntentCategory, L as LicenseValidationError, o as LicenseValidationRequest, p as LicenseValidationResponse, q as LicenseValidator, r as ProviderNotFoundException, s as RateLimitException, t as RemoteEmbeddingConfig, u as RemoteLLMConfig, v as RemoteVectorConfig, w as RenderDecision, x as RenderType, y as RetrievalException, z as Retrivora, F as RetrivoraError, G as RetrivoraErrorCode, H as SDKVersionUnsupportedError, J as SDK_VERSION, K as isTransientError } from './BatchProcessor-ByBl-1MA.js';
|
|
4
|
+
import { O as ObservabilityTrace, U as UseRagChatOptions, a as UseRagChatReturn, P as ProjectChatSettings } from './ILLMProvider-B8TAVx3j.js';
|
|
5
|
+
export { A as AuthMode, C as ChatMessage, b as ChatOptions, c as ChatResponse, E as EmbedOptions, d as EmbeddingConfig, e as EmbeddingProvider, I as ILLMProvider, f as IngestDocument, L as LLMConfig, g as LLMProvider, h as LatencyBreakdown, i as ProjectAiSettings, j as ProjectAuthSettings, k as ProjectBrandingSettings, l as ProjectTelemetrySettings, m as ProjectWidgetSettings, R as RAGConfig, n as RagConfig, o as RagMessage, p as RetrievalConfig, q as RetrievedChunk, T as ThemeMode, r as TokenUsage, s as UIConfig, t as UniversalRagConfig, u as UpsertDocument, V as VectorDBConfig, v as VectorDBProvider, w as VectorMatch, W as WidgetPosition, x as WorkflowConfig, y as createDefaultProjectSettings, z as normalizeProjectSettings, B as projectSettingsToUiConfig } from './ILLMProvider-B8TAVx3j.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -78,6 +78,20 @@ declare function ProductCarousel({ products, primaryColor, onAddToCart }: Produc
|
|
|
78
78
|
|
|
79
79
|
declare function useRagChat(projectId: string, options?: UseRagChatOptions): UseRagChatReturn;
|
|
80
80
|
|
|
81
|
+
interface UseProjectSettingsOptions {
|
|
82
|
+
licenseKey?: string;
|
|
83
|
+
enabled?: boolean;
|
|
84
|
+
initialSettings?: Partial<ProjectChatSettings>;
|
|
85
|
+
}
|
|
86
|
+
interface UseProjectSettingsReturn {
|
|
87
|
+
settings: ProjectChatSettings;
|
|
88
|
+
remoteConfig: RemoteConfig | null;
|
|
89
|
+
isLoading: boolean;
|
|
90
|
+
error: string | null;
|
|
91
|
+
reload: () => Promise<void>;
|
|
92
|
+
}
|
|
93
|
+
declare function useProjectSettings(projectId: string, options?: UseProjectSettingsOptions): UseProjectSettingsReturn;
|
|
94
|
+
|
|
81
95
|
/**
|
|
82
96
|
* Dynamically registers new synonyms into the global FIELD_SYNONYMS dictionary.
|
|
83
97
|
* You can call this during your app initialization to support custom schema fields.
|
|
@@ -108,4 +122,4 @@ declare class CircuitBreaker {
|
|
|
108
122
|
reset(): void;
|
|
109
123
|
}
|
|
110
124
|
|
|
111
|
-
export { ChatWidget, ChatWidgetProps, ChatWindow, ChatWindowProps, CircuitBreaker, type CircuitBreakerOptions, ClientConfig, CodeViewer, ConfigProvider, DocumentUpload, DocumentUploadProps, MessageBubble, MessageBubbleProps, ObservabilityPanel, ObservabilityTrace, ProductCard, ProductCardProps, ProductCarousel, ProductCarouselProps, SourceCard, SourceCardProps, UseRagChatOptions, UseRagChatReturn, addSynonyms, useConfig, useRagChat };
|
|
125
|
+
export { ChatWidget, ChatWidgetProps, ChatWindow, ChatWindowProps, CircuitBreaker, type CircuitBreakerOptions, ClientConfig, CodeViewer, ConfigProvider, DocumentUpload, DocumentUploadProps, MessageBubble, MessageBubbleProps, ObservabilityPanel, ObservabilityTrace, ProductCard, ProductCardProps, ProductCarousel, ProductCarouselProps, ProjectChatSettings, RemoteConfig, SourceCard, SourceCardProps, type UseProjectSettingsOptions, type UseProjectSettingsReturn, UseRagChatOptions, UseRagChatReturn, addSynonyms, useConfig, useProjectSettings, useRagChat };
|