@retrivora-ai/rag-engine 2.3.9 → 2.4.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.
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, MouseEvent, ReactNode, ElementType } from 'react';
2
- import { W as WidgetPosition, Z as Product, s as UIConfig, P as ProjectChatSettings, o as RagMessage, w as VectorMatch, L as LLMConfig, d as EmbeddingConfig, V as VectorDBConfig, J as UITransformationResponse, n as RagConfig, I as ILLMProvider, f as IngestDocument, C as ChatMessage, c as ChatResponse, _ as RetrievalResult, t as UniversalRagConfig } from './ILLMProvider-B8TAVx3j.js';
2
+ import { W as WidgetPosition, Z as Product, s as UIConfig, P as ProjectChatSettings, o as RagMessage, w as VectorMatch, L as LLMConfig, d as EmbeddingConfig, V as VectorDBConfig, J as UITransformationResponse, n as RagConfig, I as ILLMProvider, f as IngestDocument, C as ChatMessage, c as ChatResponse, _ as RetrievalResult, t as UniversalRagConfig } from './ILLMProvider-Y6aL5N8J.js';
3
3
 
4
4
  interface ArchitectureCardProps {
5
5
  icon: ReactNode;
@@ -61,6 +61,10 @@ interface ChatWindowProps {
61
61
  licenseKey?: string;
62
62
  /** Optional custom headers to send with the chat request */
63
63
  headers?: Record<string, string>;
64
+ /** Optional session ID to load conversation history from the server */
65
+ sessionId?: string;
66
+ /** Whether to show the ChatGPT-style sidebar history management and new chat controls */
67
+ showHistory?: boolean;
64
68
  }
65
69
  interface ChatWidgetProps {
66
70
  /** Position of the floating button. Defaults to bottom-right. */
@@ -143,6 +147,12 @@ interface ConfigProviderProps {
143
147
  retrivoraApiBase?: string;
144
148
  projectSettings?: Partial<ProjectChatSettings>;
145
149
  autoLoadProjectSettings?: boolean;
150
+ primaryColor?: string;
151
+ secondaryColor?: string;
152
+ accentColor?: string;
153
+ theme?: 'light' | 'dark' | 'system';
154
+ borderRadius?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
155
+ visualStyle?: 'solid' | 'glass';
146
156
  };
147
157
  children: ReactNode;
148
158
  }
@@ -253,6 +263,7 @@ interface LicenseTierConfig {
253
263
  requestsPerMinute: number;
254
264
  tokensPerDay: number;
255
265
  };
266
+ systemPrompt?: string;
256
267
  }
257
268
  interface ProviderCredentials {
258
269
  geminiApiKey?: string;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, MouseEvent, ReactNode, ElementType } from 'react';
2
- import { W as WidgetPosition, Z as Product, s as UIConfig, P as ProjectChatSettings, o as RagMessage, w as VectorMatch, L as LLMConfig, d as EmbeddingConfig, V as VectorDBConfig, J as UITransformationResponse, n as RagConfig, I as ILLMProvider, f as IngestDocument, C as ChatMessage, c as ChatResponse, _ as RetrievalResult, t as UniversalRagConfig } from './ILLMProvider-B8TAVx3j.mjs';
2
+ import { W as WidgetPosition, Z as Product, s as UIConfig, P as ProjectChatSettings, o as RagMessage, w as VectorMatch, L as LLMConfig, d as EmbeddingConfig, V as VectorDBConfig, J as UITransformationResponse, n as RagConfig, I as ILLMProvider, f as IngestDocument, C as ChatMessage, c as ChatResponse, _ as RetrievalResult, t as UniversalRagConfig } from './ILLMProvider-Y6aL5N8J.mjs';
3
3
 
4
4
  interface ArchitectureCardProps {
5
5
  icon: ReactNode;
@@ -61,6 +61,10 @@ interface ChatWindowProps {
61
61
  licenseKey?: string;
62
62
  /** Optional custom headers to send with the chat request */
63
63
  headers?: Record<string, string>;
64
+ /** Optional session ID to load conversation history from the server */
65
+ sessionId?: string;
66
+ /** Whether to show the ChatGPT-style sidebar history management and new chat controls */
67
+ showHistory?: boolean;
64
68
  }
65
69
  interface ChatWidgetProps {
66
70
  /** Position of the floating button. Defaults to bottom-right. */
@@ -143,6 +147,12 @@ interface ConfigProviderProps {
143
147
  retrivoraApiBase?: string;
144
148
  projectSettings?: Partial<ProjectChatSettings>;
145
149
  autoLoadProjectSettings?: boolean;
150
+ primaryColor?: string;
151
+ secondaryColor?: string;
152
+ accentColor?: string;
153
+ theme?: 'light' | 'dark' | 'system';
154
+ borderRadius?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
155
+ visualStyle?: 'solid' | 'glass';
146
156
  };
147
157
  children: ReactNode;
148
158
  }
@@ -253,6 +263,7 @@ interface LicenseTierConfig {
253
263
  requestsPerMinute: number;
254
264
  tokensPerDay: number;
255
265
  };
266
+ systemPrompt?: string;
256
267
  }
257
268
  interface ProviderCredentials {
258
269
  geminiApiKey?: string;
@@ -264,6 +264,7 @@ interface UIConfig {
264
264
  allowResize?: boolean;
265
265
  /** Whether to enable voice search input. Defaults to true. */
266
266
  enableVoiceInput?: boolean;
267
+ theme?: 'light' | 'dark' | 'system';
267
268
  }
268
269
  interface CAGConfig {
269
270
  /** Enable Cold RAG (Cache Augmented Generation) */
@@ -264,6 +264,7 @@ interface UIConfig {
264
264
  allowResize?: boolean;
265
265
  /** Whether to enable voice search input. Defaults to true. */
266
266
  enableVoiceInput?: boolean;
267
+ theme?: 'light' | 'dark' | 'system';
267
268
  }
268
269
  interface CAGConfig {
269
270
  /** Enable Cold RAG (Cache Augmented Generation) */
@@ -1,3 +1,3 @@
1
1
  import 'next/server';
2
- export { b as HandlerOptions, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, p as createLicenseHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, q as createSuggestionsHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, r as sseObservabilityFrame, o as sseTextFrame, t as sseUIFrame } from '../index-C7aHK7_g.mjs';
3
- import '../ILLMProvider-B8TAVx3j.mjs';
2
+ export { b as HandlerOptions, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, p as createLicenseHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, q as createSuggestionsHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, r as sseObservabilityFrame, o as sseTextFrame, t as sseUIFrame } from '../index-59CHg0V3.mjs';
3
+ import '../ILLMProvider-Y6aL5N8J.mjs';
@@ -1,3 +1,3 @@
1
1
  import 'next/server';
2
- export { b as HandlerOptions, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, p as createLicenseHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, q as createSuggestionsHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, r as sseObservabilityFrame, o as sseTextFrame, t as sseUIFrame } from '../index-BQd6Bax0.js';
3
- import '../ILLMProvider-B8TAVx3j.js';
2
+ export { b as HandlerOptions, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, p as createLicenseHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, q as createSuggestionsHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, r as sseObservabilityFrame, o as sseTextFrame, t as sseUIFrame } from '../index-BgKRInpa.js';
3
+ import '../ILLMProvider-Y6aL5N8J.js';
@@ -317,7 +317,7 @@ var init_package = __esm({
317
317
  "package.json"() {
318
318
  package_default = {
319
319
  name: "@retrivora-ai/rag-engine",
320
- version: "2.3.9",
320
+ version: "2.4.0",
321
321
  description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
322
322
  author: "Abhinav Alkuchi",
323
323
  license: "UNLICENSED",
@@ -3033,7 +3033,7 @@ function readEnum(env, name, fallback, allowed) {
3033
3033
  throw new Error(`[getRagConfig] ${name} must be one of: ${allowed.join(", ")}`);
3034
3034
  }
3035
3035
  function getEnvConfig(env = process.env, base) {
3036
- var _a3, _b, _c, _d, _e, _f, _g2, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb, _yb, _zb, _Ab, _Bb, _Cb, _Db, _Eb, _Fb, _Gb, _Hb, _Ib;
3036
+ var _a3, _b, _c, _d, _e, _f, _g2, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb, _yb, _zb, _Ab, _Bb, _Cb, _Db, _Eb, _Fb, _Gb, _Hb, _Ib, _Jb, _Kb, _Lb, _Mb, _Nb;
3037
3037
  const licenseKey = (_d = (_c = (_b = (_a3 = readString(env, "RAG_LICENSE_KEY")) != null ? _a3 : readString(env, "RETRIVORA_LICENSE_KEY")) != null ? _b : readString(env, "NEXT_PUBLIC_RETRIVORA_LICENSE_KEY")) != null ? _c : readString(env, "LICENSE_KEY")) != null ? _d : base == null ? void 0 : base.licenseKey;
3038
3038
  const jwtProjectId = (() => {
3039
3039
  if (!licenseKey) return void 0;
@@ -3168,8 +3168,8 @@ function getEnvConfig(env = process.env, base) {
3168
3168
  model: llmModel,
3169
3169
  apiKey: llmApiKey,
3170
3170
  baseUrl: llmBaseUrl,
3171
- systemPrompt: readString(env, "LLM_SYSTEM_PROMPT"),
3172
- maxTokens: readNumber(env, "LLM_MAX_TOKENS", 4096),
3171
+ systemPrompt: (_hb = readString(env, "LLM_SYSTEM_PROMPT")) != null ? _hb : rt == null ? void 0 : rt.systemPrompt,
3172
+ maxTokens: readNumber(env, "LLM_MAX_TOKENS", (_ib = rt == null ? void 0 : rt.maxTokens) != null ? _ib : 4096),
3173
3173
  temperature: readNumber(env, "LLM_TEMPERATURE", 0.7),
3174
3174
  options: {
3175
3175
  profile: llmProfile,
@@ -3190,30 +3190,30 @@ function getEnvConfig(env = process.env, base) {
3190
3190
  }
3191
3191
  },
3192
3192
  ui: {
3193
- title: (_ib = (_hb = readString(env, "NEXT_PUBLIC_UI_TITLE")) != null ? _hb : readString(env, "UI_TITLE")) != null ? _ib : "AI Assistant",
3194
- subtitle: (_kb = (_jb = readString(env, "NEXT_PUBLIC_UI_SUBTITLE")) != null ? _jb : readString(env, "UI_SUBTITLE")) != null ? _kb : "Powered by RAG",
3195
- primaryColor: (_mb = (_lb = readString(env, "NEXT_PUBLIC_PRIMARY_COLOR")) != null ? _lb : readString(env, "UI_PRIMARY_COLOR")) != null ? _mb : "#10b981",
3196
- accentColor: (_ob = (_nb = readString(env, "NEXT_PUBLIC_ACCENT_COLOR")) != null ? _nb : readString(env, "UI_ACCENT_COLOR")) != null ? _ob : "#3b82f6",
3197
- logoUrl: (_pb = readString(env, "NEXT_PUBLIC_LOGO_URL")) != null ? _pb : readString(env, "UI_LOGO_URL"),
3198
- placeholder: (_rb = (_qb = readString(env, "NEXT_PUBLIC_PLACEHOLDER")) != null ? _qb : readString(env, "UI_PLACEHOLDER")) != null ? _rb : "Ask me anything\u2026",
3199
- showSources: ((_tb = (_sb = readString(env, "NEXT_PUBLIC_SHOW_SOURCES")) != null ? _sb : readString(env, "UI_SHOW_SOURCES")) != null ? _tb : "true") !== "false",
3200
- welcomeMessage: (_vb = (_ub = readString(env, "NEXT_PUBLIC_WELCOME_MESSAGE")) != null ? _ub : readString(env, "UI_WELCOME_MESSAGE")) != null ? _vb : "Hello! I'm your AI assistant. Ask me anything about your documents.",
3201
- visualStyle: (_xb = (_wb = readString(env, "NEXT_PUBLIC_UI_VISUAL_STYLE")) != null ? _wb : readString(env, "UI_VISUAL_STYLE")) != null ? _xb : "glass",
3202
- borderRadius: (_zb = (_yb = readString(env, "NEXT_PUBLIC_UI_BORDER_RADIUS")) != null ? _yb : readString(env, "UI_BORDER_RADIUS")) != null ? _zb : "xl",
3203
- allowUpload: ((_Bb = (_Ab = readString(env, "NEXT_PUBLIC_ALLOW_UPLOAD")) != null ? _Ab : readString(env, "UI_ALLOW_UPLOAD")) != null ? _Bb : "false") === "true"
3193
+ title: (_kb = (_jb = readString(env, "NEXT_PUBLIC_UI_TITLE")) != null ? _jb : readString(env, "UI_TITLE")) != null ? _kb : "AI Assistant",
3194
+ subtitle: (_mb = (_lb = readString(env, "NEXT_PUBLIC_UI_SUBTITLE")) != null ? _lb : readString(env, "UI_SUBTITLE")) != null ? _mb : "Powered by RAG",
3195
+ primaryColor: (_ob = (_nb = readString(env, "NEXT_PUBLIC_PRIMARY_COLOR")) != null ? _nb : readString(env, "UI_PRIMARY_COLOR")) != null ? _ob : "#10b981",
3196
+ accentColor: (_qb = (_pb = readString(env, "NEXT_PUBLIC_ACCENT_COLOR")) != null ? _pb : readString(env, "UI_ACCENT_COLOR")) != null ? _qb : "#3b82f6",
3197
+ logoUrl: (_rb = readString(env, "NEXT_PUBLIC_LOGO_URL")) != null ? _rb : readString(env, "UI_LOGO_URL"),
3198
+ placeholder: (_tb = (_sb = readString(env, "NEXT_PUBLIC_PLACEHOLDER")) != null ? _sb : readString(env, "UI_PLACEHOLDER")) != null ? _tb : "Ask me anything\u2026",
3199
+ showSources: ((_vb = (_ub = readString(env, "NEXT_PUBLIC_SHOW_SOURCES")) != null ? _ub : readString(env, "UI_SHOW_SOURCES")) != null ? _vb : "true") !== "false",
3200
+ welcomeMessage: (_xb = (_wb = readString(env, "NEXT_PUBLIC_WELCOME_MESSAGE")) != null ? _wb : readString(env, "UI_WELCOME_MESSAGE")) != null ? _xb : "Hello! I'm your AI assistant. Ask me anything about your documents.",
3201
+ visualStyle: (_zb = (_yb = readString(env, "NEXT_PUBLIC_UI_VISUAL_STYLE")) != null ? _yb : readString(env, "UI_VISUAL_STYLE")) != null ? _zb : "glass",
3202
+ borderRadius: (_Bb = (_Ab = readString(env, "NEXT_PUBLIC_UI_BORDER_RADIUS")) != null ? _Ab : readString(env, "UI_BORDER_RADIUS")) != null ? _Bb : "xl",
3203
+ allowUpload: ((_Db = (_Cb = readString(env, "NEXT_PUBLIC_ALLOW_UPLOAD")) != null ? _Cb : readString(env, "UI_ALLOW_UPLOAD")) != null ? _Db : "false") === "true"
3204
3204
  },
3205
3205
  rag: {
3206
- topK: readNumber(env, "RAG_TOP_K", 5),
3206
+ topK: readNumber(env, "RAG_TOP_K", (_Eb = rt == null ? void 0 : rt.topK) != null ? _Eb : 5),
3207
3207
  scoreThreshold: readNumber(env, "RAG_SCORE_THRESHOLD", 0),
3208
- chunkSize: readNumber(env, "RAG_CHUNK_SIZE", 1e3),
3209
- chunkOverlap: readNumber(env, "RAG_CHUNK_OVERLAP", 200),
3210
- filterableFields: (_Cb = readString(env, "RAG_FILTERABLE_FIELDS")) == null ? void 0 : _Cb.split(",").map((f) => f.trim()),
3208
+ chunkSize: readNumber(env, "RAG_CHUNK_SIZE", (_Fb = rt == null ? void 0 : rt.chunkSize) != null ? _Fb : 1e3),
3209
+ chunkOverlap: readNumber(env, "RAG_CHUNK_OVERLAP", (_Gb = rt == null ? void 0 : rt.chunkOverlap) != null ? _Gb : 200),
3210
+ filterableFields: (_Hb = readString(env, "RAG_FILTERABLE_FIELDS")) == null ? void 0 : _Hb.split(",").map((f) => f.trim()),
3211
3211
  // Query pipeline toggles — read from .env.local
3212
3212
  useQueryTransformation: readString(env, "RAG_USE_QUERY_TRANSFORMATION") === "true",
3213
3213
  useReranking: readString(env, "RAG_USE_RERANKING") === "true",
3214
3214
  useGraphRetrieval: readString(env, "RAG_USE_GRAPH_RETRIEVAL") === "true",
3215
- architecture: (_Db = readString(env, "RAG_ARCHITECTURE")) != null ? _Db : "simple",
3216
- chunkingStrategy: (_Eb = readString(env, "RAG_CHUNKING_STRATEGY")) != null ? _Eb : "recursive",
3215
+ architecture: (_Ib = readString(env, "RAG_ARCHITECTURE")) != null ? _Ib : "simple",
3216
+ chunkingStrategy: (_Jb = readString(env, "RAG_CHUNKING_STRATEGY")) != null ? _Jb : "recursive",
3217
3217
  uiMapping: (() => {
3218
3218
  const raw = readString(env, "RAG_UI_MAPPING");
3219
3219
  if (!raw) return void 0;
@@ -3226,7 +3226,7 @@ function getEnvConfig(env = process.env, base) {
3226
3226
  },
3227
3227
  telemetry: {
3228
3228
  enabled: telemetryEnabled,
3229
- url: (_Ib = (_Hb = (_Fb = readString(env, "TELEMETRY_URL")) != null ? _Fb : readString(env, "NEXT_PUBLIC_TELEMETRY_URL")) != null ? _Hb : (_Gb = base == null ? void 0 : base.telemetry) == null ? void 0 : _Gb.url) != null ? _Ib : "https://www.retrivora.com/api/telemetry"
3229
+ url: (_Nb = (_Mb = (_Kb = readString(env, "TELEMETRY_URL")) != null ? _Kb : readString(env, "NEXT_PUBLIC_TELEMETRY_URL")) != null ? _Mb : (_Lb = base == null ? void 0 : base.telemetry) == null ? void 0 : _Lb.url) != null ? _Nb : "https://www.retrivora.com/api/telemetry"
3230
3230
  }
3231
3231
  }, readString(env, "GRAPH_DB_PROVIDER") ? {
3232
3232
  graphDb: {
@@ -11919,7 +11919,7 @@ function createRagHandler(configOrPlugin, options) {
11919
11919
  }
11920
11920
  }
11921
11921
  async function getSegment(req, context) {
11922
- var _a3, _b;
11922
+ var _a3, _b, _c;
11923
11923
  const contentType = req.headers.get("content-type") || "";
11924
11924
  if (contentType.includes("multipart/form-data")) {
11925
11925
  return "upload";
@@ -11934,10 +11934,12 @@ function createRagHandler(configOrPlugin, options) {
11934
11934
  if (pathname.endsWith("/suggestions")) return "suggestions";
11935
11935
  if (pathname.endsWith("/feedback")) return "feedback";
11936
11936
  if (pathname.endsWith("/history")) return "history";
11937
+ if (pathname.endsWith("/history/clear")) return "history/clear";
11938
+ if (pathname.endsWith("/sessions")) return "sessions";
11937
11939
  } catch (e) {
11938
11940
  }
11939
11941
  const resolvedParams = typeof ((_a3 = context == null ? void 0 : context.params) == null ? void 0 : _a3.then) === "function" ? await context.params : context == null ? void 0 : context.params;
11940
- const segments = (resolvedParams == null ? void 0 : resolvedParams.retrivora) || ((_b = resolvedParams == null ? void 0 : resolvedParams.params) == null ? void 0 : _b.retrivora) || [];
11942
+ const segments = (resolvedParams == null ? void 0 : resolvedParams.retrivora) || ((_b = resolvedParams == null ? void 0 : resolvedParams.params) == null ? void 0 : _b.retrivora) || (resolvedParams == null ? void 0 : resolvedParams.rag) || ((_c = resolvedParams == null ? void 0 : resolvedParams.params) == null ? void 0 : _c.rag) || [];
11941
11943
  const joined = segments.join("/");
11942
11944
  return joined || "chat";
11943
11945
  }
@@ -302,7 +302,7 @@ var init_package = __esm({
302
302
  "package.json"() {
303
303
  package_default = {
304
304
  name: "@retrivora-ai/rag-engine",
305
- version: "2.3.9",
305
+ version: "2.4.0",
306
306
  description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
307
307
  author: "Abhinav Alkuchi",
308
308
  license: "UNLICENSED",
@@ -2997,7 +2997,7 @@ function readEnum(env, name, fallback, allowed) {
2997
2997
  throw new Error(`[getRagConfig] ${name} must be one of: ${allowed.join(", ")}`);
2998
2998
  }
2999
2999
  function getEnvConfig(env = process.env, base) {
3000
- var _a3, _b, _c, _d, _e, _f, _g2, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb, _yb, _zb, _Ab, _Bb, _Cb, _Db, _Eb, _Fb, _Gb, _Hb, _Ib;
3000
+ var _a3, _b, _c, _d, _e, _f, _g2, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb, _yb, _zb, _Ab, _Bb, _Cb, _Db, _Eb, _Fb, _Gb, _Hb, _Ib, _Jb, _Kb, _Lb, _Mb, _Nb;
3001
3001
  const licenseKey = (_d = (_c = (_b = (_a3 = readString(env, "RAG_LICENSE_KEY")) != null ? _a3 : readString(env, "RETRIVORA_LICENSE_KEY")) != null ? _b : readString(env, "NEXT_PUBLIC_RETRIVORA_LICENSE_KEY")) != null ? _c : readString(env, "LICENSE_KEY")) != null ? _d : base == null ? void 0 : base.licenseKey;
3002
3002
  const jwtProjectId = (() => {
3003
3003
  if (!licenseKey) return void 0;
@@ -3132,8 +3132,8 @@ function getEnvConfig(env = process.env, base) {
3132
3132
  model: llmModel,
3133
3133
  apiKey: llmApiKey,
3134
3134
  baseUrl: llmBaseUrl,
3135
- systemPrompt: readString(env, "LLM_SYSTEM_PROMPT"),
3136
- maxTokens: readNumber(env, "LLM_MAX_TOKENS", 4096),
3135
+ systemPrompt: (_hb = readString(env, "LLM_SYSTEM_PROMPT")) != null ? _hb : rt == null ? void 0 : rt.systemPrompt,
3136
+ maxTokens: readNumber(env, "LLM_MAX_TOKENS", (_ib = rt == null ? void 0 : rt.maxTokens) != null ? _ib : 4096),
3137
3137
  temperature: readNumber(env, "LLM_TEMPERATURE", 0.7),
3138
3138
  options: {
3139
3139
  profile: llmProfile,
@@ -3154,30 +3154,30 @@ function getEnvConfig(env = process.env, base) {
3154
3154
  }
3155
3155
  },
3156
3156
  ui: {
3157
- title: (_ib = (_hb = readString(env, "NEXT_PUBLIC_UI_TITLE")) != null ? _hb : readString(env, "UI_TITLE")) != null ? _ib : "AI Assistant",
3158
- subtitle: (_kb = (_jb = readString(env, "NEXT_PUBLIC_UI_SUBTITLE")) != null ? _jb : readString(env, "UI_SUBTITLE")) != null ? _kb : "Powered by RAG",
3159
- primaryColor: (_mb = (_lb = readString(env, "NEXT_PUBLIC_PRIMARY_COLOR")) != null ? _lb : readString(env, "UI_PRIMARY_COLOR")) != null ? _mb : "#10b981",
3160
- accentColor: (_ob = (_nb = readString(env, "NEXT_PUBLIC_ACCENT_COLOR")) != null ? _nb : readString(env, "UI_ACCENT_COLOR")) != null ? _ob : "#3b82f6",
3161
- logoUrl: (_pb = readString(env, "NEXT_PUBLIC_LOGO_URL")) != null ? _pb : readString(env, "UI_LOGO_URL"),
3162
- placeholder: (_rb = (_qb = readString(env, "NEXT_PUBLIC_PLACEHOLDER")) != null ? _qb : readString(env, "UI_PLACEHOLDER")) != null ? _rb : "Ask me anything\u2026",
3163
- showSources: ((_tb = (_sb = readString(env, "NEXT_PUBLIC_SHOW_SOURCES")) != null ? _sb : readString(env, "UI_SHOW_SOURCES")) != null ? _tb : "true") !== "false",
3164
- welcomeMessage: (_vb = (_ub = readString(env, "NEXT_PUBLIC_WELCOME_MESSAGE")) != null ? _ub : readString(env, "UI_WELCOME_MESSAGE")) != null ? _vb : "Hello! I'm your AI assistant. Ask me anything about your documents.",
3165
- visualStyle: (_xb = (_wb = readString(env, "NEXT_PUBLIC_UI_VISUAL_STYLE")) != null ? _wb : readString(env, "UI_VISUAL_STYLE")) != null ? _xb : "glass",
3166
- borderRadius: (_zb = (_yb = readString(env, "NEXT_PUBLIC_UI_BORDER_RADIUS")) != null ? _yb : readString(env, "UI_BORDER_RADIUS")) != null ? _zb : "xl",
3167
- allowUpload: ((_Bb = (_Ab = readString(env, "NEXT_PUBLIC_ALLOW_UPLOAD")) != null ? _Ab : readString(env, "UI_ALLOW_UPLOAD")) != null ? _Bb : "false") === "true"
3157
+ title: (_kb = (_jb = readString(env, "NEXT_PUBLIC_UI_TITLE")) != null ? _jb : readString(env, "UI_TITLE")) != null ? _kb : "AI Assistant",
3158
+ subtitle: (_mb = (_lb = readString(env, "NEXT_PUBLIC_UI_SUBTITLE")) != null ? _lb : readString(env, "UI_SUBTITLE")) != null ? _mb : "Powered by RAG",
3159
+ primaryColor: (_ob = (_nb = readString(env, "NEXT_PUBLIC_PRIMARY_COLOR")) != null ? _nb : readString(env, "UI_PRIMARY_COLOR")) != null ? _ob : "#10b981",
3160
+ accentColor: (_qb = (_pb = readString(env, "NEXT_PUBLIC_ACCENT_COLOR")) != null ? _pb : readString(env, "UI_ACCENT_COLOR")) != null ? _qb : "#3b82f6",
3161
+ logoUrl: (_rb = readString(env, "NEXT_PUBLIC_LOGO_URL")) != null ? _rb : readString(env, "UI_LOGO_URL"),
3162
+ placeholder: (_tb = (_sb = readString(env, "NEXT_PUBLIC_PLACEHOLDER")) != null ? _sb : readString(env, "UI_PLACEHOLDER")) != null ? _tb : "Ask me anything\u2026",
3163
+ showSources: ((_vb = (_ub = readString(env, "NEXT_PUBLIC_SHOW_SOURCES")) != null ? _ub : readString(env, "UI_SHOW_SOURCES")) != null ? _vb : "true") !== "false",
3164
+ welcomeMessage: (_xb = (_wb = readString(env, "NEXT_PUBLIC_WELCOME_MESSAGE")) != null ? _wb : readString(env, "UI_WELCOME_MESSAGE")) != null ? _xb : "Hello! I'm your AI assistant. Ask me anything about your documents.",
3165
+ visualStyle: (_zb = (_yb = readString(env, "NEXT_PUBLIC_UI_VISUAL_STYLE")) != null ? _yb : readString(env, "UI_VISUAL_STYLE")) != null ? _zb : "glass",
3166
+ borderRadius: (_Bb = (_Ab = readString(env, "NEXT_PUBLIC_UI_BORDER_RADIUS")) != null ? _Ab : readString(env, "UI_BORDER_RADIUS")) != null ? _Bb : "xl",
3167
+ allowUpload: ((_Db = (_Cb = readString(env, "NEXT_PUBLIC_ALLOW_UPLOAD")) != null ? _Cb : readString(env, "UI_ALLOW_UPLOAD")) != null ? _Db : "false") === "true"
3168
3168
  },
3169
3169
  rag: {
3170
- topK: readNumber(env, "RAG_TOP_K", 5),
3170
+ topK: readNumber(env, "RAG_TOP_K", (_Eb = rt == null ? void 0 : rt.topK) != null ? _Eb : 5),
3171
3171
  scoreThreshold: readNumber(env, "RAG_SCORE_THRESHOLD", 0),
3172
- chunkSize: readNumber(env, "RAG_CHUNK_SIZE", 1e3),
3173
- chunkOverlap: readNumber(env, "RAG_CHUNK_OVERLAP", 200),
3174
- filterableFields: (_Cb = readString(env, "RAG_FILTERABLE_FIELDS")) == null ? void 0 : _Cb.split(",").map((f) => f.trim()),
3172
+ chunkSize: readNumber(env, "RAG_CHUNK_SIZE", (_Fb = rt == null ? void 0 : rt.chunkSize) != null ? _Fb : 1e3),
3173
+ chunkOverlap: readNumber(env, "RAG_CHUNK_OVERLAP", (_Gb = rt == null ? void 0 : rt.chunkOverlap) != null ? _Gb : 200),
3174
+ filterableFields: (_Hb = readString(env, "RAG_FILTERABLE_FIELDS")) == null ? void 0 : _Hb.split(",").map((f) => f.trim()),
3175
3175
  // Query pipeline toggles — read from .env.local
3176
3176
  useQueryTransformation: readString(env, "RAG_USE_QUERY_TRANSFORMATION") === "true",
3177
3177
  useReranking: readString(env, "RAG_USE_RERANKING") === "true",
3178
3178
  useGraphRetrieval: readString(env, "RAG_USE_GRAPH_RETRIEVAL") === "true",
3179
- architecture: (_Db = readString(env, "RAG_ARCHITECTURE")) != null ? _Db : "simple",
3180
- chunkingStrategy: (_Eb = readString(env, "RAG_CHUNKING_STRATEGY")) != null ? _Eb : "recursive",
3179
+ architecture: (_Ib = readString(env, "RAG_ARCHITECTURE")) != null ? _Ib : "simple",
3180
+ chunkingStrategy: (_Jb = readString(env, "RAG_CHUNKING_STRATEGY")) != null ? _Jb : "recursive",
3181
3181
  uiMapping: (() => {
3182
3182
  const raw = readString(env, "RAG_UI_MAPPING");
3183
3183
  if (!raw) return void 0;
@@ -3190,7 +3190,7 @@ function getEnvConfig(env = process.env, base) {
3190
3190
  },
3191
3191
  telemetry: {
3192
3192
  enabled: telemetryEnabled,
3193
- url: (_Ib = (_Hb = (_Fb = readString(env, "TELEMETRY_URL")) != null ? _Fb : readString(env, "NEXT_PUBLIC_TELEMETRY_URL")) != null ? _Hb : (_Gb = base == null ? void 0 : base.telemetry) == null ? void 0 : _Gb.url) != null ? _Ib : "https://www.retrivora.com/api/telemetry"
3193
+ url: (_Nb = (_Mb = (_Kb = readString(env, "TELEMETRY_URL")) != null ? _Kb : readString(env, "NEXT_PUBLIC_TELEMETRY_URL")) != null ? _Mb : (_Lb = base == null ? void 0 : base.telemetry) == null ? void 0 : _Lb.url) != null ? _Nb : "https://www.retrivora.com/api/telemetry"
3194
3194
  }
3195
3195
  }, readString(env, "GRAPH_DB_PROVIDER") ? {
3196
3196
  graphDb: {
@@ -11883,7 +11883,7 @@ function createRagHandler(configOrPlugin, options) {
11883
11883
  }
11884
11884
  }
11885
11885
  async function getSegment(req, context) {
11886
- var _a3, _b;
11886
+ var _a3, _b, _c;
11887
11887
  const contentType = req.headers.get("content-type") || "";
11888
11888
  if (contentType.includes("multipart/form-data")) {
11889
11889
  return "upload";
@@ -11898,10 +11898,12 @@ function createRagHandler(configOrPlugin, options) {
11898
11898
  if (pathname.endsWith("/suggestions")) return "suggestions";
11899
11899
  if (pathname.endsWith("/feedback")) return "feedback";
11900
11900
  if (pathname.endsWith("/history")) return "history";
11901
+ if (pathname.endsWith("/history/clear")) return "history/clear";
11902
+ if (pathname.endsWith("/sessions")) return "sessions";
11901
11903
  } catch (e) {
11902
11904
  }
11903
11905
  const resolvedParams = typeof ((_a3 = context == null ? void 0 : context.params) == null ? void 0 : _a3.then) === "function" ? await context.params : context == null ? void 0 : context.params;
11904
- const segments = (resolvedParams == null ? void 0 : resolvedParams.retrivora) || ((_b = resolvedParams == null ? void 0 : resolvedParams.params) == null ? void 0 : _b.retrivora) || [];
11906
+ const segments = (resolvedParams == null ? void 0 : resolvedParams.retrivora) || ((_b = resolvedParams == null ? void 0 : resolvedParams.params) == null ? void 0 : _b.retrivora) || (resolvedParams == null ? void 0 : resolvedParams.rag) || ((_c = resolvedParams == null ? void 0 : resolvedParams.params) == null ? void 0 : _c.rag) || [];
11905
11907
  const joined = segments.join("/");
11906
11908
  return joined || "chat";
11907
11909
  }
@@ -1,5 +1,5 @@
1
1
  import { NextRequest } from 'next/server';
2
- import { n as RagConfig, I as ILLMProvider, C as ChatMessage, c as ChatResponse, f as IngestDocument } from './ILLMProvider-B8TAVx3j.mjs';
2
+ import { n as RagConfig, I as ILLMProvider, C as ChatMessage, c as ChatResponse, f as IngestDocument } from './ILLMProvider-Y6aL5N8J.mjs';
3
3
 
4
4
  interface ValidationError {
5
5
  field: string;
@@ -1,5 +1,5 @@
1
1
  import { NextRequest } from 'next/server';
2
- import { n as RagConfig, I as ILLMProvider, C as ChatMessage, c as ChatResponse, f as IngestDocument } from './ILLMProvider-B8TAVx3j.js';
2
+ import { n as RagConfig, I as ILLMProvider, C as ChatMessage, c as ChatResponse, f as IngestDocument } from './ILLMProvider-Y6aL5N8J.js';
3
3
 
4
4
  interface ValidationError {
5
5
  field: string;
package/dist/index.css CHANGED
@@ -111,6 +111,9 @@
111
111
  --color-slate-900: oklch(20.8% 0.042 265.755);
112
112
  --color-slate-950: oklch(12.9% 0.042 264.695);
113
113
  --color-gray-500: oklch(55.1% 0.027 264.364);
114
+ --color-zinc-500: oklch(55.2% 0.016 285.938);
115
+ --color-zinc-800: oklch(27.4% 0.006 286.033);
116
+ --color-zinc-900: oklch(21% 0.006 285.885);
114
117
  --color-black: #000;
115
118
  --color-white: #fff;
116
119
  --spacing: 0.25rem;
@@ -135,10 +138,12 @@
135
138
  --font-weight-semibold: 600;
136
139
  --font-weight-bold: 700;
137
140
  --font-weight-extrabold: 800;
141
+ --font-weight-black: 900;
138
142
  --tracking-tight: -0.025em;
139
143
  --tracking-wider: 0.05em;
140
144
  --tracking-widest: 0.1em;
141
145
  --leading-tight: 1.25;
146
+ --leading-snug: 1.375;
142
147
  --leading-relaxed: 1.625;
143
148
  --radius-sm: 0.25rem;
144
149
  --radius-md: 0.375rem;
@@ -445,6 +450,9 @@
445
450
  .mx-1 {
446
451
  margin-inline: calc(var(--spacing) * 1);
447
452
  }
453
+ .mx-4 {
454
+ margin-inline: calc(var(--spacing) * 4);
455
+ }
448
456
  .mx-auto {
449
457
  margin-inline: auto;
450
458
  }
@@ -739,6 +747,9 @@
739
747
  .w-44 {
740
748
  width: calc(var(--spacing) * 44);
741
749
  }
750
+ .w-64 {
751
+ width: calc(var(--spacing) * 64);
752
+ }
742
753
  .w-\[400\%\] {
743
754
  width: 400%;
744
755
  }
@@ -1244,6 +1255,9 @@
1244
1255
  .bg-\[\#080818\] {
1245
1256
  background-color: #080818;
1246
1257
  }
1258
+ .bg-\[var\(--primary\)\] {
1259
+ background-color: var(--primary);
1260
+ }
1247
1261
  .bg-amber-50 {
1248
1262
  background-color: var(--color-amber-50);
1249
1263
  }
@@ -1403,6 +1417,12 @@
1403
1417
  .bg-slate-200 {
1404
1418
  background-color: var(--color-slate-200);
1405
1419
  }
1420
+ .bg-slate-200\/70 {
1421
+ background-color: color-mix(in srgb, oklch(92.9% 0.013 255.508) 70%, transparent);
1422
+ @supports (color: color-mix(in lab, red, red)) {
1423
+ background-color: color-mix(in oklab, var(--color-slate-200) 70%, transparent);
1424
+ }
1425
+ }
1406
1426
  .bg-slate-400 {
1407
1427
  background-color: var(--color-slate-400);
1408
1428
  }
@@ -1472,6 +1492,9 @@
1472
1492
  --tw-gradient-to: var(--color-slate-200);
1473
1493
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1474
1494
  }
1495
+ .stroke-\[2\.5\] {
1496
+ stroke-width: 2.5;
1497
+ }
1475
1498
  .object-cover {
1476
1499
  object-fit: cover;
1477
1500
  }
@@ -1550,6 +1573,9 @@
1550
1573
  .py-4 {
1551
1574
  padding-block: calc(var(--spacing) * 4);
1552
1575
  }
1576
+ .py-8 {
1577
+ padding-block: calc(var(--spacing) * 8);
1578
+ }
1553
1579
  .pt-1 {
1554
1580
  padding-top: calc(var(--spacing) * 1);
1555
1581
  }
@@ -1559,6 +1585,9 @@
1559
1585
  .pr-1 {
1560
1586
  padding-right: calc(var(--spacing) * 1);
1561
1587
  }
1588
+ .pr-6 {
1589
+ padding-right: calc(var(--spacing) * 6);
1590
+ }
1562
1591
  .pb-3 {
1563
1592
  padding-bottom: calc(var(--spacing) * 3);
1564
1593
  }
@@ -1623,10 +1652,18 @@
1623
1652
  --tw-leading: var(--leading-relaxed);
1624
1653
  line-height: var(--leading-relaxed);
1625
1654
  }
1655
+ .leading-snug {
1656
+ --tw-leading: var(--leading-snug);
1657
+ line-height: var(--leading-snug);
1658
+ }
1626
1659
  .leading-tight {
1627
1660
  --tw-leading: var(--leading-tight);
1628
1661
  line-height: var(--leading-tight);
1629
1662
  }
1663
+ .font-black {
1664
+ --tw-font-weight: var(--font-weight-black);
1665
+ font-weight: var(--font-weight-black);
1666
+ }
1630
1667
  .font-bold {
1631
1668
  --tw-font-weight: var(--font-weight-bold);
1632
1669
  font-weight: var(--font-weight-bold);
@@ -2219,6 +2256,16 @@
2219
2256
  }
2220
2257
  }
2221
2258
  }
2259
+ .hover\:bg-slate-200\/30 {
2260
+ &:hover {
2261
+ @media (hover: hover) {
2262
+ background-color: color-mix(in srgb, oklch(92.9% 0.013 255.508) 30%, transparent);
2263
+ @supports (color: color-mix(in lab, red, red)) {
2264
+ background-color: color-mix(in oklab, var(--color-slate-200) 30%, transparent);
2265
+ }
2266
+ }
2267
+ }
2268
+ }
2222
2269
  .hover\:bg-slate-800 {
2223
2270
  &:hover {
2224
2271
  @media (hover: hover) {
@@ -2292,6 +2339,13 @@
2292
2339
  }
2293
2340
  }
2294
2341
  }
2342
+ .hover\:text-slate-800 {
2343
+ &:hover {
2344
+ @media (hover: hover) {
2345
+ color: var(--color-slate-800);
2346
+ }
2347
+ }
2348
+ }
2295
2349
  .hover\:text-slate-900 {
2296
2350
  &:hover {
2297
2351
  @media (hover: hover) {
@@ -2612,6 +2666,11 @@
2612
2666
  }
2613
2667
  }
2614
2668
  }
2669
+ .dark\:border-zinc-800 {
2670
+ @media (prefers-color-scheme: dark) {
2671
+ border-color: var(--color-zinc-800);
2672
+ }
2673
+ }
2615
2674
  .dark\:bg-\[\#0f0f1a\] {
2616
2675
  @media (prefers-color-scheme: dark) {
2617
2676
  background-color: #0f0f1a;
@@ -2632,6 +2691,11 @@
2632
2691
  background-color: #080811;
2633
2692
  }
2634
2693
  }
2694
+ .dark\:bg-\[\#131322\] {
2695
+ @media (prefers-color-scheme: dark) {
2696
+ background-color: #131322;
2697
+ }
2698
+ }
2635
2699
  .dark\:bg-amber-400\/10 {
2636
2700
  @media (prefers-color-scheme: dark) {
2637
2701
  background-color: color-mix(in srgb, oklch(82.8% 0.189 84.429) 10%, transparent);
@@ -3067,6 +3131,11 @@
3067
3131
  }
3068
3132
  }
3069
3133
  }
3134
+ .dark\:bg-zinc-900 {
3135
+ @media (prefers-color-scheme: dark) {
3136
+ background-color: var(--color-zinc-900);
3137
+ }
3138
+ }
3070
3139
  .dark\:from-white\/10 {
3071
3140
  @media (prefers-color-scheme: dark) {
3072
3141
  --tw-gradient-from: color-mix(in srgb, #fff 10%, transparent);
@@ -3323,6 +3392,11 @@
3323
3392
  }
3324
3393
  }
3325
3394
  }
3395
+ .dark\:text-zinc-500 {
3396
+ @media (prefers-color-scheme: dark) {
3397
+ color: var(--color-zinc-500);
3398
+ }
3399
+ }
3326
3400
  .dark\:placeholder-white\/30 {
3327
3401
  @media (prefers-color-scheme: dark) {
3328
3402
  &::placeholder {
@@ -3516,6 +3590,15 @@
3516
3590
  }
3517
3591
  }
3518
3592
  }
3593
+ .dark\:hover\:text-slate-200 {
3594
+ @media (prefers-color-scheme: dark) {
3595
+ &:hover {
3596
+ @media (hover: hover) {
3597
+ color: var(--color-slate-200);
3598
+ }
3599
+ }
3600
+ }
3601
+ }
3519
3602
  .dark\:hover\:text-white {
3520
3603
  @media (prefers-color-scheme: dark) {
3521
3604
  &:hover {
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, R as RemoteConfig } from './BatchProcessor-BhLczWj5.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 LicenseTierConfig, o as LicenseValidationError, p as LicenseValidationRequest, q as LicenseValidationResponse, r as LicenseValidator, s as ProviderCredentials, t as ProviderNotFoundException, u as RateLimitException, v as RemoteEmbeddingConfig, w as RemoteLLMConfig, x as RemoteVectorConfig, y as RenderDecision, z as RenderType, F as RetrievalException, G as Retrivora, H as RetrivoraError, J as RetrivoraErrorCode, K as SDKVersionUnsupportedError, N as SDK_VERSION, O as isTransientError } from './BatchProcessor-BhLczWj5.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';
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-zbQMaZHm.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 LicenseTierConfig, o as LicenseValidationError, p as LicenseValidationRequest, q as LicenseValidationResponse, r as LicenseValidator, s as ProviderCredentials, t as ProviderNotFoundException, u as RateLimitException, v as RemoteEmbeddingConfig, w as RemoteLLMConfig, x as RemoteVectorConfig, y as RenderDecision, z as RenderType, F as RetrievalException, G as Retrivora, H as RetrivoraError, J as RetrivoraErrorCode, K as SDKVersionUnsupportedError, N as SDK_VERSION, O as isTransientError } from './BatchProcessor-zbQMaZHm.mjs';
4
+ import { O as ObservabilityTrace, U as UseRagChatOptions, a as UseRagChatReturn, P as ProjectChatSettings } from './ILLMProvider-Y6aL5N8J.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-Y6aL5N8J.mjs';
6
6
  import 'react';
7
7
 
8
8
  /**
@@ -43,7 +43,7 @@ declare function ChatWidget({ position, onAddToCart, apiUrl, retrivoraApiBase, l
43
43
  * @param licenseKey - Override license key (highest priority; falls back to headers/env).
44
44
  * @param headers - Custom headers forwarded with every network request.
45
45
  */
46
- declare function ChatWindow({ className, style, onClose, showClose, onResizeStart, onResetResize, isResized, onMaximize, isMaximized, onAddToCart, apiUrl, retrivoraApiBase, licenseKey: licenseKeyProp, headers }: ChatWindowProps): react_jsx_runtime.JSX.Element;
46
+ declare function ChatWindow({ className, style, onClose, showClose, onResizeStart, onResetResize, isResized, onMaximize, isMaximized, onAddToCart, apiUrl, retrivoraApiBase, licenseKey: licenseKeyProp, headers, sessionId: sessionIdProp, showHistory, }: ChatWindowProps): react_jsx_runtime.JSX.Element;
47
47
 
48
48
  declare function DocumentUpload({ namespace, uploadUrl, retrivoraApiBase, onUploadComplete, className }: DocumentUploadProps): react_jsx_runtime.JSX.Element;
49
49
 
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, R as RemoteConfig } from './BatchProcessor-C42_RVWO.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 LicenseTierConfig, o as LicenseValidationError, p as LicenseValidationRequest, q as LicenseValidationResponse, r as LicenseValidator, s as ProviderCredentials, t as ProviderNotFoundException, u as RateLimitException, v as RemoteEmbeddingConfig, w as RemoteLLMConfig, x as RemoteVectorConfig, y as RenderDecision, z as RenderType, F as RetrievalException, G as Retrivora, H as RetrivoraError, J as RetrivoraErrorCode, K as SDKVersionUnsupportedError, N as SDK_VERSION, O as isTransientError } from './BatchProcessor-C42_RVWO.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';
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-D42E706a.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 LicenseTierConfig, o as LicenseValidationError, p as LicenseValidationRequest, q as LicenseValidationResponse, r as LicenseValidator, s as ProviderCredentials, t as ProviderNotFoundException, u as RateLimitException, v as RemoteEmbeddingConfig, w as RemoteLLMConfig, x as RemoteVectorConfig, y as RenderDecision, z as RenderType, F as RetrievalException, G as Retrivora, H as RetrivoraError, J as RetrivoraErrorCode, K as SDKVersionUnsupportedError, N as SDK_VERSION, O as isTransientError } from './BatchProcessor-D42E706a.js';
4
+ import { O as ObservabilityTrace, U as UseRagChatOptions, a as UseRagChatReturn, P as ProjectChatSettings } from './ILLMProvider-Y6aL5N8J.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-Y6aL5N8J.js';
6
6
  import 'react';
7
7
 
8
8
  /**
@@ -43,7 +43,7 @@ declare function ChatWidget({ position, onAddToCart, apiUrl, retrivoraApiBase, l
43
43
  * @param licenseKey - Override license key (highest priority; falls back to headers/env).
44
44
  * @param headers - Custom headers forwarded with every network request.
45
45
  */
46
- declare function ChatWindow({ className, style, onClose, showClose, onResizeStart, onResetResize, isResized, onMaximize, isMaximized, onAddToCart, apiUrl, retrivoraApiBase, licenseKey: licenseKeyProp, headers }: ChatWindowProps): react_jsx_runtime.JSX.Element;
46
+ declare function ChatWindow({ className, style, onClose, showClose, onResizeStart, onResetResize, isResized, onMaximize, isMaximized, onAddToCart, apiUrl, retrivoraApiBase, licenseKey: licenseKeyProp, headers, sessionId: sessionIdProp, showHistory, }: ChatWindowProps): react_jsx_runtime.JSX.Element;
47
47
 
48
48
  declare function DocumentUpload({ namespace, uploadUrl, retrivoraApiBase, onUploadComplete, className }: DocumentUploadProps): react_jsx_runtime.JSX.Element;
49
49