Interface ChartAITools.Callbacks

All Superinterfaces:
Serializable
Enclosing class:
ChartAITools

public static interface ChartAITools.Callbacks extends Serializable
Callback interface that chart tool consumers must implement to provide chart state access and mutation operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the set of available chart IDs.
    getState(String chartId)
    Returns the current state of a chart including its Highcharts configuration and SQL queries.
    void
    updateConfiguration(String chartId, String configJson)
    Updates the chart's Highcharts configuration (type, title, tooltip, axes, legend, etc.).
    void
    updateData(String chartId, List<String> queries)
    Validates and executes SQL SELECT queries that populate the chart series data.
  • Method Details

    • getState

      String getState(String chartId)
      Returns the current state of a chart including its Highcharts configuration and SQL queries. The returned JSON string should contain the chart configuration and the SQL queries used to populate the chart series. Should throw if the chart is not found.
      Parameters:
      chartId - the chart ID
      Returns:
      the chart state as a JSON string containing the Highcharts configuration and SQL queries
    • updateConfiguration

      void updateConfiguration(String chartId, String configJson)
      Updates the chart's Highcharts configuration (type, title, tooltip, axes, legend, etc.). The configuration should not include series data, as that is managed separately via updateData(String, List). Changes are applied when the LLM request completes. Should throw if the chart is not found.
      Parameters:
      chartId - the chart ID
      configJson - the Highcharts configuration as a JSON string, excluding series data
    • updateData

      void updateData(String chartId, List<String> queries)
      Validates and executes SQL SELECT queries that populate the chart series data. Each query corresponds to one chart series. Should throw if the chart is not found or if any query is invalid.
      Parameters:
      chartId - the chart ID
      queries - SQL SELECT queries, one per chart series
    • getChartIds

      Set<String> getChartIds()
      Returns the set of available chart IDs.
      Returns:
      the chart IDs, never null