Interface AIController
- All Known Implementing Classes:
ChartAIController,GridAIController
Controllers provide domain-specific tools and functionality to the AI orchestrator. Tools are functions that the AI can call to perform actions like querying databases, creating visualizations, filling forms, etc.
Controllers are not serialized with the orchestrator. After
deserialization, restore controllers via
reconnect(provider).withController(controller).apply().
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptiongetTools()Returns the tools this controller provides to the LLM.voidCalled by the orchestrator when an LLM request cycle has completed.
-
Method Details
-
getTools
List<LLMProvider.ToolSpec> getTools()Returns the tools this controller provides to the LLM.Tools are functions that the AI can call to perform actions. Each tool should have a clear name, description, and parameter schema.
- Returns:
- list of tools, or empty list if controller provides no tools
-
onRequestCompleted
void onRequestCompleted()Called by the orchestrator when an LLM request cycle has completed.This method is invoked after all tool executions for a given user request have finished and the LLM has generated its final response. Controllers can use this callback to perform deferred operations, such as rendering UI updates or committing state changes.
-