@retrivora-ai/rag-engine 1.3.5 → 1.3.7
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/{chunk-FQ7OYZLF.mjs → chunk-NVXFI7HX.mjs} +4 -0
- package/dist/handlers/index.js +4 -0
- package/dist/handlers/index.mjs +1 -1
- package/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/dist/server.js +4 -0
- package/dist/server.mjs +1 -1
- package/package.json +1 -1
- package/src/components/MessageBubble.tsx +6 -0
- package/src/core/LangChainAgent.ts +2 -0
- package/src/core/Pipeline.ts +2 -0
|
@@ -1705,6 +1705,8 @@ When presenting structured data, statistics, or comparisons, decide if it is bes
|
|
|
1705
1705
|
3. dataKeys MUST exactly match the property names in the data objects.
|
|
1706
1706
|
4. data objects MUST be FLAT (no nested objects or arrays).
|
|
1707
1707
|
5. DO NOT output naked JSON; it MUST be wrapped in \`\`\`chart ... \`\`\`.
|
|
1708
|
+
6. The UI HAS a built-in charting engine. NEVER provide Python, Plotly, or Matplotlib code.
|
|
1709
|
+
7. NEVER apologize or claim you cannot render charts. Simply use the \`\`\`chart\`\`\` block.
|
|
1708
1710
|
\`\`\`chart
|
|
1709
1711
|
{
|
|
1710
1712
|
"type": "bar" | "line" | "pie",
|
|
@@ -2268,6 +2270,8 @@ When presenting structured data, statistics, or comparisons, decide if it is bes
|
|
|
2268
2270
|
3. dataKeys MUST exactly match the property names in the data objects.
|
|
2269
2271
|
4. data objects MUST be FLAT (no nested objects or arrays).
|
|
2270
2272
|
5. DO NOT output naked JSON; it MUST be wrapped in \`\`\`chart ... \`\`\`.
|
|
2273
|
+
6. The UI HAS a built-in charting engine. NEVER provide Python, Plotly, or Matplotlib code.
|
|
2274
|
+
7. NEVER apologize or claim you cannot render charts. Simply use the \`\`\`chart\`\`\` block.
|
|
2271
2275
|
\`\`\`chart
|
|
2272
2276
|
{
|
|
2273
2277
|
"type": "bar" | "line" | "pie",
|
package/dist/handlers/index.js
CHANGED
|
@@ -3274,6 +3274,8 @@ When presenting structured data, statistics, or comparisons, decide if it is bes
|
|
|
3274
3274
|
3. dataKeys MUST exactly match the property names in the data objects.
|
|
3275
3275
|
4. data objects MUST be FLAT (no nested objects or arrays).
|
|
3276
3276
|
5. DO NOT output naked JSON; it MUST be wrapped in \`\`\`chart ... \`\`\`.
|
|
3277
|
+
6. The UI HAS a built-in charting engine. NEVER provide Python, Plotly, or Matplotlib code.
|
|
3278
|
+
7. NEVER apologize or claim you cannot render charts. Simply use the \`\`\`chart\`\`\` block.
|
|
3277
3279
|
\`\`\`chart
|
|
3278
3280
|
{
|
|
3279
3281
|
"type": "bar" | "line" | "pie",
|
|
@@ -3831,6 +3833,8 @@ When presenting structured data, statistics, or comparisons, decide if it is bes
|
|
|
3831
3833
|
3. dataKeys MUST exactly match the property names in the data objects.
|
|
3832
3834
|
4. data objects MUST be FLAT (no nested objects or arrays).
|
|
3833
3835
|
5. DO NOT output naked JSON; it MUST be wrapped in \`\`\`chart ... \`\`\`.
|
|
3836
|
+
6. The UI HAS a built-in charting engine. NEVER provide Python, Plotly, or Matplotlib code.
|
|
3837
|
+
7. NEVER apologize or claim you cannot render charts. Simply use the \`\`\`chart\`\`\` block.
|
|
3834
3838
|
\`\`\`chart
|
|
3835
3839
|
{
|
|
3836
3840
|
"type": "bar" | "line" | "pie",
|
package/dist/handlers/index.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -320,6 +320,10 @@ function DynamicChart({ config, primaryColor = "#6366f1", accentColor = "#8b5cf6
|
|
|
320
320
|
// src/components/MessageBubble.tsx
|
|
321
321
|
function sanitizeJson(raw) {
|
|
322
322
|
let s = raw.trim();
|
|
323
|
+
const firstOpener = s.search(/[\{\[]/);
|
|
324
|
+
if (firstOpener !== -1) {
|
|
325
|
+
s = s.substring(firstOpener);
|
|
326
|
+
}
|
|
323
327
|
s = s.replace(
|
|
324
328
|
/:\s*(-?\d+(?:\.\d+)?)\s*([+\-*/])\s*(-?\d+(?:\.\d+)?)/g,
|
|
325
329
|
(_, a, op, b) => {
|
package/dist/index.mjs
CHANGED
|
@@ -283,6 +283,10 @@ function DynamicChart({ config, primaryColor = "#6366f1", accentColor = "#8b5cf6
|
|
|
283
283
|
// src/components/MessageBubble.tsx
|
|
284
284
|
function sanitizeJson(raw) {
|
|
285
285
|
let s = raw.trim();
|
|
286
|
+
const firstOpener = s.search(/[\{\[]/);
|
|
287
|
+
if (firstOpener !== -1) {
|
|
288
|
+
s = s.substring(firstOpener);
|
|
289
|
+
}
|
|
286
290
|
s = s.replace(
|
|
287
291
|
/:\s*(-?\d+(?:\.\d+)?)\s*([+\-*/])\s*(-?\d+(?:\.\d+)?)/g,
|
|
288
292
|
(_, a, op, b) => {
|
package/dist/server.js
CHANGED
|
@@ -3359,6 +3359,8 @@ When presenting structured data, statistics, or comparisons, decide if it is bes
|
|
|
3359
3359
|
3. dataKeys MUST exactly match the property names in the data objects.
|
|
3360
3360
|
4. data objects MUST be FLAT (no nested objects or arrays).
|
|
3361
3361
|
5. DO NOT output naked JSON; it MUST be wrapped in \`\`\`chart ... \`\`\`.
|
|
3362
|
+
6. The UI HAS a built-in charting engine. NEVER provide Python, Plotly, or Matplotlib code.
|
|
3363
|
+
7. NEVER apologize or claim you cannot render charts. Simply use the \`\`\`chart\`\`\` block.
|
|
3362
3364
|
\`\`\`chart
|
|
3363
3365
|
{
|
|
3364
3366
|
"type": "bar" | "line" | "pie",
|
|
@@ -3922,6 +3924,8 @@ When presenting structured data, statistics, or comparisons, decide if it is bes
|
|
|
3922
3924
|
3. dataKeys MUST exactly match the property names in the data objects.
|
|
3923
3925
|
4. data objects MUST be FLAT (no nested objects or arrays).
|
|
3924
3926
|
5. DO NOT output naked JSON; it MUST be wrapped in \`\`\`chart ... \`\`\`.
|
|
3927
|
+
6. The UI HAS a built-in charting engine. NEVER provide Python, Plotly, or Matplotlib code.
|
|
3928
|
+
7. NEVER apologize or claim you cannot render charts. Simply use the \`\`\`chart\`\`\` block.
|
|
3925
3929
|
\`\`\`chart
|
|
3926
3930
|
{
|
|
3927
3931
|
"type": "bar" | "line" | "pie",
|
package/dist/server.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retrivora-ai/rag-engine",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "Retrivora AI is a plug-and-play AI engine for RAG chat experiences — generic vector DB + LLM provider, embeddable or standalone.",
|
|
5
5
|
"author": "Abhinav Alkuchi",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,6 +15,12 @@ import { DynamicChart, ChartConfig } from './DynamicChart';
|
|
|
15
15
|
function sanitizeJson(raw: string): string {
|
|
16
16
|
let s = raw.trim();
|
|
17
17
|
|
|
18
|
+
// 0. Find the first '{' or '[' and trim everything before it (e.g. markdown fences)
|
|
19
|
+
const firstOpener = s.search(/[\{\[]/);
|
|
20
|
+
if (firstOpener !== -1) {
|
|
21
|
+
s = s.substring(firstOpener);
|
|
22
|
+
}
|
|
23
|
+
|
|
18
24
|
// 1. Evaluate simple arithmetic expressions in values e.g. "v": 495 / 1000
|
|
19
25
|
s = s.replace(
|
|
20
26
|
/:\s*(-?\d+(?:\.\d+)?)\s*([+\-*/])\s*(-?\d+(?:\.\d+)?)/g,
|
|
@@ -59,6 +59,8 @@ export class LangChainAgent {
|
|
|
59
59
|
3. dataKeys MUST exactly match the property names in the data objects.
|
|
60
60
|
4. data objects MUST be FLAT (no nested objects or arrays).
|
|
61
61
|
5. DO NOT output naked JSON; it MUST be wrapped in \`\`\`chart ... \`\`\`.
|
|
62
|
+
6. The UI HAS a built-in charting engine. NEVER provide Python, Plotly, or Matplotlib code.
|
|
63
|
+
7. NEVER apologize or claim you cannot render charts. Simply use the \`\`\`chart\`\`\` block.
|
|
62
64
|
\`\`\`chart
|
|
63
65
|
{
|
|
64
66
|
"type": "bar" | "line" | "pie",
|
package/src/core/Pipeline.ts
CHANGED
|
@@ -109,6 +109,8 @@ export class Pipeline {
|
|
|
109
109
|
3. dataKeys MUST exactly match the property names in the data objects.
|
|
110
110
|
4. data objects MUST be FLAT (no nested objects or arrays).
|
|
111
111
|
5. DO NOT output naked JSON; it MUST be wrapped in \`\`\`chart ... \`\`\`.
|
|
112
|
+
6. The UI HAS a built-in charting engine. NEVER provide Python, Plotly, or Matplotlib code.
|
|
113
|
+
7. NEVER apologize or claim you cannot render charts. Simply use the \`\`\`chart\`\`\` block.
|
|
112
114
|
\`\`\`chart
|
|
113
115
|
{
|
|
114
116
|
"type": "bar" | "line" | "pie",
|