Class QueryExecutorAiTools

java.lang.Object
com.vaadin.flow.component.ai.provider.QueryExecutorAiTools

public final class QueryExecutorAiTools extends Object
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 Details

    • getDatabaseSchema

      public static LlmProvider.ToolSpec getDatabaseSchema(QueryExecutor queryExecutor)
      Creates a tool that retrieves the database schema from the QueryExecutor.
      Parameters:
      queryExecutor - the query executor, not null
      Returns:
      the tool definition, never null
    • createAll

      public static List<LlmProvider.ToolSpec> createAll(QueryExecutor queryExecutor)
      Creates all query executor tools for the given executor.
      Parameters:
      queryExecutor - the query executor, not null
      Returns:
      a list of all query executor tools, never null