@retrivora-ai/rag-engine 1.2.4 → 1.2.5
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-X4TMJV23.mjs → chunk-6WBJNJ5M.mjs} +8 -2
- package/dist/handlers/index.js +8 -2
- package/dist/handlers/index.mjs +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/server.js +8 -2
- package/dist/server.mjs +1 -1
- package/package.json +1 -1
- package/src/components/DynamicChart.tsx +4 -4
- package/src/core/LangChainAgent.ts +4 -1
- package/src/core/Pipeline.ts +4 -1
|
@@ -1699,7 +1699,10 @@ Sources Used: ${JSON.stringify(
|
|
|
1699
1699
|
When presenting structured data, statistics, or comparisons, decide if it is best presented as a table or a chart.
|
|
1700
1700
|
- For tables: use standard Markdown tables.
|
|
1701
1701
|
- For charts (bar, line, pie): Output a JSON code block with language 'chart'.
|
|
1702
|
-
- CRITICAL:
|
|
1702
|
+
- CRITICAL RULES:
|
|
1703
|
+
1. Use ONLY valid JSON (double quotes, no trailing commas).
|
|
1704
|
+
2. NO math expressions (e.g., use 100, NOT 50+50).
|
|
1705
|
+
3. dataKeys MUST exactly match the property names in the data objects.
|
|
1703
1706
|
\`\`\`chart
|
|
1704
1707
|
{
|
|
1705
1708
|
"type": "bar" | "line" | "pie",
|
|
@@ -2257,7 +2260,10 @@ var Pipeline = class {
|
|
|
2257
2260
|
When presenting structured data, statistics, or comparisons, decide if it is best presented as a table or a chart.
|
|
2258
2261
|
- For tables: use standard Markdown tables.
|
|
2259
2262
|
- For charts (bar, line, pie): Output a JSON code block with language 'chart'.
|
|
2260
|
-
- CRITICAL:
|
|
2263
|
+
- CRITICAL RULES:
|
|
2264
|
+
1. Use ONLY valid JSON (double quotes, no trailing commas).
|
|
2265
|
+
2. NO math expressions (e.g., use 100, NOT 50+50).
|
|
2266
|
+
3. dataKeys MUST exactly match the property names in the data objects.
|
|
2261
2267
|
\`\`\`chart
|
|
2262
2268
|
{
|
|
2263
2269
|
"type": "bar" | "line" | "pie",
|
package/dist/handlers/index.js
CHANGED
|
@@ -3268,7 +3268,10 @@ Sources Used: ${JSON.stringify(
|
|
|
3268
3268
|
When presenting structured data, statistics, or comparisons, decide if it is best presented as a table or a chart.
|
|
3269
3269
|
- For tables: use standard Markdown tables.
|
|
3270
3270
|
- For charts (bar, line, pie): Output a JSON code block with language 'chart'.
|
|
3271
|
-
- CRITICAL:
|
|
3271
|
+
- CRITICAL RULES:
|
|
3272
|
+
1. Use ONLY valid JSON (double quotes, no trailing commas).
|
|
3273
|
+
2. NO math expressions (e.g., use 100, NOT 50+50).
|
|
3274
|
+
3. dataKeys MUST exactly match the property names in the data objects.
|
|
3272
3275
|
\`\`\`chart
|
|
3273
3276
|
{
|
|
3274
3277
|
"type": "bar" | "line" | "pie",
|
|
@@ -3820,7 +3823,10 @@ var Pipeline = class {
|
|
|
3820
3823
|
When presenting structured data, statistics, or comparisons, decide if it is best presented as a table or a chart.
|
|
3821
3824
|
- For tables: use standard Markdown tables.
|
|
3822
3825
|
- For charts (bar, line, pie): Output a JSON code block with language 'chart'.
|
|
3823
|
-
- CRITICAL:
|
|
3826
|
+
- CRITICAL RULES:
|
|
3827
|
+
1. Use ONLY valid JSON (double quotes, no trailing commas).
|
|
3828
|
+
2. NO math expressions (e.g., use 100, NOT 50+50).
|
|
3829
|
+
3. dataKeys MUST exactly match the property names in the data objects.
|
|
3824
3830
|
\`\`\`chart
|
|
3825
3831
|
{
|
|
3826
3832
|
"type": "bar" | "line" | "pie",
|
package/dist/handlers/index.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -228,7 +228,7 @@ function DynamicChart({ config, primaryColor = "#6366f1", accentColor = "#8b5cf6
|
|
|
228
228
|
}
|
|
229
229
|
if (type === "pie") {
|
|
230
230
|
const pieDataKey = dataKeys[0] || Object.keys(data[0]).find((k) => k !== xAxisKey) || "value";
|
|
231
|
-
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "w-full h-
|
|
231
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "w-full h-72 min-h-[280px] mt-4 mb-2 select-none overflow-hidden" }, /* @__PURE__ */ import_react4.default.createElement(import_recharts.ResponsiveContainer, { width: "99%", height: "100%" }, /* @__PURE__ */ import_react4.default.createElement(import_recharts.PieChart, null, /* @__PURE__ */ import_react4.default.createElement(
|
|
232
232
|
import_recharts.Pie,
|
|
233
233
|
{
|
|
234
234
|
data,
|
|
@@ -247,7 +247,7 @@ function DynamicChart({ config, primaryColor = "#6366f1", accentColor = "#8b5cf6
|
|
|
247
247
|
}
|
|
248
248
|
), /* @__PURE__ */ import_react4.default.createElement(import_recharts.Legend, null))));
|
|
249
249
|
}
|
|
250
|
-
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "w-full h-
|
|
250
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "w-full h-72 min-h-[280px] mt-4 mb-2 select-none overflow-hidden" }, /* @__PURE__ */ import_react4.default.createElement(import_recharts.ResponsiveContainer, { width: "99%", height: "100%" }, type === "bar" ? /* @__PURE__ */ import_react4.default.createElement(import_recharts.BarChart, { data, margin: { top: 10, right: 10, left: -20, bottom: 0 } }, /* @__PURE__ */ import_react4.default.createElement(import_recharts.CartesianGrid, { strokeDasharray: "3 3", vertical: false, stroke: "#e2e8f0" }), /* @__PURE__ */ import_react4.default.createElement(import_recharts.XAxis, { dataKey: xAxisKey, tick: { fontSize: 12, fill: "#64748b" }, tickLine: false, axisLine: { stroke: "#cbd5e1" } }), /* @__PURE__ */ import_react4.default.createElement(import_recharts.YAxis, { tick: { fontSize: 12, fill: "#64748b" }, tickLine: false, axisLine: false }), /* @__PURE__ */ import_react4.default.createElement(
|
|
251
251
|
import_recharts.Tooltip,
|
|
252
252
|
{
|
|
253
253
|
contentStyle: { borderRadius: "8px", border: "none", boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1)" },
|
package/dist/index.mjs
CHANGED
|
@@ -191,7 +191,7 @@ function DynamicChart({ config, primaryColor = "#6366f1", accentColor = "#8b5cf6
|
|
|
191
191
|
}
|
|
192
192
|
if (type === "pie") {
|
|
193
193
|
const pieDataKey = dataKeys[0] || Object.keys(data[0]).find((k) => k !== xAxisKey) || "value";
|
|
194
|
-
return /* @__PURE__ */ React4.createElement("div", { className: "w-full h-
|
|
194
|
+
return /* @__PURE__ */ React4.createElement("div", { className: "w-full h-72 min-h-[280px] mt-4 mb-2 select-none overflow-hidden" }, /* @__PURE__ */ React4.createElement(ResponsiveContainer, { width: "99%", height: "100%" }, /* @__PURE__ */ React4.createElement(PieChart, null, /* @__PURE__ */ React4.createElement(
|
|
195
195
|
Pie,
|
|
196
196
|
{
|
|
197
197
|
data,
|
|
@@ -210,7 +210,7 @@ function DynamicChart({ config, primaryColor = "#6366f1", accentColor = "#8b5cf6
|
|
|
210
210
|
}
|
|
211
211
|
), /* @__PURE__ */ React4.createElement(Legend, null))));
|
|
212
212
|
}
|
|
213
|
-
return /* @__PURE__ */ React4.createElement("div", { className: "w-full h-
|
|
213
|
+
return /* @__PURE__ */ React4.createElement("div", { className: "w-full h-72 min-h-[280px] mt-4 mb-2 select-none overflow-hidden" }, /* @__PURE__ */ React4.createElement(ResponsiveContainer, { width: "99%", height: "100%" }, type === "bar" ? /* @__PURE__ */ React4.createElement(BarChart, { data, margin: { top: 10, right: 10, left: -20, bottom: 0 } }, /* @__PURE__ */ React4.createElement(CartesianGrid, { strokeDasharray: "3 3", vertical: false, stroke: "#e2e8f0" }), /* @__PURE__ */ React4.createElement(XAxis, { dataKey: xAxisKey, tick: { fontSize: 12, fill: "#64748b" }, tickLine: false, axisLine: { stroke: "#cbd5e1" } }), /* @__PURE__ */ React4.createElement(YAxis, { tick: { fontSize: 12, fill: "#64748b" }, tickLine: false, axisLine: false }), /* @__PURE__ */ React4.createElement(
|
|
214
214
|
Tooltip,
|
|
215
215
|
{
|
|
216
216
|
contentStyle: { borderRadius: "8px", border: "none", boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1)" },
|
package/dist/server.js
CHANGED
|
@@ -3353,7 +3353,10 @@ Sources Used: ${JSON.stringify(
|
|
|
3353
3353
|
When presenting structured data, statistics, or comparisons, decide if it is best presented as a table or a chart.
|
|
3354
3354
|
- For tables: use standard Markdown tables.
|
|
3355
3355
|
- For charts (bar, line, pie): Output a JSON code block with language 'chart'.
|
|
3356
|
-
- CRITICAL:
|
|
3356
|
+
- CRITICAL RULES:
|
|
3357
|
+
1. Use ONLY valid JSON (double quotes, no trailing commas).
|
|
3358
|
+
2. NO math expressions (e.g., use 100, NOT 50+50).
|
|
3359
|
+
3. dataKeys MUST exactly match the property names in the data objects.
|
|
3357
3360
|
\`\`\`chart
|
|
3358
3361
|
{
|
|
3359
3362
|
"type": "bar" | "line" | "pie",
|
|
@@ -3911,7 +3914,10 @@ var Pipeline = class {
|
|
|
3911
3914
|
When presenting structured data, statistics, or comparisons, decide if it is best presented as a table or a chart.
|
|
3912
3915
|
- For tables: use standard Markdown tables.
|
|
3913
3916
|
- For charts (bar, line, pie): Output a JSON code block with language 'chart'.
|
|
3914
|
-
- CRITICAL:
|
|
3917
|
+
- CRITICAL RULES:
|
|
3918
|
+
1. Use ONLY valid JSON (double quotes, no trailing commas).
|
|
3919
|
+
2. NO math expressions (e.g., use 100, NOT 50+50).
|
|
3920
|
+
3. dataKeys MUST exactly match the property names in the data objects.
|
|
3915
3921
|
\`\`\`chart
|
|
3916
3922
|
{
|
|
3917
3923
|
"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.2.
|
|
3
|
+
"version": "1.2.5",
|
|
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",
|
|
@@ -35,8 +35,8 @@ export function DynamicChart({ config, primaryColor = '#6366f1', accentColor = '
|
|
|
35
35
|
const pieDataKey = dataKeys[0] || Object.keys(data[0]).find(k => k !== xAxisKey) || 'value';
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
|
-
<div className="w-full h-
|
|
39
|
-
<ResponsiveContainer width="
|
|
38
|
+
<div className="w-full h-72 min-h-[280px] mt-4 mb-2 select-none overflow-hidden">
|
|
39
|
+
<ResponsiveContainer width="99%" height="100%">
|
|
40
40
|
<PieChart>
|
|
41
41
|
<Pie
|
|
42
42
|
data={data}
|
|
@@ -63,8 +63,8 @@ export function DynamicChart({ config, primaryColor = '#6366f1', accentColor = '
|
|
|
63
63
|
|
|
64
64
|
// Bar and Line charts
|
|
65
65
|
return (
|
|
66
|
-
<div className="w-full h-
|
|
67
|
-
<ResponsiveContainer width="
|
|
66
|
+
<div className="w-full h-72 min-h-[280px] mt-4 mb-2 select-none overflow-hidden">
|
|
67
|
+
<ResponsiveContainer width="99%" height="100%">
|
|
68
68
|
{type === 'bar' ? (
|
|
69
69
|
<BarChart data={data} margin={{ top: 10, right: 10, left: -20, bottom: 0 }}>
|
|
70
70
|
<CartesianGrid strokeDasharray="3 3" vertical={false} stroke="#e2e8f0" />
|
|
@@ -53,7 +53,10 @@ export class LangChainAgent {
|
|
|
53
53
|
const chartInstruction = `\n\nWhen presenting structured data, statistics, or comparisons, decide if it is best presented as a table or a chart.
|
|
54
54
|
- For tables: use standard Markdown tables.
|
|
55
55
|
- For charts (bar, line, pie): Output a JSON code block with language 'chart'.
|
|
56
|
-
- CRITICAL:
|
|
56
|
+
- CRITICAL RULES:
|
|
57
|
+
1. Use ONLY valid JSON (double quotes, no trailing commas).
|
|
58
|
+
2. NO math expressions (e.g., use 100, NOT 50+50).
|
|
59
|
+
3. dataKeys MUST exactly match the property names in the data objects.
|
|
57
60
|
\`\`\`chart
|
|
58
61
|
{
|
|
59
62
|
"type": "bar" | "line" | "pie",
|
package/src/core/Pipeline.ts
CHANGED
|
@@ -103,7 +103,10 @@ export class Pipeline {
|
|
|
103
103
|
const chartInstruction = `\n\nWhen presenting structured data, statistics, or comparisons, decide if it is best presented as a table or a chart.
|
|
104
104
|
- For tables: use standard Markdown tables.
|
|
105
105
|
- For charts (bar, line, pie): Output a JSON code block with language 'chart'.
|
|
106
|
-
- CRITICAL:
|
|
106
|
+
- CRITICAL RULES:
|
|
107
|
+
1. Use ONLY valid JSON (double quotes, no trailing commas).
|
|
108
|
+
2. NO math expressions (e.g., use 100, NOT 50+50).
|
|
109
|
+
3. dataKeys MUST exactly match the property names in the data objects.
|
|
107
110
|
\`\`\`chart
|
|
108
111
|
{
|
|
109
112
|
"type": "bar" | "line" | "pie",
|