@retrivora-ai/rag-engine 2.5.4 → 2.5.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/{ILLMProvider-DO5gj-e5.d.mts → ILLMProvider-DwFj0h2u.d.mts} +2 -2
- package/dist/{ILLMProvider-DO5gj-e5.d.ts → ILLMProvider-DwFj0h2u.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 +208 -28
- package/dist/handlers/index.mjs +202 -22
- package/dist/{index-Dex_gQ3P.d.mts → index-Byv5MaYi.d.mts} +16 -1
- package/dist/{index-DkOhRqEc.d.ts → index-Cb0GsT16.d.ts} +1 -1
- package/dist/{index-DE8qPWpI.d.mts → index-D1jN8KSF.d.mts} +1 -1
- package/dist/{index--RhMcXrt.d.ts → index-DP3_OpuB.d.ts} +16 -1
- package/dist/index.css +12 -83
- package/dist/index.d.mts +21 -16
- package/dist/index.d.ts +21 -16
- package/dist/index.js +3797 -3847
- package/dist/index.min.css +1 -1
- package/dist/index.mjs +3845 -3896
- package/dist/server.d.mts +57 -10
- package/dist/server.d.ts +57 -10
- package/dist/server.js +236 -34
- package/dist/server.mjs +229 -28
- package/package.json +1 -1
package/dist/server.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as RagConfig, v as UniversalRagConfig, V as VectorDBConfig, w as UpsertDocument, y as VectorMatch, G as GraphDBConfig, H as GraphNode, J as Edge, K as GraphSearchResult, L as LLMConfig, f as EmbeddingConfig, I as ILLMProvider, x as VectorDBProvider, i as LLMProvider, g as EmbeddingProvider, R as RAGConfig, u as UIConfig, U as UITransformationResponse, C as ChatMessage, d as ChatOptions, E as EmbedOptions, h as IngestDocument, e as ChatResponse } from './ILLMProvider-
|
|
2
|
-
export { A as AuthMode, M as BarChartData, N as CarouselProduct, Q as IRetriever, j as LatencyBreakdown, S as LineChartDataPoint, X as MessageRole, Y as MetricCardData, O as ObservabilityTrace, Z as PieChartData, P as Product, k as ProjectAiSettings, l as ProjectAuthSettings, m as ProjectBrandingSettings, c as ProjectChatSettings, n as ProjectTelemetrySettings, o as ProjectWidgetSettings, q as RagMessage, r as RetrievalConfig, _ as RetrievalResult, s as RetrievedChunk, $ as RetrivoraChunkMetadata, a0 as RetrivoraIngestedDocument, a1 as ScatterPlotDataPoint, a2 as SuggestionsResponse, a3 as TableData, T as ThemeMode, t as TokenUsage, a as UseRagChatOptions, b as UseRagChatReturn, a4 as VisualizationType, W as WidgetPosition, z as WorkflowConfig, B as createDefaultProjectSettings, D as normalizeProjectSettings, F as projectSettingsToUiConfig } from './ILLMProvider-
|
|
3
|
-
import { o as DecisionContext, q as IntentCategory, I as IRenderRule, G as RenderDecision, p as IRendererStrategy } from './index-
|
|
4
|
-
export { V as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, e as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, i as Chunk, j as ChunkOptions, c as ClientConfig, m as ConfigFetcher, b as ConfigProviderProps, n as ConfigurationException, W as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, X as LicenseConfigResolver, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, M as MessageBubbleProps, Y as Pipeline, Z as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, v as ProviderCredentials, w as ProviderNotFoundException, _ as ProviderPill, x as RateLimitException, R as RemoteConfig, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, $ as RenderSectionDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, a0 as Snippet, S as SourceCardProps, a1 as wrapError } from './index-
|
|
5
|
-
import { I as IProviderValidator, a as IProviderHealthChecker, H as HealthCheckResult } from './index-
|
|
6
|
-
export { C as ConfigValidator, b as HandlerOptions, V as ValidationError, c as VectorPlugin, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, o as sseTextFrame } from './index-
|
|
1
|
+
import { p as RagConfig, v as UniversalRagConfig, V as VectorDBConfig, w as UpsertDocument, y as VectorMatch, G as GraphDBConfig, H as GraphNode, J as Edge, K as GraphSearchResult, L as LLMConfig, f as EmbeddingConfig, I as ILLMProvider, x as VectorDBProvider, i as LLMProvider, g as EmbeddingProvider, R as RAGConfig, u as UIConfig, U as UITransformationResponse, C as ChatMessage, d as ChatOptions, E as EmbedOptions, h as IngestDocument, e as ChatResponse } from './ILLMProvider-DwFj0h2u.mjs';
|
|
2
|
+
export { A as AuthMode, M as BarChartData, N as CarouselProduct, Q as IRetriever, j as LatencyBreakdown, S as LineChartDataPoint, X as MessageRole, Y as MetricCardData, O as ObservabilityTrace, Z as PieChartData, P as Product, k as ProjectAiSettings, l as ProjectAuthSettings, m as ProjectBrandingSettings, c as ProjectChatSettings, n as ProjectTelemetrySettings, o as ProjectWidgetSettings, q as RagMessage, r as RetrievalConfig, _ as RetrievalResult, s as RetrievedChunk, $ as RetrivoraChunkMetadata, a0 as RetrivoraIngestedDocument, a1 as ScatterPlotDataPoint, a2 as SuggestionsResponse, a3 as TableData, T as ThemeMode, t as TokenUsage, a as UseRagChatOptions, b as UseRagChatReturn, a4 as VisualizationType, W as WidgetPosition, z as WorkflowConfig, B as createDefaultProjectSettings, D as normalizeProjectSettings, F as projectSettingsToUiConfig } from './ILLMProvider-DwFj0h2u.mjs';
|
|
3
|
+
import { o as DecisionContext, q as IntentCategory, I as IRenderRule, G as RenderDecision, p as IRendererStrategy } from './index-Byv5MaYi.mjs';
|
|
4
|
+
export { V as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, e as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, i as Chunk, j as ChunkOptions, c as ClientConfig, m as ConfigFetcher, b as ConfigProviderProps, n as ConfigurationException, W as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, X as LicenseConfigResolver, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, M as MessageBubbleProps, Y as Pipeline, Z as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, v as ProviderCredentials, w as ProviderNotFoundException, _ as ProviderPill, x as RateLimitException, R as RemoteConfig, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, $ as RenderSectionDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, a0 as Snippet, S as SourceCardProps, a1 as wrapError } from './index-Byv5MaYi.mjs';
|
|
5
|
+
import { I as IProviderValidator, a as IProviderHealthChecker, H as HealthCheckResult } from './index-D1jN8KSF.mjs';
|
|
6
|
+
export { C as ConfigValidator, b as HandlerOptions, V as ValidationError, c as VectorPlugin, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, o as sseTextFrame } from './index-D1jN8KSF.mjs';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'next/server';
|
|
9
9
|
|
|
@@ -1140,6 +1140,53 @@ declare class UniversalLLMAdapter implements ILLMProvider {
|
|
|
1140
1140
|
ping(): Promise<boolean>;
|
|
1141
1141
|
}
|
|
1142
1142
|
|
|
1143
|
+
interface CustomEmbeddingOptions {
|
|
1144
|
+
/** Base URL of the custom embedding server (e.g., http://localhost:8080/v1 or https://embeddings.mycompany.com) */
|
|
1145
|
+
baseUrl?: string;
|
|
1146
|
+
/** Relative endpoint path for embeddings (default: '/embeddings') */
|
|
1147
|
+
embedPath?: string;
|
|
1148
|
+
/** Endpoint path for health check (default: '/health' or root) */
|
|
1149
|
+
pingPath?: string;
|
|
1150
|
+
/** Prefix to prepend to query texts (e.g., "query: " for BGE/Nomic models) */
|
|
1151
|
+
queryPrefix?: string;
|
|
1152
|
+
/** Prefix to prepend to document texts (e.g., "passage: " or "document: ") */
|
|
1153
|
+
documentPrefix?: string;
|
|
1154
|
+
/** Template string to build custom JSON payload if non-standard (e.g. '{"inputs": {{input}}, "model": "{{model}}"}') */
|
|
1155
|
+
embedPayloadTemplate?: string;
|
|
1156
|
+
/** JSON path to extract embedding float array from response (default: 'data[0].embedding' or 'embedding') */
|
|
1157
|
+
embedExtractPath?: string;
|
|
1158
|
+
/** Custom HTTP headers */
|
|
1159
|
+
headers?: Record<string, string>;
|
|
1160
|
+
/** Timeout in milliseconds (default: 30000) */
|
|
1161
|
+
timeout?: number;
|
|
1162
|
+
}
|
|
1163
|
+
declare class CustomEmbeddingProvider implements ILLMProvider {
|
|
1164
|
+
private readonly http;
|
|
1165
|
+
private readonly model;
|
|
1166
|
+
private readonly baseUrl;
|
|
1167
|
+
private readonly apiKey?;
|
|
1168
|
+
private readonly opts;
|
|
1169
|
+
constructor(config: EmbeddingConfig | LLMConfig);
|
|
1170
|
+
/**
|
|
1171
|
+
* Dummy chat implementation. CustomEmbeddingProvider is dedicated to embedding generation.
|
|
1172
|
+
*/
|
|
1173
|
+
chat(_messages: ChatMessage[], _context?: string, _options?: ChatOptions): Promise<string>;
|
|
1174
|
+
/**
|
|
1175
|
+
* Generate vector embedding for a single string.
|
|
1176
|
+
*/
|
|
1177
|
+
embed(text: string, options?: EmbedOptions): Promise<number[]>;
|
|
1178
|
+
/**
|
|
1179
|
+
* Batch embedding generation for multiple texts.
|
|
1180
|
+
*/
|
|
1181
|
+
batchEmbed(texts: string[], options?: EmbedOptions): Promise<number[][]>;
|
|
1182
|
+
/**
|
|
1183
|
+
* Ping provider endpoint for health check.
|
|
1184
|
+
*/
|
|
1185
|
+
ping(): Promise<boolean>;
|
|
1186
|
+
private extractVector;
|
|
1187
|
+
private extractBatchVectors;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1143
1190
|
/**
|
|
1144
1191
|
* LicensedRetrivora — End-user facing SDK that only requires:
|
|
1145
1192
|
* - License Key (JWT from Retrivora)
|
|
@@ -1264,7 +1311,7 @@ interface TelemetryEvent {
|
|
|
1264
1311
|
documentName?: string;
|
|
1265
1312
|
documentSize?: number;
|
|
1266
1313
|
chunksGenerated?: number;
|
|
1267
|
-
|
|
1314
|
+
queryLength?: number;
|
|
1268
1315
|
resultCount?: number;
|
|
1269
1316
|
errorCode?: string;
|
|
1270
1317
|
errorMessage?: string;
|
|
@@ -1324,10 +1371,10 @@ declare class TelemetryService {
|
|
|
1324
1371
|
durationMs: number;
|
|
1325
1372
|
}): void;
|
|
1326
1373
|
/**
|
|
1327
|
-
* Record query execution event
|
|
1374
|
+
* Record query execution event (PII-safe)
|
|
1328
1375
|
*/
|
|
1329
1376
|
recordQueryExecuted(data: {
|
|
1330
|
-
|
|
1377
|
+
queryLength: number;
|
|
1331
1378
|
resultCount: number;
|
|
1332
1379
|
durationMs: number;
|
|
1333
1380
|
operationId?: string;
|
|
@@ -1374,4 +1421,4 @@ declare function initializeTelemetryService(projectId: string, licenseKey: strin
|
|
|
1374
1421
|
*/
|
|
1375
1422
|
declare function shutdownTelemetryService(): Promise<void>;
|
|
1376
1423
|
|
|
1377
|
-
export { AnthropicProvider, BaseVectorProvider, CarouselRendererStrategy, ChartRendererStrategy, ChatMessage, ChatOptions, ChatResponse, ChromaDBProvider, ConfigBuilder, ConfigResolver, DecisionContext, DocumentParser, Edge, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, EventType, GraphNode, GraphSearchResult, GroqProvider, HealthCheckResult, ILLMProvider, IProviderHealthChecker, IProviderValidator, IRenderRule, IRendererStrategy, IngestDocument, IntentCategory, IntentClassifier, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, type LicensePayload, LicenseVerifier, LicensedRetrivora, type LicensedRetrivoraOptions, MilvusProvider, MixedRendererStrategy, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, PRESETS, PineconeProvider, PostgreSQLProvider, ProviderHealthCheck, ProviderRegistry, QdrantProvider, QwenProvider, RAGConfig, RagConfig, RedisProvider, RenderDecision, RendererRegistry, Rule1SpecificInfoRule, Rule2ComparisonRule, Rule3ProductDiscoveryRule, Rule4AnalyticalRule, Rule5MixedResponseRule, Rule6SmallResultSetRule, Rule7LargeTableRule, RuleEngine, type RuntimeTierConfig, TableRendererStrategy, type TelemetryEvent, TelemetryService, TextRendererStrategy, UIConfig, UITransformationResponse, UniversalLLMAdapter, UniversalRagConfig, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, VisualizationDecisionEngine, WeaviateProvider, createFromPreset, createRetrivora, decideVisualization, getRagConfig, getRuntimeConfig, getTelemetryService, initializeTelemetryService, injectRuntimeConfig, shutdownTelemetryService };
|
|
1424
|
+
export { AnthropicProvider, BaseVectorProvider, CarouselRendererStrategy, ChartRendererStrategy, ChatMessage, ChatOptions, ChatResponse, ChromaDBProvider, ConfigBuilder, ConfigResolver, type CustomEmbeddingOptions, CustomEmbeddingProvider, DecisionContext, DocumentParser, Edge, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, EventType, GraphNode, GraphSearchResult, GroqProvider, HealthCheckResult, ILLMProvider, IProviderHealthChecker, IProviderValidator, IRenderRule, IRendererStrategy, IngestDocument, IntentCategory, IntentClassifier, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, type LicensePayload, LicenseVerifier, LicensedRetrivora, type LicensedRetrivoraOptions, MilvusProvider, MixedRendererStrategy, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, PRESETS, PineconeProvider, PostgreSQLProvider, ProviderHealthCheck, ProviderRegistry, QdrantProvider, QwenProvider, RAGConfig, RagConfig, RedisProvider, RenderDecision, RendererRegistry, Rule1SpecificInfoRule, Rule2ComparisonRule, Rule3ProductDiscoveryRule, Rule4AnalyticalRule, Rule5MixedResponseRule, Rule6SmallResultSetRule, Rule7LargeTableRule, RuleEngine, type RuntimeTierConfig, TableRendererStrategy, type TelemetryEvent, TelemetryService, TextRendererStrategy, UIConfig, UITransformationResponse, UniversalLLMAdapter, UniversalRagConfig, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, VisualizationDecisionEngine, WeaviateProvider, createFromPreset, createRetrivora, decideVisualization, getRagConfig, getRuntimeConfig, getTelemetryService, initializeTelemetryService, injectRuntimeConfig, shutdownTelemetryService };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as RagConfig, v as UniversalRagConfig, V as VectorDBConfig, w as UpsertDocument, y as VectorMatch, G as GraphDBConfig, H as GraphNode, J as Edge, K as GraphSearchResult, L as LLMConfig, f as EmbeddingConfig, I as ILLMProvider, x as VectorDBProvider, i as LLMProvider, g as EmbeddingProvider, R as RAGConfig, u as UIConfig, U as UITransformationResponse, C as ChatMessage, d as ChatOptions, E as EmbedOptions, h as IngestDocument, e as ChatResponse } from './ILLMProvider-
|
|
2
|
-
export { A as AuthMode, M as BarChartData, N as CarouselProduct, Q as IRetriever, j as LatencyBreakdown, S as LineChartDataPoint, X as MessageRole, Y as MetricCardData, O as ObservabilityTrace, Z as PieChartData, P as Product, k as ProjectAiSettings, l as ProjectAuthSettings, m as ProjectBrandingSettings, c as ProjectChatSettings, n as ProjectTelemetrySettings, o as ProjectWidgetSettings, q as RagMessage, r as RetrievalConfig, _ as RetrievalResult, s as RetrievedChunk, $ as RetrivoraChunkMetadata, a0 as RetrivoraIngestedDocument, a1 as ScatterPlotDataPoint, a2 as SuggestionsResponse, a3 as TableData, T as ThemeMode, t as TokenUsage, a as UseRagChatOptions, b as UseRagChatReturn, a4 as VisualizationType, W as WidgetPosition, z as WorkflowConfig, B as createDefaultProjectSettings, D as normalizeProjectSettings, F as projectSettingsToUiConfig } from './ILLMProvider-
|
|
3
|
-
import { o as DecisionContext, q as IntentCategory, I as IRenderRule, G as RenderDecision, p as IRendererStrategy } from './index
|
|
4
|
-
export { V as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, e as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, i as Chunk, j as ChunkOptions, c as ClientConfig, m as ConfigFetcher, b as ConfigProviderProps, n as ConfigurationException, W as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, X as LicenseConfigResolver, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, M as MessageBubbleProps, Y as Pipeline, Z as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, v as ProviderCredentials, w as ProviderNotFoundException, _ as ProviderPill, x as RateLimitException, R as RemoteConfig, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, $ as RenderSectionDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, a0 as Snippet, S as SourceCardProps, a1 as wrapError } from './index
|
|
5
|
-
import { I as IProviderValidator, a as IProviderHealthChecker, H as HealthCheckResult } from './index-
|
|
6
|
-
export { C as ConfigValidator, b as HandlerOptions, V as ValidationError, c as VectorPlugin, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, o as sseTextFrame } from './index-
|
|
1
|
+
import { p as RagConfig, v as UniversalRagConfig, V as VectorDBConfig, w as UpsertDocument, y as VectorMatch, G as GraphDBConfig, H as GraphNode, J as Edge, K as GraphSearchResult, L as LLMConfig, f as EmbeddingConfig, I as ILLMProvider, x as VectorDBProvider, i as LLMProvider, g as EmbeddingProvider, R as RAGConfig, u as UIConfig, U as UITransformationResponse, C as ChatMessage, d as ChatOptions, E as EmbedOptions, h as IngestDocument, e as ChatResponse } from './ILLMProvider-DwFj0h2u.js';
|
|
2
|
+
export { A as AuthMode, M as BarChartData, N as CarouselProduct, Q as IRetriever, j as LatencyBreakdown, S as LineChartDataPoint, X as MessageRole, Y as MetricCardData, O as ObservabilityTrace, Z as PieChartData, P as Product, k as ProjectAiSettings, l as ProjectAuthSettings, m as ProjectBrandingSettings, c as ProjectChatSettings, n as ProjectTelemetrySettings, o as ProjectWidgetSettings, q as RagMessage, r as RetrievalConfig, _ as RetrievalResult, s as RetrievedChunk, $ as RetrivoraChunkMetadata, a0 as RetrivoraIngestedDocument, a1 as ScatterPlotDataPoint, a2 as SuggestionsResponse, a3 as TableData, T as ThemeMode, t as TokenUsage, a as UseRagChatOptions, b as UseRagChatReturn, a4 as VisualizationType, W as WidgetPosition, z as WorkflowConfig, B as createDefaultProjectSettings, D as normalizeProjectSettings, F as projectSettingsToUiConfig } from './ILLMProvider-DwFj0h2u.js';
|
|
3
|
+
import { o as DecisionContext, q as IntentCategory, I as IRenderRule, G as RenderDecision, p as IRendererStrategy } from './index-DP3_OpuB.js';
|
|
4
|
+
export { V as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, e as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, i as Chunk, j as ChunkOptions, c as ClientConfig, m as ConfigFetcher, b as ConfigProviderProps, n as ConfigurationException, W as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, X as LicenseConfigResolver, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, M as MessageBubbleProps, Y as Pipeline, Z as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, v as ProviderCredentials, w as ProviderNotFoundException, _ as ProviderPill, x as RateLimitException, R as RemoteConfig, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, $ as RenderSectionDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, a0 as Snippet, S as SourceCardProps, a1 as wrapError } from './index-DP3_OpuB.js';
|
|
5
|
+
import { I as IProviderValidator, a as IProviderHealthChecker, H as HealthCheckResult } from './index-Cb0GsT16.js';
|
|
6
|
+
export { C as ConfigValidator, b as HandlerOptions, V as ValidationError, c as VectorPlugin, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, o as sseTextFrame } from './index-Cb0GsT16.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'next/server';
|
|
9
9
|
|
|
@@ -1140,6 +1140,53 @@ declare class UniversalLLMAdapter implements ILLMProvider {
|
|
|
1140
1140
|
ping(): Promise<boolean>;
|
|
1141
1141
|
}
|
|
1142
1142
|
|
|
1143
|
+
interface CustomEmbeddingOptions {
|
|
1144
|
+
/** Base URL of the custom embedding server (e.g., http://localhost:8080/v1 or https://embeddings.mycompany.com) */
|
|
1145
|
+
baseUrl?: string;
|
|
1146
|
+
/** Relative endpoint path for embeddings (default: '/embeddings') */
|
|
1147
|
+
embedPath?: string;
|
|
1148
|
+
/** Endpoint path for health check (default: '/health' or root) */
|
|
1149
|
+
pingPath?: string;
|
|
1150
|
+
/** Prefix to prepend to query texts (e.g., "query: " for BGE/Nomic models) */
|
|
1151
|
+
queryPrefix?: string;
|
|
1152
|
+
/** Prefix to prepend to document texts (e.g., "passage: " or "document: ") */
|
|
1153
|
+
documentPrefix?: string;
|
|
1154
|
+
/** Template string to build custom JSON payload if non-standard (e.g. '{"inputs": {{input}}, "model": "{{model}}"}') */
|
|
1155
|
+
embedPayloadTemplate?: string;
|
|
1156
|
+
/** JSON path to extract embedding float array from response (default: 'data[0].embedding' or 'embedding') */
|
|
1157
|
+
embedExtractPath?: string;
|
|
1158
|
+
/** Custom HTTP headers */
|
|
1159
|
+
headers?: Record<string, string>;
|
|
1160
|
+
/** Timeout in milliseconds (default: 30000) */
|
|
1161
|
+
timeout?: number;
|
|
1162
|
+
}
|
|
1163
|
+
declare class CustomEmbeddingProvider implements ILLMProvider {
|
|
1164
|
+
private readonly http;
|
|
1165
|
+
private readonly model;
|
|
1166
|
+
private readonly baseUrl;
|
|
1167
|
+
private readonly apiKey?;
|
|
1168
|
+
private readonly opts;
|
|
1169
|
+
constructor(config: EmbeddingConfig | LLMConfig);
|
|
1170
|
+
/**
|
|
1171
|
+
* Dummy chat implementation. CustomEmbeddingProvider is dedicated to embedding generation.
|
|
1172
|
+
*/
|
|
1173
|
+
chat(_messages: ChatMessage[], _context?: string, _options?: ChatOptions): Promise<string>;
|
|
1174
|
+
/**
|
|
1175
|
+
* Generate vector embedding for a single string.
|
|
1176
|
+
*/
|
|
1177
|
+
embed(text: string, options?: EmbedOptions): Promise<number[]>;
|
|
1178
|
+
/**
|
|
1179
|
+
* Batch embedding generation for multiple texts.
|
|
1180
|
+
*/
|
|
1181
|
+
batchEmbed(texts: string[], options?: EmbedOptions): Promise<number[][]>;
|
|
1182
|
+
/**
|
|
1183
|
+
* Ping provider endpoint for health check.
|
|
1184
|
+
*/
|
|
1185
|
+
ping(): Promise<boolean>;
|
|
1186
|
+
private extractVector;
|
|
1187
|
+
private extractBatchVectors;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1143
1190
|
/**
|
|
1144
1191
|
* LicensedRetrivora — End-user facing SDK that only requires:
|
|
1145
1192
|
* - License Key (JWT from Retrivora)
|
|
@@ -1264,7 +1311,7 @@ interface TelemetryEvent {
|
|
|
1264
1311
|
documentName?: string;
|
|
1265
1312
|
documentSize?: number;
|
|
1266
1313
|
chunksGenerated?: number;
|
|
1267
|
-
|
|
1314
|
+
queryLength?: number;
|
|
1268
1315
|
resultCount?: number;
|
|
1269
1316
|
errorCode?: string;
|
|
1270
1317
|
errorMessage?: string;
|
|
@@ -1324,10 +1371,10 @@ declare class TelemetryService {
|
|
|
1324
1371
|
durationMs: number;
|
|
1325
1372
|
}): void;
|
|
1326
1373
|
/**
|
|
1327
|
-
* Record query execution event
|
|
1374
|
+
* Record query execution event (PII-safe)
|
|
1328
1375
|
*/
|
|
1329
1376
|
recordQueryExecuted(data: {
|
|
1330
|
-
|
|
1377
|
+
queryLength: number;
|
|
1331
1378
|
resultCount: number;
|
|
1332
1379
|
durationMs: number;
|
|
1333
1380
|
operationId?: string;
|
|
@@ -1374,4 +1421,4 @@ declare function initializeTelemetryService(projectId: string, licenseKey: strin
|
|
|
1374
1421
|
*/
|
|
1375
1422
|
declare function shutdownTelemetryService(): Promise<void>;
|
|
1376
1423
|
|
|
1377
|
-
export { AnthropicProvider, BaseVectorProvider, CarouselRendererStrategy, ChartRendererStrategy, ChatMessage, ChatOptions, ChatResponse, ChromaDBProvider, ConfigBuilder, ConfigResolver, DecisionContext, DocumentParser, Edge, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, EventType, GraphNode, GraphSearchResult, GroqProvider, HealthCheckResult, ILLMProvider, IProviderHealthChecker, IProviderValidator, IRenderRule, IRendererStrategy, IngestDocument, IntentCategory, IntentClassifier, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, type LicensePayload, LicenseVerifier, LicensedRetrivora, type LicensedRetrivoraOptions, MilvusProvider, MixedRendererStrategy, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, PRESETS, PineconeProvider, PostgreSQLProvider, ProviderHealthCheck, ProviderRegistry, QdrantProvider, QwenProvider, RAGConfig, RagConfig, RedisProvider, RenderDecision, RendererRegistry, Rule1SpecificInfoRule, Rule2ComparisonRule, Rule3ProductDiscoveryRule, Rule4AnalyticalRule, Rule5MixedResponseRule, Rule6SmallResultSetRule, Rule7LargeTableRule, RuleEngine, type RuntimeTierConfig, TableRendererStrategy, type TelemetryEvent, TelemetryService, TextRendererStrategy, UIConfig, UITransformationResponse, UniversalLLMAdapter, UniversalRagConfig, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, VisualizationDecisionEngine, WeaviateProvider, createFromPreset, createRetrivora, decideVisualization, getRagConfig, getRuntimeConfig, getTelemetryService, initializeTelemetryService, injectRuntimeConfig, shutdownTelemetryService };
|
|
1424
|
+
export { AnthropicProvider, BaseVectorProvider, CarouselRendererStrategy, ChartRendererStrategy, ChatMessage, ChatOptions, ChatResponse, ChromaDBProvider, ConfigBuilder, ConfigResolver, type CustomEmbeddingOptions, CustomEmbeddingProvider, DecisionContext, DocumentParser, Edge, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, EventType, GraphNode, GraphSearchResult, GroqProvider, HealthCheckResult, ILLMProvider, IProviderHealthChecker, IProviderValidator, IRenderRule, IRendererStrategy, IngestDocument, IntentCategory, IntentClassifier, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, type LicensePayload, LicenseVerifier, LicensedRetrivora, type LicensedRetrivoraOptions, MilvusProvider, MixedRendererStrategy, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, PRESETS, PineconeProvider, PostgreSQLProvider, ProviderHealthCheck, ProviderRegistry, QdrantProvider, QwenProvider, RAGConfig, RagConfig, RedisProvider, RenderDecision, RendererRegistry, Rule1SpecificInfoRule, Rule2ComparisonRule, Rule3ProductDiscoveryRule, Rule4AnalyticalRule, Rule5MixedResponseRule, Rule6SmallResultSetRule, Rule7LargeTableRule, RuleEngine, type RuntimeTierConfig, TableRendererStrategy, type TelemetryEvent, TelemetryService, TextRendererStrategy, UIConfig, UITransformationResponse, UniversalLLMAdapter, UniversalRagConfig, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, VisualizationDecisionEngine, WeaviateProvider, createFromPreset, createRetrivora, decideVisualization, getRagConfig, getRuntimeConfig, getTelemetryService, initializeTelemetryService, injectRuntimeConfig, shutdownTelemetryService };
|