cevheri commited on
Commit
a2df0c9
·
1 Parent(s): 37d5e00

chore: fix figure jsons

Browse files
main.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from fastapi import FastAPI
2
  from fastapi.responses import RedirectResponse, JSONResponse
3
  from fastapi.staticfiles import StaticFiles
@@ -126,29 +127,9 @@ async def root():
126
  @app.get("/manifest.json")
127
  async def get_manifest():
128
  """Return the web app manifest"""
129
- return JSONResponse(
130
- {
131
- "name": "Data Chatbot",
132
- "short_name": "Chatbot",
133
- "description": "A chatbot interface for data visualization and analysis",
134
- "start_url": "/ui",
135
- "display": "standalone",
136
- "background_color": "#ffffff",
137
- "theme_color": "#4f46e5",
138
- "icons": [
139
- {
140
- "src": "/static/icons/icon-192x192.png",
141
- "sizes": "192x192",
142
- "type": "image/png",
143
- },
144
- {
145
- "src": "/static/icons/icon-512x512.png",
146
- "sizes": "512x512",
147
- "type": "image/png",
148
- },
149
- ],
150
- }
151
- )
152
 
153
 
154
  # uv run uvicorn main:app --host 0.0.0.0 --port 7860 --reload
 
1
+ import json
2
  from fastapi import FastAPI
3
  from fastapi.responses import RedirectResponse, JSONResponse
4
  from fastapi.staticfiles import StaticFiles
 
127
  @app.get("/manifest.json")
128
  async def get_manifest():
129
  """Return the web app manifest"""
130
+ manifest_path = os.path.join(os.path.dirname(__file__), "static", "manifest.json")
131
+ with open(manifest_path, "r") as f:
132
+ return JSONResponse(json.load(f))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
 
134
 
135
  # uv run uvicorn main:app --host 0.0.0.0 --port 7860 --reload
resources/mock/chat_api_create_chat_completion.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "completion_id": "chatcmpl-mock-123",
3
  "object": "chat.completion",
4
  "created": 1677858242,
5
  "model": "gpt-3.5-turbo",
@@ -7,7 +7,7 @@
7
  {
8
  "index": 0,
9
  "message": {
10
- "message_id": "msg_mock-123",
11
  "role": "assistant",
12
  "content": "## Result\n|status|count|\n|---|---|\n|active|50|\n|in_review|30|\n|pending_deletion|15|\n|passive|70|\n|newly_added|25|archived|90|\n\n## Explanation\nThis result represents the number of active, cancelled, pending and passive customers in the year 2025. This is a mock result for the question \"How many customers are active, cancelled, pending and passive in the year 2025?\"\n\n## Query\n```sql\nSELECT status, COUNT(*) FROM customers WHERE year = 2025 GROUP BY status;\n```",
13
  "figure": {"data":[{"alignmentgroup":"True","customdata":[["North"],["North"],["South"]],"hovertemplate":"category=Category A\u003cbr\u003estatus=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003eregion=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"Category A","marker":{"color":"#636efa","pattern":{"shape":""}},"name":"Category A","offsetgroup":"Category A","orientation":"v","showlegend":true,"textposition":"auto","texttemplate":"%{y}","x":["active","in_review","pending_deletion"],"xaxis":"x","y":{"dtype":"i1","bdata":"Mh4P"},"yaxis":"y","type":"bar"},{"alignmentgroup":"True","customdata":[["South"],["West"]],"hovertemplate":"category=Category B\u003cbr\u003estatus=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003eregion=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"Category B","marker":{"color":"#EF553B","pattern":{"shape":""}},"name":"Category B","offsetgroup":"Category B","orientation":"v","showlegend":true,"textposition":"auto","texttemplate":"%{y}","x":["passive","newly_added"],"xaxis":"x","y":{"dtype":"i1","bdata":"Rhk="},"yaxis":"y","type":"bar"},{"alignmentgroup":"True","customdata":[["East"]],"hovertemplate":"category=Category C\u003cbr\u003estatus=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003eregion=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"Category C","marker":{"color":"#00cc96","pattern":{"shape":""}},"name":"Category C","offsetgroup":"Category C","orientation":"v","showlegend":true,"textposition":"auto","texttemplate":"%{y}","x":["archived"],"xaxis":"x","y":{"dtype":"i1","bdata":"Wg=="},"yaxis":"y","type":"bar"}],"layout":{"template":{"data":{"histogram2dcontour":[{"type":"histogram2dcontour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"choropleth":[{"type":"choropleth","colorbar":{"outlinewidth":0,"ticks":""}}],"histogram2d":[{"type":"histogram2d","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"heatmap":[{"type":"heatmap","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"contourcarpet":[{"type":"contourcarpet","colorbar":{"outlinewidth":0,"ticks":""}}],"contour":[{"type":"contour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"surface":[{"type":"surface","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"mesh3d":[{"type":"mesh3d","colorbar":{"outlinewidth":0,"ticks":""}}],"scatter":[{"fillpattern":{"fillmode":"overlay","size":10,"solidity":0.2},"type":"scatter"}],"parcoords":[{"type":"parcoords","line":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolargl":[{"type":"scatterpolargl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"bar":[{"error_x":{"color":"#2a3f5f"},"error_y":{"color":"#2a3f5f"},"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"scattergeo":[{"type":"scattergeo","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolar":[{"type":"scatterpolar","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"histogram":[{"marker":{"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"histogram"}],"scattergl":[{"type":"scattergl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatter3d":[{"type":"scatter3d","line":{"colorbar":{"outlinewidth":0,"ticks":""}},"marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermap":[{"type":"scattermap","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermapbox":[{"type":"scattermapbox","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterternary":[{"type":"scatterternary","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattercarpet":[{"type":"scattercarpet","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"carpet":[{"aaxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"baxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"type":"carpet"}],"table":[{"cells":{"fill":{"color":"#EBF0F8"},"line":{"color":"white"}},"header":{"fill":{"color":"#C8D4E3"},"line":{"color":"white"}},"type":"table"}],"barpolar":[{"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"pie":[{"automargin":true,"type":"pie"}]},"layout":{"autotypenumbers":"strict","colorway":["#636efa","#EF553B","#00cc96","#ab63fa","#FFA15A","#19d3f3","#FF6692","#B6E880","#FF97FF","#FECB52"],"font":{"color":"#2a3f5f"},"hovermode":"closest","hoverlabel":{"align":"left"},"paper_bgcolor":"white","plot_bgcolor":"#E5ECF6","polar":{"bgcolor":"#E5ECF6","angularaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"radialaxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"ternary":{"bgcolor":"#E5ECF6","aaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"baxis":{"gridcolor":"white","linecolor":"white","ticks":""},"caxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"coloraxis":{"colorbar":{"outlinewidth":0,"ticks":""}},"colorscale":{"sequential":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"sequentialminus":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"diverging":[[0,"#8e0152"],[0.1,"#c51b7d"],[0.2,"#de77ae"],[0.3,"#f1b6da"],[0.4,"#fde0ef"],[0.5,"#f7f7f7"],[0.6,"#e6f5d0"],[0.7,"#b8e186"],[0.8,"#7fbc41"],[0.9,"#4d9221"],[1,"#276419"]]},"xaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"yaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"scene":{"xaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"yaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"zaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2}},"shapedefaults":{"line":{"color":"#2a3f5f"}},"annotationdefaults":{"arrowcolor":"#2a3f5f","arrowhead":0,"arrowwidth":1},"geo":{"bgcolor":"white","landcolor":"#E5ECF6","subunitcolor":"white","showland":true,"showlakes":true,"lakecolor":"white"},"title":{"x":0.05},"mapbox":{"style":"light"}}},"xaxis":{"anchor":"y","domain":[0.0,1.0],"title":{"text":"Status"}},"yaxis":{"anchor":"x","domain":[0.0,1.0],"title":{"text":"Count"}},"legend":{"title":{"text":"Category"},"tracegroupgap":0},"title":{"text":"Bar Chart: Count by Status and Category","x":0.5},"barmode":"group"}}
 
1
  {
2
+ "completion_id": "created-completion-id",
3
  "object": "chat.completion",
4
  "created": 1677858242,
5
  "model": "gpt-3.5-turbo",
 
7
  {
8
  "index": 0,
9
  "message": {
10
+ "message_id": "created-message-id",
11
  "role": "assistant",
12
  "content": "## Result\n|status|count|\n|---|---|\n|active|50|\n|in_review|30|\n|pending_deletion|15|\n|passive|70|\n|newly_added|25|archived|90|\n\n## Explanation\nThis result represents the number of active, cancelled, pending and passive customers in the year 2025. This is a mock result for the question \"How many customers are active, cancelled, pending and passive in the year 2025?\"\n\n## Query\n```sql\nSELECT status, COUNT(*) FROM customers WHERE year = 2025 GROUP BY status;\n```",
13
  "figure": {"data":[{"alignmentgroup":"True","customdata":[["North"],["North"],["South"]],"hovertemplate":"category=Category A\u003cbr\u003estatus=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003eregion=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"Category A","marker":{"color":"#636efa","pattern":{"shape":""}},"name":"Category A","offsetgroup":"Category A","orientation":"v","showlegend":true,"textposition":"auto","texttemplate":"%{y}","x":["active","in_review","pending_deletion"],"xaxis":"x","y":{"dtype":"i1","bdata":"Mh4P"},"yaxis":"y","type":"bar"},{"alignmentgroup":"True","customdata":[["South"],["West"]],"hovertemplate":"category=Category B\u003cbr\u003estatus=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003eregion=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"Category B","marker":{"color":"#EF553B","pattern":{"shape":""}},"name":"Category B","offsetgroup":"Category B","orientation":"v","showlegend":true,"textposition":"auto","texttemplate":"%{y}","x":["passive","newly_added"],"xaxis":"x","y":{"dtype":"i1","bdata":"Rhk="},"yaxis":"y","type":"bar"},{"alignmentgroup":"True","customdata":[["East"]],"hovertemplate":"category=Category C\u003cbr\u003estatus=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003eregion=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"Category C","marker":{"color":"#00cc96","pattern":{"shape":""}},"name":"Category C","offsetgroup":"Category C","orientation":"v","showlegend":true,"textposition":"auto","texttemplate":"%{y}","x":["archived"],"xaxis":"x","y":{"dtype":"i1","bdata":"Wg=="},"yaxis":"y","type":"bar"}],"layout":{"template":{"data":{"histogram2dcontour":[{"type":"histogram2dcontour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"choropleth":[{"type":"choropleth","colorbar":{"outlinewidth":0,"ticks":""}}],"histogram2d":[{"type":"histogram2d","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"heatmap":[{"type":"heatmap","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"contourcarpet":[{"type":"contourcarpet","colorbar":{"outlinewidth":0,"ticks":""}}],"contour":[{"type":"contour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"surface":[{"type":"surface","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"mesh3d":[{"type":"mesh3d","colorbar":{"outlinewidth":0,"ticks":""}}],"scatter":[{"fillpattern":{"fillmode":"overlay","size":10,"solidity":0.2},"type":"scatter"}],"parcoords":[{"type":"parcoords","line":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolargl":[{"type":"scatterpolargl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"bar":[{"error_x":{"color":"#2a3f5f"},"error_y":{"color":"#2a3f5f"},"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"scattergeo":[{"type":"scattergeo","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolar":[{"type":"scatterpolar","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"histogram":[{"marker":{"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"histogram"}],"scattergl":[{"type":"scattergl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatter3d":[{"type":"scatter3d","line":{"colorbar":{"outlinewidth":0,"ticks":""}},"marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermap":[{"type":"scattermap","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermapbox":[{"type":"scattermapbox","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterternary":[{"type":"scatterternary","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattercarpet":[{"type":"scattercarpet","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"carpet":[{"aaxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"baxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"type":"carpet"}],"table":[{"cells":{"fill":{"color":"#EBF0F8"},"line":{"color":"white"}},"header":{"fill":{"color":"#C8D4E3"},"line":{"color":"white"}},"type":"table"}],"barpolar":[{"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"pie":[{"automargin":true,"type":"pie"}]},"layout":{"autotypenumbers":"strict","colorway":["#636efa","#EF553B","#00cc96","#ab63fa","#FFA15A","#19d3f3","#FF6692","#B6E880","#FF97FF","#FECB52"],"font":{"color":"#2a3f5f"},"hovermode":"closest","hoverlabel":{"align":"left"},"paper_bgcolor":"white","plot_bgcolor":"#E5ECF6","polar":{"bgcolor":"#E5ECF6","angularaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"radialaxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"ternary":{"bgcolor":"#E5ECF6","aaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"baxis":{"gridcolor":"white","linecolor":"white","ticks":""},"caxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"coloraxis":{"colorbar":{"outlinewidth":0,"ticks":""}},"colorscale":{"sequential":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"sequentialminus":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"diverging":[[0,"#8e0152"],[0.1,"#c51b7d"],[0.2,"#de77ae"],[0.3,"#f1b6da"],[0.4,"#fde0ef"],[0.5,"#f7f7f7"],[0.6,"#e6f5d0"],[0.7,"#b8e186"],[0.8,"#7fbc41"],[0.9,"#4d9221"],[1,"#276419"]]},"xaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"yaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"scene":{"xaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"yaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"zaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2}},"shapedefaults":{"line":{"color":"#2a3f5f"}},"annotationdefaults":{"arrowcolor":"#2a3f5f","arrowhead":0,"arrowwidth":1},"geo":{"bgcolor":"white","landcolor":"#E5ECF6","subunitcolor":"white","showland":true,"showlakes":true,"lakecolor":"white"},"title":{"x":0.05},"mapbox":{"style":"light"}}},"xaxis":{"anchor":"y","domain":[0.0,1.0],"title":{"text":"Status"}},"yaxis":{"anchor":"x","domain":[0.0,1.0],"title":{"text":"Count"}},"legend":{"title":{"text":"Category"},"tracegroupgap":0},"title":{"text":"Bar Chart: Count by Status and Category","x":0.5},"barmode":"group"}}
resources/mock/chat_api_list_chat_completions.json CHANGED
@@ -11,1095 +11,7 @@
11
  "message_id": "msg_mock-123",
12
  "role": "assistant",
13
  "content": "## Result\n|status|count|\n|---|---|\n|active|100|\n|cancelled|30|\n|pending|40|\n|passive|150|\n\n## Explanation\nThis result represents the number of active, cancelled, pending and passive customers in the year 2025. This is a mock result for the question \"How many customers are active, cancelled, pending and passive in the year 2025?\"\n\n## Query\n```sql\nSELECT status, COUNT(*) FROM customers WHERE year = 2025 GROUP BY status;\n```",
14
- "figure":
15
- {
16
- "data": [
17
- {
18
- "customdata": [
19
- [
20
- "math"
21
- ],
22
- [
23
- "math"
24
- ],
25
- [
26
- "science"
27
- ],
28
- [
29
- "science"
30
- ],
31
- [
32
- "art"
33
- ],
34
- [
35
- "art"
36
- ],
37
- [
38
- "science"
39
- ],
40
- [
41
- "science"
42
- ],
43
- [
44
- "math"
45
- ]
46
- ],
47
- "hovertemplate": "status=active\u003cbr\u003edate=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003esubject=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e",
48
- "legendgroup": "active",
49
- "line": {
50
- "color": "#3498db",
51
- "dash": "solid"
52
- },
53
- "marker": {
54
- "symbol": "circle"
55
- },
56
- "mode": "lines+markers",
57
- "name": "active",
58
- "orientation": "v",
59
- "showlegend": true,
60
- "x": [
61
- "2025-01-01T00:00:00.000000000",
62
- "2025-02-01T00:00:00.000000000",
63
- "2025-03-01T00:00:00.000000000",
64
- "2025-04-01T00:00:00.000000000",
65
- "2025-05-01T00:00:00.000000000",
66
- "2025-06-01T00:00:00.000000000",
67
- "2025-07-01T00:00:00.000000000",
68
- "2025-08-01T00:00:00.000000000",
69
- "2025-09-01T00:00:00.000000000"
70
- ],
71
- "xaxis": "x",
72
- "y": {
73
- "dtype": "i1",
74
- "bdata": "Cg8MEg4UEBYZ"
75
- },
76
- "yaxis": "y",
77
- "type": "scatter"
78
- },
79
- {
80
- "customdata": [
81
- [
82
- "math"
83
- ],
84
- [
85
- "math"
86
- ],
87
- [
88
- "science"
89
- ],
90
- [
91
- "science"
92
- ],
93
- [
94
- "math"
95
- ],
96
- [
97
- "math"
98
- ],
99
- [
100
- "music"
101
- ],
102
- [
103
- "music"
104
- ],
105
- [
106
- "history"
107
- ]
108
- ],
109
- "hovertemplate": "status=archived\u003cbr\u003edate=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003esubject=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e",
110
- "legendgroup": "archived",
111
- "line": {
112
- "color": "#9b59b6",
113
- "dash": "solid"
114
- },
115
- "marker": {
116
- "symbol": "circle"
117
- },
118
- "mode": "lines+markers",
119
- "name": "archived",
120
- "orientation": "v",
121
- "showlegend": true,
122
- "x": [
123
- "2025-01-01T00:00:00.000000000",
124
- "2025-02-01T00:00:00.000000000",
125
- "2025-03-01T00:00:00.000000000",
126
- "2025-04-01T00:00:00.000000000",
127
- "2025-05-01T00:00:00.000000000",
128
- "2025-06-01T00:00:00.000000000",
129
- "2025-07-01T00:00:00.000000000",
130
- "2025-08-01T00:00:00.000000000",
131
- "2025-09-01T00:00:00.000000000"
132
- ],
133
- "xaxis": "x",
134
- "y": {
135
- "dtype": "i1",
136
- "bdata": "KC0qMCwyLzc8"
137
- },
138
- "yaxis": "y",
139
- "type": "scatter"
140
- },
141
- {
142
- "customdata": [
143
- [
144
- "english"
145
- ],
146
- [
147
- "english"
148
- ],
149
- [
150
- "math"
151
- ],
152
- [
153
- "math"
154
- ],
155
- [
156
- "history"
157
- ],
158
- [
159
- "history"
160
- ],
161
- [
162
- "art"
163
- ],
164
- [
165
- "art"
166
- ],
167
- [
168
- "english"
169
- ]
170
- ],
171
- "hovertemplate": "status=in_review\u003cbr\u003edate=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003esubject=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e",
172
- "legendgroup": "in_review",
173
- "line": {
174
- "color": "#2ecc71",
175
- "dash": "solid"
176
- },
177
- "marker": {
178
- "symbol": "circle"
179
- },
180
- "mode": "lines+markers",
181
- "name": "in_review",
182
- "orientation": "v",
183
- "showlegend": true,
184
- "x": [
185
- "2025-01-01T00:00:00.000000000",
186
- "2025-02-01T00:00:00.000000000",
187
- "2025-03-01T00:00:00.000000000",
188
- "2025-04-01T00:00:00.000000000",
189
- "2025-05-01T00:00:00.000000000",
190
- "2025-06-01T00:00:00.000000000",
191
- "2025-07-01T00:00:00.000000000",
192
- "2025-08-01T00:00:00.000000000",
193
- "2025-09-01T00:00:00.000000000"
194
- ],
195
- "xaxis": "x",
196
- "y": {
197
- "dtype": "i1",
198
- "bdata": "HiMgJh4kIScq"
199
- },
200
- "yaxis": "y",
201
- "type": "scatter"
202
- },
203
- {
204
- "customdata": [
205
- [
206
- "science"
207
- ],
208
- [
209
- "science"
210
- ],
211
- [
212
- "english"
213
- ],
214
- [
215
- "english"
216
- ],
217
- [
218
- "music"
219
- ],
220
- [
221
- "music"
222
- ],
223
- [
224
- "english"
225
- ],
226
- [
227
- "english"
228
- ],
229
- [
230
- "science"
231
- ]
232
- ],
233
- "hovertemplate": "status=passive\u003cbr\u003edate=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003esubject=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e",
234
- "legendgroup": "passive",
235
- "line": {
236
- "color": "#e74c3c",
237
- "dash": "solid"
238
- },
239
- "marker": {
240
- "symbol": "circle"
241
- },
242
- "mode": "lines+markers",
243
- "name": "passive",
244
- "orientation": "v",
245
- "showlegend": true,
246
- "x": [
247
- "2025-01-01T00:00:00.000000000",
248
- "2025-02-01T00:00:00.000000000",
249
- "2025-03-01T00:00:00.000000000",
250
- "2025-04-01T00:00:00.000000000",
251
- "2025-05-01T00:00:00.000000000",
252
- "2025-06-01T00:00:00.000000000",
253
- "2025-07-01T00:00:00.000000000",
254
- "2025-08-01T00:00:00.000000000",
255
- "2025-09-01T00:00:00.000000000"
256
- ],
257
- "xaxis": "x",
258
- "y": {
259
- "dtype": "i1",
260
- "bdata": "FBkWHBQaEhgP"
261
- },
262
- "yaxis": "y",
263
- "type": "scatter"
264
- }
265
- ],
266
- "layout": {
267
- "template": {
268
- "data": {
269
- "histogram2dcontour": [
270
- {
271
- "type": "histogram2dcontour",
272
- "colorbar": {
273
- "outlinewidth": 0,
274
- "ticks": ""
275
- },
276
- "colorscale": [
277
- [
278
- 0.0,
279
- "#0d0887"
280
- ],
281
- [
282
- 0.1111111111111111,
283
- "#46039f"
284
- ],
285
- [
286
- 0.2222222222222222,
287
- "#7201a8"
288
- ],
289
- [
290
- 0.3333333333333333,
291
- "#9c179e"
292
- ],
293
- [
294
- 0.4444444444444444,
295
- "#bd3786"
296
- ],
297
- [
298
- 0.5555555555555556,
299
- "#d8576b"
300
- ],
301
- [
302
- 0.6666666666666666,
303
- "#ed7953"
304
- ],
305
- [
306
- 0.7777777777777778,
307
- "#fb9f3a"
308
- ],
309
- [
310
- 0.8888888888888888,
311
- "#fdca26"
312
- ],
313
- [
314
- 1.0,
315
- "#f0f921"
316
- ]
317
- ]
318
- }
319
- ],
320
- "choropleth": [
321
- {
322
- "type": "choropleth",
323
- "colorbar": {
324
- "outlinewidth": 0,
325
- "ticks": ""
326
- }
327
- }
328
- ],
329
- "histogram2d": [
330
- {
331
- "type": "histogram2d",
332
- "colorbar": {
333
- "outlinewidth": 0,
334
- "ticks": ""
335
- },
336
- "colorscale": [
337
- [
338
- 0.0,
339
- "#0d0887"
340
- ],
341
- [
342
- 0.1111111111111111,
343
- "#46039f"
344
- ],
345
- [
346
- 0.2222222222222222,
347
- "#7201a8"
348
- ],
349
- [
350
- 0.3333333333333333,
351
- "#9c179e"
352
- ],
353
- [
354
- 0.4444444444444444,
355
- "#bd3786"
356
- ],
357
- [
358
- 0.5555555555555556,
359
- "#d8576b"
360
- ],
361
- [
362
- 0.6666666666666666,
363
- "#ed7953"
364
- ],
365
- [
366
- 0.7777777777777778,
367
- "#fb9f3a"
368
- ],
369
- [
370
- 0.8888888888888888,
371
- "#fdca26"
372
- ],
373
- [
374
- 1.0,
375
- "#f0f921"
376
- ]
377
- ]
378
- }
379
- ],
380
- "heatmap": [
381
- {
382
- "type": "heatmap",
383
- "colorbar": {
384
- "outlinewidth": 0,
385
- "ticks": ""
386
- },
387
- "colorscale": [
388
- [
389
- 0.0,
390
- "#0d0887"
391
- ],
392
- [
393
- 0.1111111111111111,
394
- "#46039f"
395
- ],
396
- [
397
- 0.2222222222222222,
398
- "#7201a8"
399
- ],
400
- [
401
- 0.3333333333333333,
402
- "#9c179e"
403
- ],
404
- [
405
- 0.4444444444444444,
406
- "#bd3786"
407
- ],
408
- [
409
- 0.5555555555555556,
410
- "#d8576b"
411
- ],
412
- [
413
- 0.6666666666666666,
414
- "#ed7953"
415
- ],
416
- [
417
- 0.7777777777777778,
418
- "#fb9f3a"
419
- ],
420
- [
421
- 0.8888888888888888,
422
- "#fdca26"
423
- ],
424
- [
425
- 1.0,
426
- "#f0f921"
427
- ]
428
- ]
429
- }
430
- ],
431
- "contourcarpet": [
432
- {
433
- "type": "contourcarpet",
434
- "colorbar": {
435
- "outlinewidth": 0,
436
- "ticks": ""
437
- }
438
- }
439
- ],
440
- "contour": [
441
- {
442
- "type": "contour",
443
- "colorbar": {
444
- "outlinewidth": 0,
445
- "ticks": ""
446
- },
447
- "colorscale": [
448
- [
449
- 0.0,
450
- "#0d0887"
451
- ],
452
- [
453
- 0.1111111111111111,
454
- "#46039f"
455
- ],
456
- [
457
- 0.2222222222222222,
458
- "#7201a8"
459
- ],
460
- [
461
- 0.3333333333333333,
462
- "#9c179e"
463
- ],
464
- [
465
- 0.4444444444444444,
466
- "#bd3786"
467
- ],
468
- [
469
- 0.5555555555555556,
470
- "#d8576b"
471
- ],
472
- [
473
- 0.6666666666666666,
474
- "#ed7953"
475
- ],
476
- [
477
- 0.7777777777777778,
478
- "#fb9f3a"
479
- ],
480
- [
481
- 0.8888888888888888,
482
- "#fdca26"
483
- ],
484
- [
485
- 1.0,
486
- "#f0f921"
487
- ]
488
- ]
489
- }
490
- ],
491
- "surface": [
492
- {
493
- "type": "surface",
494
- "colorbar": {
495
- "outlinewidth": 0,
496
- "ticks": ""
497
- },
498
- "colorscale": [
499
- [
500
- 0.0,
501
- "#0d0887"
502
- ],
503
- [
504
- 0.1111111111111111,
505
- "#46039f"
506
- ],
507
- [
508
- 0.2222222222222222,
509
- "#7201a8"
510
- ],
511
- [
512
- 0.3333333333333333,
513
- "#9c179e"
514
- ],
515
- [
516
- 0.4444444444444444,
517
- "#bd3786"
518
- ],
519
- [
520
- 0.5555555555555556,
521
- "#d8576b"
522
- ],
523
- [
524
- 0.6666666666666666,
525
- "#ed7953"
526
- ],
527
- [
528
- 0.7777777777777778,
529
- "#fb9f3a"
530
- ],
531
- [
532
- 0.8888888888888888,
533
- "#fdca26"
534
- ],
535
- [
536
- 1.0,
537
- "#f0f921"
538
- ]
539
- ]
540
- }
541
- ],
542
- "mesh3d": [
543
- {
544
- "type": "mesh3d",
545
- "colorbar": {
546
- "outlinewidth": 0,
547
- "ticks": ""
548
- }
549
- }
550
- ],
551
- "scatter": [
552
- {
553
- "fillpattern": {
554
- "fillmode": "overlay",
555
- "size": 10,
556
- "solidity": 0.2
557
- },
558
- "type": "scatter"
559
- }
560
- ],
561
- "parcoords": [
562
- {
563
- "type": "parcoords",
564
- "line": {
565
- "colorbar": {
566
- "outlinewidth": 0,
567
- "ticks": ""
568
- }
569
- }
570
- }
571
- ],
572
- "scatterpolargl": [
573
- {
574
- "type": "scatterpolargl",
575
- "marker": {
576
- "colorbar": {
577
- "outlinewidth": 0,
578
- "ticks": ""
579
- }
580
- }
581
- }
582
- ],
583
- "bar": [
584
- {
585
- "error_x": {
586
- "color": "#2a3f5f"
587
- },
588
- "error_y": {
589
- "color": "#2a3f5f"
590
- },
591
- "marker": {
592
- "line": {
593
- "color": "#E5ECF6",
594
- "width": 0.5
595
- },
596
- "pattern": {
597
- "fillmode": "overlay",
598
- "size": 10,
599
- "solidity": 0.2
600
- }
601
- },
602
- "type": "bar"
603
- }
604
- ],
605
- "scattergeo": [
606
- {
607
- "type": "scattergeo",
608
- "marker": {
609
- "colorbar": {
610
- "outlinewidth": 0,
611
- "ticks": ""
612
- }
613
- }
614
- }
615
- ],
616
- "scatterpolar": [
617
- {
618
- "type": "scatterpolar",
619
- "marker": {
620
- "colorbar": {
621
- "outlinewidth": 0,
622
- "ticks": ""
623
- }
624
- }
625
- }
626
- ],
627
- "histogram": [
628
- {
629
- "marker": {
630
- "pattern": {
631
- "fillmode": "overlay",
632
- "size": 10,
633
- "solidity": 0.2
634
- }
635
- },
636
- "type": "histogram"
637
- }
638
- ],
639
- "scattergl": [
640
- {
641
- "type": "scattergl",
642
- "marker": {
643
- "colorbar": {
644
- "outlinewidth": 0,
645
- "ticks": ""
646
- }
647
- }
648
- }
649
- ],
650
- "scatter3d": [
651
- {
652
- "type": "scatter3d",
653
- "line": {
654
- "colorbar": {
655
- "outlinewidth": 0,
656
- "ticks": ""
657
- }
658
- },
659
- "marker": {
660
- "colorbar": {
661
- "outlinewidth": 0,
662
- "ticks": ""
663
- }
664
- }
665
- }
666
- ],
667
- "scattermap": [
668
- {
669
- "type": "scattermap",
670
- "marker": {
671
- "colorbar": {
672
- "outlinewidth": 0,
673
- "ticks": ""
674
- }
675
- }
676
- }
677
- ],
678
- "scattermapbox": [
679
- {
680
- "type": "scattermapbox",
681
- "marker": {
682
- "colorbar": {
683
- "outlinewidth": 0,
684
- "ticks": ""
685
- }
686
- }
687
- }
688
- ],
689
- "scatterternary": [
690
- {
691
- "type": "scatterternary",
692
- "marker": {
693
- "colorbar": {
694
- "outlinewidth": 0,
695
- "ticks": ""
696
- }
697
- }
698
- }
699
- ],
700
- "scattercarpet": [
701
- {
702
- "type": "scattercarpet",
703
- "marker": {
704
- "colorbar": {
705
- "outlinewidth": 0,
706
- "ticks": ""
707
- }
708
- }
709
- }
710
- ],
711
- "carpet": [
712
- {
713
- "aaxis": {
714
- "endlinecolor": "#2a3f5f",
715
- "gridcolor": "white",
716
- "linecolor": "white",
717
- "minorgridcolor": "white",
718
- "startlinecolor": "#2a3f5f"
719
- },
720
- "baxis": {
721
- "endlinecolor": "#2a3f5f",
722
- "gridcolor": "white",
723
- "linecolor": "white",
724
- "minorgridcolor": "white",
725
- "startlinecolor": "#2a3f5f"
726
- },
727
- "type": "carpet"
728
- }
729
- ],
730
- "table": [
731
- {
732
- "cells": {
733
- "fill": {
734
- "color": "#EBF0F8"
735
- },
736
- "line": {
737
- "color": "white"
738
- }
739
- },
740
- "header": {
741
- "fill": {
742
- "color": "#C8D4E3"
743
- },
744
- "line": {
745
- "color": "white"
746
- }
747
- },
748
- "type": "table"
749
- }
750
- ],
751
- "barpolar": [
752
- {
753
- "marker": {
754
- "line": {
755
- "color": "#E5ECF6",
756
- "width": 0.5
757
- },
758
- "pattern": {
759
- "fillmode": "overlay",
760
- "size": 10,
761
- "solidity": 0.2
762
- }
763
- },
764
- "type": "barpolar"
765
- }
766
- ],
767
- "pie": [
768
- {
769
- "automargin": true,
770
- "type": "pie"
771
- }
772
- ]
773
- },
774
- "layout": {
775
- "autotypenumbers": "strict",
776
- "colorway": [
777
- "#636efa",
778
- "#EF553B",
779
- "#00cc96",
780
- "#ab63fa",
781
- "#FFA15A",
782
- "#19d3f3",
783
- "#FF6692",
784
- "#B6E880",
785
- "#FF97FF",
786
- "#FECB52"
787
- ],
788
- "font": {
789
- "color": "#2a3f5f"
790
- },
791
- "hovermode": "closest",
792
- "hoverlabel": {
793
- "align": "left"
794
- },
795
- "paper_bgcolor": "white",
796
- "plot_bgcolor": "#E5ECF6",
797
- "polar": {
798
- "bgcolor": "#E5ECF6",
799
- "angularaxis": {
800
- "gridcolor": "white",
801
- "linecolor": "white",
802
- "ticks": ""
803
- },
804
- "radialaxis": {
805
- "gridcolor": "white",
806
- "linecolor": "white",
807
- "ticks": ""
808
- }
809
- },
810
- "ternary": {
811
- "bgcolor": "#E5ECF6",
812
- "aaxis": {
813
- "gridcolor": "white",
814
- "linecolor": "white",
815
- "ticks": ""
816
- },
817
- "baxis": {
818
- "gridcolor": "white",
819
- "linecolor": "white",
820
- "ticks": ""
821
- },
822
- "caxis": {
823
- "gridcolor": "white",
824
- "linecolor": "white",
825
- "ticks": ""
826
- }
827
- },
828
- "coloraxis": {
829
- "colorbar": {
830
- "outlinewidth": 0,
831
- "ticks": ""
832
- }
833
- },
834
- "colorscale": {
835
- "sequential": [
836
- [
837
- 0.0,
838
- "#0d0887"
839
- ],
840
- [
841
- 0.1111111111111111,
842
- "#46039f"
843
- ],
844
- [
845
- 0.2222222222222222,
846
- "#7201a8"
847
- ],
848
- [
849
- 0.3333333333333333,
850
- "#9c179e"
851
- ],
852
- [
853
- 0.4444444444444444,
854
- "#bd3786"
855
- ],
856
- [
857
- 0.5555555555555556,
858
- "#d8576b"
859
- ],
860
- [
861
- 0.6666666666666666,
862
- "#ed7953"
863
- ],
864
- [
865
- 0.7777777777777778,
866
- "#fb9f3a"
867
- ],
868
- [
869
- 0.8888888888888888,
870
- "#fdca26"
871
- ],
872
- [
873
- 1.0,
874
- "#f0f921"
875
- ]
876
- ],
877
- "sequentialminus": [
878
- [
879
- 0.0,
880
- "#0d0887"
881
- ],
882
- [
883
- 0.1111111111111111,
884
- "#46039f"
885
- ],
886
- [
887
- 0.2222222222222222,
888
- "#7201a8"
889
- ],
890
- [
891
- 0.3333333333333333,
892
- "#9c179e"
893
- ],
894
- [
895
- 0.4444444444444444,
896
- "#bd3786"
897
- ],
898
- [
899
- 0.5555555555555556,
900
- "#d8576b"
901
- ],
902
- [
903
- 0.6666666666666666,
904
- "#ed7953"
905
- ],
906
- [
907
- 0.7777777777777778,
908
- "#fb9f3a"
909
- ],
910
- [
911
- 0.8888888888888888,
912
- "#fdca26"
913
- ],
914
- [
915
- 1.0,
916
- "#f0f921"
917
- ]
918
- ],
919
- "diverging": [
920
- [
921
- 0,
922
- "#8e0152"
923
- ],
924
- [
925
- 0.1,
926
- "#c51b7d"
927
- ],
928
- [
929
- 0.2,
930
- "#de77ae"
931
- ],
932
- [
933
- 0.3,
934
- "#f1b6da"
935
- ],
936
- [
937
- 0.4,
938
- "#fde0ef"
939
- ],
940
- [
941
- 0.5,
942
- "#f7f7f7"
943
- ],
944
- [
945
- 0.6,
946
- "#e6f5d0"
947
- ],
948
- [
949
- 0.7,
950
- "#b8e186"
951
- ],
952
- [
953
- 0.8,
954
- "#7fbc41"
955
- ],
956
- [
957
- 0.9,
958
- "#4d9221"
959
- ],
960
- [
961
- 1,
962
- "#276419"
963
- ]
964
- ]
965
- },
966
- "xaxis": {
967
- "gridcolor": "white",
968
- "linecolor": "white",
969
- "ticks": "",
970
- "title": {
971
- "standoff": 15
972
- },
973
- "zerolinecolor": "white",
974
- "automargin": true,
975
- "zerolinewidth": 2
976
- },
977
- "yaxis": {
978
- "gridcolor": "white",
979
- "linecolor": "white",
980
- "ticks": "",
981
- "title": {
982
- "standoff": 15
983
- },
984
- "zerolinecolor": "white",
985
- "automargin": true,
986
- "zerolinewidth": 2
987
- },
988
- "scene": {
989
- "xaxis": {
990
- "backgroundcolor": "#E5ECF6",
991
- "gridcolor": "white",
992
- "linecolor": "white",
993
- "showbackground": true,
994
- "ticks": "",
995
- "zerolinecolor": "white",
996
- "gridwidth": 2
997
- },
998
- "yaxis": {
999
- "backgroundcolor": "#E5ECF6",
1000
- "gridcolor": "white",
1001
- "linecolor": "white",
1002
- "showbackground": true,
1003
- "ticks": "",
1004
- "zerolinecolor": "white",
1005
- "gridwidth": 2
1006
- },
1007
- "zaxis": {
1008
- "backgroundcolor": "#E5ECF6",
1009
- "gridcolor": "white",
1010
- "linecolor": "white",
1011
- "showbackground": true,
1012
- "ticks": "",
1013
- "zerolinecolor": "white",
1014
- "gridwidth": 2
1015
- }
1016
- },
1017
- "shapedefaults": {
1018
- "line": {
1019
- "color": "#2a3f5f"
1020
- }
1021
- },
1022
- "annotationdefaults": {
1023
- "arrowcolor": "#2a3f5f",
1024
- "arrowhead": 0,
1025
- "arrowwidth": 1
1026
- },
1027
- "geo": {
1028
- "bgcolor": "white",
1029
- "landcolor": "#E5ECF6",
1030
- "subunitcolor": "white",
1031
- "showland": true,
1032
- "showlakes": true,
1033
- "lakecolor": "white"
1034
- },
1035
- "title": {
1036
- "x": 0.05
1037
- },
1038
- "mapbox": {
1039
- "style": "light"
1040
- }
1041
- }
1042
- },
1043
- "xaxis": {
1044
- "anchor": "y",
1045
- "domain": [
1046
- 0.0,
1047
- 1.0
1048
- ],
1049
- "title": {
1050
- "text": "Date"
1051
- },
1052
- "showgrid": true,
1053
- "gridcolor": "#e0e0e0",
1054
- "zeroline": false,
1055
- "tickformat": "%Y-%m-%d"
1056
- },
1057
- "yaxis": {
1058
- "anchor": "x",
1059
- "domain": [
1060
- 0.0,
1061
- 1.0
1062
- ],
1063
- "title": {
1064
- "text": "Count"
1065
- },
1066
- "showgrid": true,
1067
- "gridcolor": "#e0e0e0",
1068
- "zeroline": false
1069
- },
1070
- "legend": {
1071
- "title": {
1072
- "text": "Status"
1073
- },
1074
- "tracegroupgap": 0,
1075
- "orientation": "h",
1076
- "yanchor": "bottom",
1077
- "y": 1.02,
1078
- "xanchor": "right",
1079
- "x": 1
1080
- },
1081
- "title": {
1082
- "text": "Line Chart of Count Over Time by Status",
1083
- "font": {
1084
- "size": 20,
1085
- "family": "Arial",
1086
- "color": "#2c3e50"
1087
- },
1088
- "y": 0.95,
1089
- "x": 0.5,
1090
- "xanchor": "center",
1091
- "yanchor": "top"
1092
- },
1093
- "font": {
1094
- "family": "Arial",
1095
- "size": 12,
1096
- "color": "#333"
1097
- },
1098
- "plot_bgcolor": "#f5f6f5",
1099
- "paper_bgcolor": "#ffffff",
1100
- "showlegend": true
1101
- }
1102
- }
1103
  },
1104
  "finish_reason": "stop"
1105
  }
@@ -1112,4 +24,4 @@
1112
  "service_tier": "standard",
1113
  "system_fingerprint": "fp_1234567890"
1114
  }
1115
- ]
 
11
  "message_id": "msg_mock-123",
12
  "role": "assistant",
13
  "content": "## Result\n|status|count|\n|---|---|\n|active|100|\n|cancelled|30|\n|pending|40|\n|passive|150|\n\n## Explanation\nThis result represents the number of active, cancelled, pending and passive customers in the year 2025. This is a mock result for the question \"How many customers are active, cancelled, pending and passive in the year 2025?\"\n\n## Query\n```sql\nSELECT status, COUNT(*) FROM customers WHERE year = 2025 GROUP BY status;\n```",
14
+ "figure": {"data":[{"alignmentgroup":"True","customdata":[["North"],["North"],["South"]],"hovertemplate":"category=Category A\u003cbr\u003estatus=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003eregion=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"Category A","marker":{"color":"#636efa","pattern":{"shape":""}},"name":"Category A","offsetgroup":"Category A","orientation":"v","showlegend":true,"textposition":"auto","texttemplate":"%{y}","x":["active","in_review","pending_deletion"],"xaxis":"x","y":{"dtype":"i1","bdata":"Mh4P"},"yaxis":"y","type":"bar"},{"alignmentgroup":"True","customdata":[["South"],["West"]],"hovertemplate":"category=Category B\u003cbr\u003estatus=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003eregion=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"Category B","marker":{"color":"#EF553B","pattern":{"shape":""}},"name":"Category B","offsetgroup":"Category B","orientation":"v","showlegend":true,"textposition":"auto","texttemplate":"%{y}","x":["passive","newly_added"],"xaxis":"x","y":{"dtype":"i1","bdata":"Rhk="},"yaxis":"y","type":"bar"},{"alignmentgroup":"True","customdata":[["East"]],"hovertemplate":"category=Category C\u003cbr\u003estatus=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003eregion=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"Category C","marker":{"color":"#00cc96","pattern":{"shape":""}},"name":"Category C","offsetgroup":"Category C","orientation":"v","showlegend":true,"textposition":"auto","texttemplate":"%{y}","x":["archived"],"xaxis":"x","y":{"dtype":"i1","bdata":"Wg=="},"yaxis":"y","type":"bar"}],"layout":{"template":{"data":{"histogram2dcontour":[{"type":"histogram2dcontour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"choropleth":[{"type":"choropleth","colorbar":{"outlinewidth":0,"ticks":""}}],"histogram2d":[{"type":"histogram2d","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"heatmap":[{"type":"heatmap","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"contourcarpet":[{"type":"contourcarpet","colorbar":{"outlinewidth":0,"ticks":""}}],"contour":[{"type":"contour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"surface":[{"type":"surface","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"mesh3d":[{"type":"mesh3d","colorbar":{"outlinewidth":0,"ticks":""}}],"scatter":[{"fillpattern":{"fillmode":"overlay","size":10,"solidity":0.2},"type":"scatter"}],"parcoords":[{"type":"parcoords","line":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolargl":[{"type":"scatterpolargl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"bar":[{"error_x":{"color":"#2a3f5f"},"error_y":{"color":"#2a3f5f"},"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"scattergeo":[{"type":"scattergeo","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolar":[{"type":"scatterpolar","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"histogram":[{"marker":{"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"histogram"}],"scattergl":[{"type":"scattergl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatter3d":[{"type":"scatter3d","line":{"colorbar":{"outlinewidth":0,"ticks":""}},"marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermap":[{"type":"scattermap","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermapbox":[{"type":"scattermapbox","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterternary":[{"type":"scatterternary","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattercarpet":[{"type":"scattercarpet","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"carpet":[{"aaxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"baxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"type":"carpet"}],"table":[{"cells":{"fill":{"color":"#EBF0F8"},"line":{"color":"white"}},"header":{"fill":{"color":"#C8D4E3"},"line":{"color":"white"}},"type":"table"}],"barpolar":[{"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"pie":[{"automargin":true,"type":"pie"}]},"layout":{"autotypenumbers":"strict","colorway":["#636efa","#EF553B","#00cc96","#ab63fa","#FFA15A","#19d3f3","#FF6692","#B6E880","#FF97FF","#FECB52"],"font":{"color":"#2a3f5f"},"hovermode":"closest","hoverlabel":{"align":"left"},"paper_bgcolor":"white","plot_bgcolor":"#E5ECF6","polar":{"bgcolor":"#E5ECF6","angularaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"radialaxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"ternary":{"bgcolor":"#E5ECF6","aaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"baxis":{"gridcolor":"white","linecolor":"white","ticks":""},"caxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"coloraxis":{"colorbar":{"outlinewidth":0,"ticks":""}},"colorscale":{"sequential":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"sequentialminus":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"diverging":[[0,"#8e0152"],[0.1,"#c51b7d"],[0.2,"#de77ae"],[0.3,"#f1b6da"],[0.4,"#fde0ef"],[0.5,"#f7f7f7"],[0.6,"#e6f5d0"],[0.7,"#b8e186"],[0.8,"#7fbc41"],[0.9,"#4d9221"],[1,"#276419"]]},"xaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"yaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"scene":{"xaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"yaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"zaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2}},"shapedefaults":{"line":{"color":"#2a3f5f"}},"annotationdefaults":{"arrowcolor":"#2a3f5f","arrowhead":0,"arrowwidth":1},"geo":{"bgcolor":"white","landcolor":"#E5ECF6","subunitcolor":"white","showland":true,"showlakes":true,"lakecolor":"white"},"title":{"x":0.05},"mapbox":{"style":"light"}}},"xaxis":{"anchor":"y","domain":[0.0,1.0],"title":{"text":"Status"}},"yaxis":{"anchor":"x","domain":[0.0,1.0],"title":{"text":"Count"}},"legend":{"title":{"text":"Category"},"tracegroupgap":0},"title":{"text":"Bar Chart: Count by Status and Category","x":0.5},"barmode":"group"}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  },
16
  "finish_reason": "stop"
17
  }
 
24
  "service_tier": "standard",
25
  "system_fingerprint": "fp_1234567890"
26
  }
27
+ ]
resources/mock/chat_api_list_conversations.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "items": [
3
  {
4
- "completion_id": "682f026d-23e8-800f-90a1-a1399b85ae64",
5
  "title": "Customer status",
6
  "create_time": "2025-05-22T10:54:37.569747Z",
7
  "update_time": "2025-05-22T10:55:55.212705Z",
@@ -21,7 +21,7 @@
21
  "snippet": null
22
  },
23
  {
24
- "completion_id": "682ede89-cd84-800f-b80f-8389bcbee865",
25
  "title": "Ticket count by status",
26
  "create_time": "2025-05-22T08:21:30.215436Z",
27
  "update_time": "2025-05-22T08:22:54.867192Z",
@@ -41,7 +41,7 @@
41
  "snippet": null
42
  },
43
  {
44
- "completion_id": "682ec852-4014-800f-8a98-d257668a391e",
45
  "title": "Ticket comments count by customer",
46
  "create_time": "2025-05-22T06:46:42.703604Z",
47
  "update_time": "2025-05-22T06:50:05.464929Z",
 
1
  {
2
  "items": [
3
  {
4
+ "completion_id": "completion-001",
5
  "title": "Customer status",
6
  "create_time": "2025-05-22T10:54:37.569747Z",
7
  "update_time": "2025-05-22T10:55:55.212705Z",
 
21
  "snippet": null
22
  },
23
  {
24
+ "completion_id": "completion-002",
25
  "title": "Ticket count by status",
26
  "create_time": "2025-05-22T08:21:30.215436Z",
27
  "update_time": "2025-05-22T08:22:54.867192Z",
 
41
  "snippet": null
42
  },
43
  {
44
+ "completion_id": "completion-003",
45
  "title": "Ticket comments count by customer",
46
  "create_time": "2025-05-22T06:46:42.703604Z",
47
  "update_time": "2025-05-22T06:50:05.464929Z",
resources/mock/chat_api_list_messages.json CHANGED
@@ -3,21 +3,7 @@
3
  "message_id": "msg_mock-123",
4
  "role": "assistant",
5
  "content": "## Result\n|status|count|\n|---|---|\n|active|100|\n|cancelled|30|\n|pending|40|\n|passive|150|\n\n## Explanation\nThis result represents the number of active, cancelled, pending and passive customers in the year 2025. This is a mock result for the question \"How many customers are active, cancelled, pending and passive in the year 2025?\"\n\n## Query\n```sql\nSELECT status, COUNT(*) FROM customers WHERE year = 2025 GROUP BY status;\n```",
6
- "figure": {
7
- "data": [{
8
- "type": "bar",
9
- "x": ["active", "cancelled", "pending", "passive"],
10
- "y": [100, 30, 40, 150]
11
- }],
12
- "layout": {
13
- "title": "Customer Status",
14
- "xaxis": {
15
- "title": "Status"
16
- },
17
- "yaxis": {
18
- "title": "Count"
19
- }
20
- }
21
- }
22
  }
23
  ]
 
3
  "message_id": "msg_mock-123",
4
  "role": "assistant",
5
  "content": "## Result\n|status|count|\n|---|---|\n|active|100|\n|cancelled|30|\n|pending|40|\n|passive|150|\n\n## Explanation\nThis result represents the number of active, cancelled, pending and passive customers in the year 2025. This is a mock result for the question \"How many customers are active, cancelled, pending and passive in the year 2025?\"\n\n## Query\n```sql\nSELECT status, COUNT(*) FROM customers WHERE year = 2025 GROUP BY status;\n```",
6
+ "figure": {"data":[{"alignmentgroup":"True","customdata":[["North"],["North"],["South"]],"hovertemplate":"category=Category A\u003cbr\u003estatus=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003eregion=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"Category A","marker":{"color":"#636efa","pattern":{"shape":""}},"name":"Category A","offsetgroup":"Category A","orientation":"v","showlegend":true,"textposition":"auto","texttemplate":"%{y}","x":["active","in_review","pending_deletion"],"xaxis":"x","y":{"dtype":"i1","bdata":"Mh4P"},"yaxis":"y","type":"bar"},{"alignmentgroup":"True","customdata":[["South"],["West"]],"hovertemplate":"category=Category B\u003cbr\u003estatus=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003eregion=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"Category B","marker":{"color":"#EF553B","pattern":{"shape":""}},"name":"Category B","offsetgroup":"Category B","orientation":"v","showlegend":true,"textposition":"auto","texttemplate":"%{y}","x":["passive","newly_added"],"xaxis":"x","y":{"dtype":"i1","bdata":"Rhk="},"yaxis":"y","type":"bar"},{"alignmentgroup":"True","customdata":[["East"]],"hovertemplate":"category=Category C\u003cbr\u003estatus=%{x}\u003cbr\u003ecount=%{y}\u003cbr\u003eregion=%{customdata[0]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"Category C","marker":{"color":"#00cc96","pattern":{"shape":""}},"name":"Category C","offsetgroup":"Category C","orientation":"v","showlegend":true,"textposition":"auto","texttemplate":"%{y}","x":["archived"],"xaxis":"x","y":{"dtype":"i1","bdata":"Wg=="},"yaxis":"y","type":"bar"}],"layout":{"template":{"data":{"histogram2dcontour":[{"type":"histogram2dcontour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"choropleth":[{"type":"choropleth","colorbar":{"outlinewidth":0,"ticks":""}}],"histogram2d":[{"type":"histogram2d","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"heatmap":[{"type":"heatmap","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"contourcarpet":[{"type":"contourcarpet","colorbar":{"outlinewidth":0,"ticks":""}}],"contour":[{"type":"contour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"surface":[{"type":"surface","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"mesh3d":[{"type":"mesh3d","colorbar":{"outlinewidth":0,"ticks":""}}],"scatter":[{"fillpattern":{"fillmode":"overlay","size":10,"solidity":0.2},"type":"scatter"}],"parcoords":[{"type":"parcoords","line":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolargl":[{"type":"scatterpolargl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"bar":[{"error_x":{"color":"#2a3f5f"},"error_y":{"color":"#2a3f5f"},"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"scattergeo":[{"type":"scattergeo","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolar":[{"type":"scatterpolar","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"histogram":[{"marker":{"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"histogram"}],"scattergl":[{"type":"scattergl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatter3d":[{"type":"scatter3d","line":{"colorbar":{"outlinewidth":0,"ticks":""}},"marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermap":[{"type":"scattermap","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermapbox":[{"type":"scattermapbox","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterternary":[{"type":"scatterternary","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattercarpet":[{"type":"scattercarpet","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"carpet":[{"aaxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"baxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"type":"carpet"}],"table":[{"cells":{"fill":{"color":"#EBF0F8"},"line":{"color":"white"}},"header":{"fill":{"color":"#C8D4E3"},"line":{"color":"white"}},"type":"table"}],"barpolar":[{"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"pie":[{"automargin":true,"type":"pie"}]},"layout":{"autotypenumbers":"strict","colorway":["#636efa","#EF553B","#00cc96","#ab63fa","#FFA15A","#19d3f3","#FF6692","#B6E880","#FF97FF","#FECB52"],"font":{"color":"#2a3f5f"},"hovermode":"closest","hoverlabel":{"align":"left"},"paper_bgcolor":"white","plot_bgcolor":"#E5ECF6","polar":{"bgcolor":"#E5ECF6","angularaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"radialaxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"ternary":{"bgcolor":"#E5ECF6","aaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"baxis":{"gridcolor":"white","linecolor":"white","ticks":""},"caxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"coloraxis":{"colorbar":{"outlinewidth":0,"ticks":""}},"colorscale":{"sequential":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"sequentialminus":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"diverging":[[0,"#8e0152"],[0.1,"#c51b7d"],[0.2,"#de77ae"],[0.3,"#f1b6da"],[0.4,"#fde0ef"],[0.5,"#f7f7f7"],[0.6,"#e6f5d0"],[0.7,"#b8e186"],[0.8,"#7fbc41"],[0.9,"#4d9221"],[1,"#276419"]]},"xaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"yaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"scene":{"xaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"yaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"zaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2}},"shapedefaults":{"line":{"color":"#2a3f5f"}},"annotationdefaults":{"arrowcolor":"#2a3f5f","arrowhead":0,"arrowwidth":1},"geo":{"bgcolor":"white","landcolor":"#E5ECF6","subunitcolor":"white","showland":true,"showlakes":true,"lakecolor":"white"},"title":{"x":0.05},"mapbox":{"style":"light"}}},"xaxis":{"anchor":"y","domain":[0.0,1.0],"title":{"text":"Status"}},"yaxis":{"anchor":"x","domain":[0.0,1.0],"title":{"text":"Count"}},"legend":{"title":{"text":"Category"},"tracegroupgap":0},"title":{"text":"Bar Chart: Count by Status and Category","x":0.5},"barmode":"group"}}
7
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  }
9
  ]
static/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "name": "Data Chatbot",
3
  "short_name": "Chatbot",
4
  "description": "A chatbot interface for data visualization and analysis",
5
  "start_url": "/ui",
@@ -18,4 +18,4 @@
18
  "type": "image/png"
19
  }
20
  ]
21
- }
 
1
  {
2
+ "name": "Talk To Your Data Chatbot",
3
  "short_name": "Chatbot",
4
  "description": "A chatbot interface for data visualization and analysis",
5
  "start_url": "/ui",
 
18
  "type": "image/png"
19
  }
20
  ]
21
+ }