Interface ChartAITools.Callbacks
- All Superinterfaces:
Serializable
- Enclosing class:
ChartAITools
Callback interface that chart tool consumers must implement to provide
chart state access and mutation operations.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the set of available chart IDs.Returns the current state of a chart including its Highcharts configuration and SQL queries.voidupdateConfiguration(String chartId, String configJson) Updates the chart's Highcharts configuration (type, title, tooltip, axes, legend, etc.).voidupdateData(String chartId, List<String> queries) Validates and executes SQL SELECT queries that populate the chart series data.
-
Method Details
-
getState
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
Updates the chart's Highcharts configuration (type, title, tooltip, axes, legend, etc.). The configuration should not include series data, as that is managed separately viaupdateData(String, List). Changes are applied when the LLM request completes. Should throw if the chart is not found.- Parameters:
chartId- the chart IDconfigJson- the Highcharts configuration as a JSON string, excluding series data
-
updateData
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 IDqueries- SQL SELECT queries, one per chart series
-
getChartIds
Returns the set of available chart IDs.- Returns:
- the chart IDs, never
null
-