#171 — Migrate KPI tiles to new proposed schema for Widgets

Repo: Twill-AI/twill-llm-engine State: closed | Status: done Assignee: meliascosta

Created: 2024-10-21 · Updated: 2024-11-20

Description

This is the twill-llm-engine side of a task for a general refactor of the widget structure to incorporate KPI tiles in a similar way as existing Echarts type. (see https://github.com/Twill-AI/facade/issues/139)

New structure:

class ChatResponseWidget:
    """Response with Widget code in chat."""
 
    type: Literal["echarts", "kpi", "table"]
    code: str
    sql_query: str
    headers: List[str]
    rows: List[List[Any]]
    name: str
    values_update_interval_sec: int

AC:

  • Interface is modified so ChatResponseEcharts object is now ChatResponseWidget with corresponding fields
  • KPI tile chain has been updated to accomodate the new output structure
  • Interface is modified so ChatResponseTable object is now ChatResponseWidget with corresponding fields
  • Conflluence documentation has been updated to remove the KPI tile message and the ChatResponseEcharts message has been renamed to reflect the new data structure

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets