Class QueryExecutorAiTools
java.lang.Object
com.vaadin.flow.component.ai.provider.QueryExecutorAiTools
Factory for creating reusable database
LlmProvider.ToolSpec
instances. These tools can be used by any controller that works with a
QueryExecutor.- Since:
- 25.3
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<LlmProvider.ToolSpec> createAll(QueryExecutor queryExecutor) Creates all query executor tools for the given executor.static LlmProvider.ToolSpecgetDatabaseSchema(QueryExecutor queryExecutor) Creates a tool that retrieves the database schema from theQueryExecutor.
-
Method Details
-
getDatabaseSchema
Creates a tool that retrieves the database schema from theQueryExecutor.- Parameters:
queryExecutor- the query executor, notnull- Returns:
- the tool definition, never
null
-
createAll
Creates all query executor tools for the given executor.- Parameters:
queryExecutor- the query executor, notnull- Returns:
- a list of all query executor tools, never
null
-