@retrivora-ai/rag-engine 2.3.8 → 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.
@@ -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.8",
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",
@@ -497,6 +497,7 @@ var init_ConfigFetcher = __esm({
497
497
  for (const baseUrl of controlPlaneUrls) {
498
498
  try {
499
499
  const url = `${baseUrl}/api/v1/config?projectId=${encodeURIComponent(projectId)}`;
500
+ console.log(`[ConfigFetcher] Fetching config from: ${url}`);
500
501
  const res = await fetch(url, {
501
502
  method: "GET",
502
503
  headers: __spreadValues({
@@ -504,6 +505,10 @@ var init_ConfigFetcher = __esm({
504
505
  "x-sdk-version": SDK_VERSION
505
506
  }, licenseKey ? { "x-license-key": licenseKey } : {})
506
507
  });
508
+ console.log(`[ConfigFetcher] Response status: ${res.status}`);
509
+ if (!res.ok) {
510
+ console.warn(`[ConfigFetcher] Error text: ${await res.text()}`);
511
+ }
507
512
  if (res.ok) {
508
513
  const data = await res.json();
509
514
  if ((data == null ? void 0 : data.success) && (data == null ? void 0 : data.vectorDb)) {
@@ -2992,7 +2997,7 @@ function readEnum(env, name, fallback, allowed) {
2992
2997
  throw new Error(`[getRagConfig] ${name} must be one of: ${allowed.join(", ")}`);
2993
2998
  }
2994
2999
  function getEnvConfig(env = process.env, base) {
2995
- 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;
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;
2996
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;
2997
3002
  const jwtProjectId = (() => {
2998
3003
  if (!licenseKey) return void 0;
@@ -3085,14 +3090,15 @@ function getEnvConfig(env = process.env, base) {
3085
3090
  })();
3086
3091
  const tierBasedLLMModel = isFreeTier2 ? "llama-3.1-8b-instant" : "llama-3.3-70b-versatile";
3087
3092
  const tierBasedEmbeddingModel = isFreeTier2 ? "text-embedding-004" : "text-embedding-004";
3088
- const defaultGatewayUrl = "https://llm.retrivora.com/api/v1";
3093
+ const controlPlaneUrl = (_qa = readString(env, "RETRIVORA_CONTROL_PLANE_URL")) != null ? _qa : readString(env, "NEXT_PUBLIC_RETRIVORA_CONTROL_PLANE_URL");
3094
+ const defaultGatewayUrl = controlPlaneUrl ? `${controlPlaneUrl.replace(/\/$/, "")}/api/v1` : "https://llm.retrivora.com/api/v1";
3089
3095
  const rt = _runtimeConfig;
3090
3096
  const defaultLlmProvider = "universal_rest";
3091
- const llmProvider = (_sa = (_ra = readEnum(env, "LLM_PROVIDER", defaultLlmProvider, LLM_PROVIDERS)) != null ? _ra : (_qa = base == null ? void 0 : base.llm) == null ? void 0 : _qa.provider) != null ? _sa : defaultLlmProvider;
3092
- const llmBaseUrl = (_xa = (_wa = (_va = (_ta = readString(env, "LITELLM_BASE_URL")) != null ? _ta : readString(env, "LLM_BASE_URL")) != null ? _va : (_ua = base == null ? void 0 : base.llm) == null ? void 0 : _ua.baseUrl) != null ? _wa : rt == null ? void 0 : rt.llmBaseUrl) != null ? _xa : defaultGatewayUrl;
3093
- const llmModel = (_Ba = (_Aa = (_za = readString(env, "LLM_MODEL")) != null ? _za : (_ya = base == null ? void 0 : base.llm) == null ? void 0 : _ya.model) != null ? _Aa : rt == null ? void 0 : rt.llmModel) != null ? _Ba : tierBasedLLMModel;
3094
- const llmApiKey = (_Fa = (_Ea = (_Ca = readString(env, "LITELLM_MASTER_KEY")) != null ? _Ca : rt == null ? void 0 : rt.litellmApiKey) != null ? _Ea : (_Da = base == null ? void 0 : base.llm) == null ? void 0 : _Da.apiKey) != null ? _Fa : licenseKey;
3095
- const llmProfile = (_Ja = (_Ia = readString(env, "LLM_UNIVERSAL_PROFILE")) != null ? _Ia : (_Ha = (_Ga = base == null ? void 0 : base.llm) == null ? void 0 : _Ga.options) == null ? void 0 : _Ha.profile) != null ? _Ja : "litellm";
3097
+ const llmProvider = (_ta = (_sa = readEnum(env, "LLM_PROVIDER", defaultLlmProvider, LLM_PROVIDERS)) != null ? _sa : (_ra = base == null ? void 0 : base.llm) == null ? void 0 : _ra.provider) != null ? _ta : defaultLlmProvider;
3098
+ const llmBaseUrl = (_ya = (_xa = (_wa = (_ua = readString(env, "LITELLM_BASE_URL")) != null ? _ua : readString(env, "LLM_BASE_URL")) != null ? _wa : (_va = base == null ? void 0 : base.llm) == null ? void 0 : _va.baseUrl) != null ? _xa : rt == null ? void 0 : rt.llmBaseUrl) != null ? _ya : defaultGatewayUrl;
3099
+ const llmModel = (_Ca = (_Ba = (_Aa = readString(env, "LLM_MODEL")) != null ? _Aa : (_za = base == null ? void 0 : base.llm) == null ? void 0 : _za.model) != null ? _Ba : rt == null ? void 0 : rt.llmModel) != null ? _Ca : tierBasedLLMModel;
3100
+ const llmApiKey = (_Ga = (_Fa = (_Da = readString(env, "LITELLM_MASTER_KEY")) != null ? _Da : rt == null ? void 0 : rt.litellmApiKey) != null ? _Fa : (_Ea = base == null ? void 0 : base.llm) == null ? void 0 : _Ea.apiKey) != null ? _Ga : licenseKey;
3101
+ const llmProfile = (_Ka = (_Ja = readString(env, "LLM_UNIVERSAL_PROFILE")) != null ? _Ja : (_Ia = (_Ha = base == null ? void 0 : base.llm) == null ? void 0 : _Ha.options) == null ? void 0 : _Ia.profile) != null ? _Ka : "litellm";
3096
3102
  console.log("[serverConfig] \u{1F527} LLM Configuration:", {
3097
3103
  baseUrl: llmBaseUrl,
3098
3104
  model: llmModel,
@@ -3101,17 +3107,24 @@ function getEnvConfig(env = process.env, base) {
3101
3107
  source: (rt == null ? void 0 : rt.llmModel) ? "runtime-injected" : "env/fallback"
3102
3108
  });
3103
3109
  const defaultEmbeddingProvider = "universal_rest";
3104
- const embeddingProvider = (_Ma = (_La = readEnum(env, "EMBEDDING_PROVIDER", defaultEmbeddingProvider, EMBEDDING_PROVIDERS)) != null ? _La : (_Ka = base == null ? void 0 : base.embedding) == null ? void 0 : _Ka.provider) != null ? _Ma : defaultEmbeddingProvider;
3105
- const embeddingBaseUrl = (_Ta = (_Sa = (_Ra = (_Qa = (_Oa = (_Na = readString(env, "LITELLM_BASE_URL")) != null ? _Na : readString(env, "EMBEDDING_BASE_URL")) != null ? _Oa : readString(env, "LLM_BASE_URL")) != null ? _Qa : (_Pa = base == null ? void 0 : base.embedding) == null ? void 0 : _Pa.baseUrl) != null ? _Ra : rt == null ? void 0 : rt.embeddingBaseUrl) != null ? _Sa : rt == null ? void 0 : rt.llmBaseUrl) != null ? _Ta : defaultGatewayUrl;
3106
- const embeddingModel = (_Xa = (_Wa = (_Va = readString(env, "EMBEDDING_MODEL")) != null ? _Va : (_Ua = base == null ? void 0 : base.embedding) == null ? void 0 : _Ua.model) != null ? _Wa : rt == null ? void 0 : rt.embeddingModel) != null ? _Xa : tierBasedEmbeddingModel;
3107
- const embeddingApiKey = (_$a = (__a = (_Ya = readString(env, "LITELLM_MASTER_KEY")) != null ? _Ya : rt == null ? void 0 : rt.litellmApiKey) != null ? __a : (_Za = base == null ? void 0 : base.embedding) == null ? void 0 : _Za.apiKey) != null ? _$a : licenseKey;
3108
- const embeddingProfile = (_db = (_cb = readString(env, "EMBEDDING_UNIVERSAL_PROFILE")) != null ? _cb : (_bb = (_ab = base == null ? void 0 : base.embedding) == null ? void 0 : _ab.options) == null ? void 0 : _bb.profile) != null ? _db : "litellm";
3110
+ const embeddingProvider = (_Na = (_Ma = readEnum(env, "EMBEDDING_PROVIDER", defaultEmbeddingProvider, EMBEDDING_PROVIDERS)) != null ? _Ma : (_La = base == null ? void 0 : base.embedding) == null ? void 0 : _La.provider) != null ? _Na : defaultEmbeddingProvider;
3111
+ const embeddingBaseUrl = (_Ua = (_Ta = (_Sa = (_Ra = (_Pa = (_Oa = readString(env, "LITELLM_BASE_URL")) != null ? _Oa : readString(env, "EMBEDDING_BASE_URL")) != null ? _Pa : readString(env, "LLM_BASE_URL")) != null ? _Ra : (_Qa = base == null ? void 0 : base.embedding) == null ? void 0 : _Qa.baseUrl) != null ? _Sa : rt == null ? void 0 : rt.embeddingBaseUrl) != null ? _Ta : rt == null ? void 0 : rt.llmBaseUrl) != null ? _Ua : defaultGatewayUrl;
3112
+ const embeddingModel = (_Ya = (_Xa = (_Wa = readString(env, "EMBEDDING_MODEL")) != null ? _Wa : (_Va = base == null ? void 0 : base.embedding) == null ? void 0 : _Va.model) != null ? _Xa : rt == null ? void 0 : rt.embeddingModel) != null ? _Ya : tierBasedEmbeddingModel;
3113
+ const embeddingApiKey = (_ab = (_$a = (_Za = readString(env, "LITELLM_MASTER_KEY")) != null ? _Za : rt == null ? void 0 : rt.litellmApiKey) != null ? _$a : (__a = base == null ? void 0 : base.embedding) == null ? void 0 : __a.apiKey) != null ? _ab : licenseKey;
3114
+ const embeddingProfile = (_eb = (_db = readString(env, "EMBEDDING_UNIVERSAL_PROFILE")) != null ? _db : (_cb = (_bb = base == null ? void 0 : base.embedding) == null ? void 0 : _bb.options) == null ? void 0 : _cb.profile) != null ? _eb : "litellm";
3115
+ console.log("[serverConfig] \u{1F527} Embedding Configuration:", {
3116
+ baseUrl: embeddingBaseUrl,
3117
+ model: embeddingModel,
3118
+ provider: embeddingProvider,
3119
+ hasApiKey: !!embeddingApiKey,
3120
+ source: (rt == null ? void 0 : rt.embeddingModel) ? "runtime-injected" : "env/fallback"
3121
+ });
3109
3122
  return __spreadProps(__spreadValues({
3110
3123
  projectId,
3111
3124
  licenseKey,
3112
3125
  vectorDb: {
3113
3126
  provider: vectorProvider,
3114
- indexName: (_fb = (_eb = readString(env, "VECTOR_DB_INDEX")) != null ? _eb : vectorDbOptions.indexName) != null ? _fb : "rag-index",
3127
+ indexName: (_gb = (_fb = readString(env, "VECTOR_DB_INDEX")) != null ? _fb : vectorDbOptions.indexName) != null ? _gb : "rag-index",
3115
3128
  options: vectorDbOptions
3116
3129
  },
3117
3130
  llm: {
@@ -3119,8 +3132,8 @@ function getEnvConfig(env = process.env, base) {
3119
3132
  model: llmModel,
3120
3133
  apiKey: llmApiKey,
3121
3134
  baseUrl: llmBaseUrl,
3122
- systemPrompt: readString(env, "LLM_SYSTEM_PROMPT"),
3123
- 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),
3124
3137
  temperature: readNumber(env, "LLM_TEMPERATURE", 0.7),
3125
3138
  options: {
3126
3139
  profile: llmProfile,
@@ -3141,30 +3154,30 @@ function getEnvConfig(env = process.env, base) {
3141
3154
  }
3142
3155
  },
3143
3156
  ui: {
3144
- title: (_hb = (_gb = readString(env, "NEXT_PUBLIC_UI_TITLE")) != null ? _gb : readString(env, "UI_TITLE")) != null ? _hb : "AI Assistant",
3145
- subtitle: (_jb = (_ib = readString(env, "NEXT_PUBLIC_UI_SUBTITLE")) != null ? _ib : readString(env, "UI_SUBTITLE")) != null ? _jb : "Powered by RAG",
3146
- primaryColor: (_lb = (_kb = readString(env, "NEXT_PUBLIC_PRIMARY_COLOR")) != null ? _kb : readString(env, "UI_PRIMARY_COLOR")) != null ? _lb : "#10b981",
3147
- accentColor: (_nb = (_mb = readString(env, "NEXT_PUBLIC_ACCENT_COLOR")) != null ? _mb : readString(env, "UI_ACCENT_COLOR")) != null ? _nb : "#3b82f6",
3148
- logoUrl: (_ob = readString(env, "NEXT_PUBLIC_LOGO_URL")) != null ? _ob : readString(env, "UI_LOGO_URL"),
3149
- placeholder: (_qb = (_pb = readString(env, "NEXT_PUBLIC_PLACEHOLDER")) != null ? _pb : readString(env, "UI_PLACEHOLDER")) != null ? _qb : "Ask me anything\u2026",
3150
- showSources: ((_sb = (_rb = readString(env, "NEXT_PUBLIC_SHOW_SOURCES")) != null ? _rb : readString(env, "UI_SHOW_SOURCES")) != null ? _sb : "true") !== "false",
3151
- welcomeMessage: (_ub = (_tb = readString(env, "NEXT_PUBLIC_WELCOME_MESSAGE")) != null ? _tb : readString(env, "UI_WELCOME_MESSAGE")) != null ? _ub : "Hello! I'm your AI assistant. Ask me anything about your documents.",
3152
- visualStyle: (_wb = (_vb = readString(env, "NEXT_PUBLIC_UI_VISUAL_STYLE")) != null ? _vb : readString(env, "UI_VISUAL_STYLE")) != null ? _wb : "glass",
3153
- borderRadius: (_yb = (_xb = readString(env, "NEXT_PUBLIC_UI_BORDER_RADIUS")) != null ? _xb : readString(env, "UI_BORDER_RADIUS")) != null ? _yb : "xl",
3154
- allowUpload: ((_Ab = (_zb = readString(env, "NEXT_PUBLIC_ALLOW_UPLOAD")) != null ? _zb : readString(env, "UI_ALLOW_UPLOAD")) != null ? _Ab : "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"
3155
3168
  },
3156
3169
  rag: {
3157
- topK: readNumber(env, "RAG_TOP_K", 5),
3170
+ topK: readNumber(env, "RAG_TOP_K", (_Eb = rt == null ? void 0 : rt.topK) != null ? _Eb : 5),
3158
3171
  scoreThreshold: readNumber(env, "RAG_SCORE_THRESHOLD", 0),
3159
- chunkSize: readNumber(env, "RAG_CHUNK_SIZE", 1e3),
3160
- chunkOverlap: readNumber(env, "RAG_CHUNK_OVERLAP", 200),
3161
- filterableFields: (_Bb = readString(env, "RAG_FILTERABLE_FIELDS")) == null ? void 0 : _Bb.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()),
3162
3175
  // Query pipeline toggles — read from .env.local
3163
3176
  useQueryTransformation: readString(env, "RAG_USE_QUERY_TRANSFORMATION") === "true",
3164
3177
  useReranking: readString(env, "RAG_USE_RERANKING") === "true",
3165
3178
  useGraphRetrieval: readString(env, "RAG_USE_GRAPH_RETRIEVAL") === "true",
3166
- architecture: (_Cb = readString(env, "RAG_ARCHITECTURE")) != null ? _Cb : "simple",
3167
- chunkingStrategy: (_Db = readString(env, "RAG_CHUNKING_STRATEGY")) != null ? _Db : "recursive",
3179
+ architecture: (_Ib = readString(env, "RAG_ARCHITECTURE")) != null ? _Ib : "simple",
3180
+ chunkingStrategy: (_Jb = readString(env, "RAG_CHUNKING_STRATEGY")) != null ? _Jb : "recursive",
3168
3181
  uiMapping: (() => {
3169
3182
  const raw = readString(env, "RAG_UI_MAPPING");
3170
3183
  if (!raw) return void 0;
@@ -3177,7 +3190,7 @@ function getEnvConfig(env = process.env, base) {
3177
3190
  },
3178
3191
  telemetry: {
3179
3192
  enabled: telemetryEnabled,
3180
- url: (_Hb = (_Gb = (_Eb = readString(env, "TELEMETRY_URL")) != null ? _Eb : readString(env, "NEXT_PUBLIC_TELEMETRY_URL")) != null ? _Gb : (_Fb = base == null ? void 0 : base.telemetry) == null ? void 0 : _Fb.url) != null ? _Hb : "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"
3181
3194
  }
3182
3195
  }, readString(env, "GRAPH_DB_PROVIDER") ? {
3183
3196
  graphDb: {
@@ -4488,6 +4501,12 @@ var UniversalLLMAdapter = class {
4488
4501
  this.resolvedHeaders = __spreadValues(__spreadValues({
4489
4502
  "Content-Type": "application/json"
4490
4503
  }, config.apiKey ? { Authorization: `Bearer ${config.apiKey}` } : {}), this.opts.headers || {});
4504
+ console.log("[UniversalLLMAdapter] Initialized with:", {
4505
+ model: this.model,
4506
+ baseUrl: this.baseUrl,
4507
+ hasApiKey: !!this.apiKey,
4508
+ apiKeyPrefix: this.apiKey ? `${this.apiKey.slice(0, 12)}...` : void 0
4509
+ });
4491
4510
  this.http = axios2.create({
4492
4511
  baseURL: this.baseUrl,
4493
4512
  headers: this.resolvedHeaders,
@@ -4700,14 +4719,21 @@ ${context != null ? context : "None"}` },
4700
4719
  });
4701
4720
  }
4702
4721
  async embed(text) {
4703
- var _a3, _b, _c, _d, _e, _f, _g2;
4722
+ var _a3, _b, _c, _d, _e, _f, _g2, _h;
4704
4723
  const path2 = (_a3 = this.opts.embedPath) != null ? _a3 : "/embeddings";
4705
4724
  const payload = this.opts.embedPayloadTemplate ? buildPayload(this.opts.embedPayloadTemplate, { input: text, model: this.model }) : { input: text, model: this.model };
4706
4725
  try {
4726
+ console.log(`[UniversalLLMAdapter] Posting to embedding endpoint: ${this.baseUrl}${path2}`, {
4727
+ model: this.model,
4728
+ inputLength: typeof text === "string" ? text.length : "unknown"
4729
+ });
4707
4730
  const { data } = await this.http.post(path2, payload);
4708
4731
  const extractPath = (_b = this.opts.embedExtractPath) != null ? _b : "data[0].embedding";
4709
4732
  const vector = resolvePath(data, extractPath);
4710
- if (Array.isArray(vector)) return vector;
4733
+ if (Array.isArray(vector)) {
4734
+ console.log(`[UniversalLLMAdapter] Embedding HTTP request successful. Vector size: ${vector.length}`);
4735
+ return vector;
4736
+ }
4711
4737
  console.warn(
4712
4738
  `[UniversalLLMAdapter] Embedding API returned unexpected format for path '${extractPath}'. Response:`,
4713
4739
  data
@@ -4715,14 +4741,14 @@ ${context != null ? context : "None"}` },
4715
4741
  } catch (err) {
4716
4742
  console.warn(
4717
4743
  `[UniversalLLMAdapter] HTTP embedding request failed: ${(err == null ? void 0 : err.message) || err}`,
4718
- { path: path2, model: this.model }
4744
+ { path: path2, model: this.model, response: (_c = err == null ? void 0 : err.response) == null ? void 0 : _c.data }
4719
4745
  );
4720
4746
  const _g3 = globalThis;
4721
4747
  const dispatchEmbed = _g3.__retrivoraDispatchEmbedding;
4722
4748
  if (typeof dispatchEmbed === "function") {
4723
4749
  try {
4724
4750
  const res = await dispatchEmbed({ input: text, model: this.model }, this.apiKey);
4725
- if ((_d = (_c = res == null ? void 0 : res.data) == null ? void 0 : _c[0]) == null ? void 0 : _d.embedding) {
4751
+ if ((_e = (_d = res == null ? void 0 : res.data) == null ? void 0 : _d[0]) == null ? void 0 : _e.embedding) {
4726
4752
  return res.data[0].embedding;
4727
4753
  }
4728
4754
  } catch (dispatchErr) {
@@ -4731,10 +4757,12 @@ ${context != null ? context : "None"}` },
4731
4757
  }
4732
4758
  }
4733
4759
  try {
4760
+ console.log(`[UniversalLLMAdapter] Retrying embedding request to: ${this.baseUrl}${path2}`);
4734
4761
  const { data } = await this.http.post(path2, payload);
4735
- const extractPath = (_e = this.opts.embedExtractPath) != null ? _e : "data[0].embedding";
4762
+ const extractPath = (_f = this.opts.embedExtractPath) != null ? _f : "data[0].embedding";
4736
4763
  const vector = resolvePath(data, extractPath);
4737
4764
  if (Array.isArray(vector)) {
4765
+ console.log(`[UniversalLLMAdapter] Retry embedding HTTP request successful. Vector size: ${vector.length}`);
4738
4766
  return vector;
4739
4767
  }
4740
4768
  console.error(
@@ -4747,7 +4775,7 @@ ${context != null ? context : "None"}` },
4747
4775
  } catch (err) {
4748
4776
  console.error(
4749
4777
  `[UniversalLLMAdapter] Both embedding attempts failed. Path: ${path2}, Model: ${this.model}`,
4750
- { error: err == null ? void 0 : err.message, statusCode: (_f = err == null ? void 0 : err.response) == null ? void 0 : _f.status, response: (_g2 = err == null ? void 0 : err.response) == null ? void 0 : _g2.data }
4778
+ { error: err == null ? void 0 : err.message, statusCode: (_g2 = err == null ? void 0 : err.response) == null ? void 0 : _g2.status, response: (_h = err == null ? void 0 : err.response) == null ? void 0 : _h.data }
4751
4779
  );
4752
4780
  throw new Error(
4753
4781
  `[UniversalLLMAdapter] Failed to generate embedding after 2 attempts: ${(err == null ? void 0 : err.message) || err}`
@@ -11477,6 +11505,7 @@ function createLicenseHandler(configOrPlugin, options) {
11477
11505
  const rawKey = req.headers.get("x-license-key") || (body == null ? void 0 : body.licenseKey) || ((_a3 = req.headers.get("authorization")) == null ? void 0 : _a3.replace(/^Bearer\s+/i, "")) || config.licenseKey || process.env.NEXT_PUBLIC_RETRIVORA_LICENSE_KEY || process.env.RETRIVORA_LICENSE_KEY || "";
11478
11506
  const licenseKey = (rawKey || "").trim().replace(/^["']|["']$/g, "").trim();
11479
11507
  const projectId = (body == null ? void 0 : body.projectId) || config.projectId || "";
11508
+ console.log(`[DEBUG] createLicenseHandler: projectId="${projectId}", body.projectId="${body == null ? void 0 : body.projectId}", config.projectId="${config.projectId}"`);
11480
11509
  const payload = await LicenseVerifier.verifyAsync(licenseKey, projectId);
11481
11510
  return NextResponse.json({
11482
11511
  valid: true,
@@ -11854,7 +11883,7 @@ function createRagHandler(configOrPlugin, options) {
11854
11883
  }
11855
11884
  }
11856
11885
  async function getSegment(req, context) {
11857
- var _a3, _b;
11886
+ var _a3, _b, _c;
11858
11887
  const contentType = req.headers.get("content-type") || "";
11859
11888
  if (contentType.includes("multipart/form-data")) {
11860
11889
  return "upload";
@@ -11869,10 +11898,12 @@ function createRagHandler(configOrPlugin, options) {
11869
11898
  if (pathname.endsWith("/suggestions")) return "suggestions";
11870
11899
  if (pathname.endsWith("/feedback")) return "feedback";
11871
11900
  if (pathname.endsWith("/history")) return "history";
11901
+ if (pathname.endsWith("/history/clear")) return "history/clear";
11902
+ if (pathname.endsWith("/sessions")) return "sessions";
11872
11903
  } catch (e) {
11873
11904
  }
11874
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;
11875
- 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) || [];
11876
11907
  const joined = segments.join("/");
11877
11908
  return joined || "chat";
11878
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) {
@@ -2360,11 +2414,6 @@
2360
2414
  cursor: not-allowed;
2361
2415
  }
2362
2416
  }
2363
- .disabled\:text-slate-400 {
2364
- &:disabled {
2365
- color: var(--color-slate-400);
2366
- }
2367
- }
2368
2417
  .disabled\:opacity-30 {
2369
2418
  &:disabled {
2370
2419
  opacity: 30%;
@@ -2617,6 +2666,11 @@
2617
2666
  }
2618
2667
  }
2619
2668
  }
2669
+ .dark\:border-zinc-800 {
2670
+ @media (prefers-color-scheme: dark) {
2671
+ border-color: var(--color-zinc-800);
2672
+ }
2673
+ }
2620
2674
  .dark\:bg-\[\#0f0f1a\] {
2621
2675
  @media (prefers-color-scheme: dark) {
2622
2676
  background-color: #0f0f1a;
@@ -2637,6 +2691,11 @@
2637
2691
  background-color: #080811;
2638
2692
  }
2639
2693
  }
2694
+ .dark\:bg-\[\#131322\] {
2695
+ @media (prefers-color-scheme: dark) {
2696
+ background-color: #131322;
2697
+ }
2698
+ }
2640
2699
  .dark\:bg-amber-400\/10 {
2641
2700
  @media (prefers-color-scheme: dark) {
2642
2701
  background-color: color-mix(in srgb, oklch(82.8% 0.189 84.429) 10%, transparent);
@@ -3072,6 +3131,11 @@
3072
3131
  }
3073
3132
  }
3074
3133
  }
3134
+ .dark\:bg-zinc-900 {
3135
+ @media (prefers-color-scheme: dark) {
3136
+ background-color: var(--color-zinc-900);
3137
+ }
3138
+ }
3075
3139
  .dark\:from-white\/10 {
3076
3140
  @media (prefers-color-scheme: dark) {
3077
3141
  --tw-gradient-from: color-mix(in srgb, #fff 10%, transparent);
@@ -3328,6 +3392,11 @@
3328
3392
  }
3329
3393
  }
3330
3394
  }
3395
+ .dark\:text-zinc-500 {
3396
+ @media (prefers-color-scheme: dark) {
3397
+ color: var(--color-zinc-500);
3398
+ }
3399
+ }
3331
3400
  .dark\:placeholder-white\/30 {
3332
3401
  @media (prefers-color-scheme: dark) {
3333
3402
  &::placeholder {
@@ -3521,6 +3590,15 @@
3521
3590
  }
3522
3591
  }
3523
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
+ }
3524
3602
  .dark\:hover\:text-white {
3525
3603
  @media (prefers-color-scheme: dark) {
3526
3604
  &:hover {
@@ -3578,16 +3656,6 @@
3578
3656
  }
3579
3657
  }
3580
3658
  }
3581
- .dark\:disabled\:text-white\/30 {
3582
- @media (prefers-color-scheme: dark) {
3583
- &:disabled {
3584
- color: color-mix(in srgb, #fff 30%, transparent);
3585
- @supports (color: color-mix(in lab, red, red)) {
3586
- color: color-mix(in oklab, var(--color-white) 30%, transparent);
3587
- }
3588
- }
3589
- }
3590
- }
3591
3659
  .dark\:disabled\:hover\:text-white\/40 {
3592
3660
  @media (prefers-color-scheme: dark) {
3593
3661
  &:disabled {
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