Class DatabaseProviderAITools

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

public final class DatabaseProviderAITools extends Object
Factory for creating reusable database LLMProvider.ToolSpec instances. These tools can be used by any controller that works with a DatabaseProvider.
Author:
Vaadin Ltd
  • Method Details

    • getDatabaseSchema

      public static LLMProvider.ToolSpec getDatabaseSchema(DatabaseProvider provider)
      Creates a tool that retrieves the database schema from the DatabaseProvider.
      Parameters:
      provider - the database provider, not null
      Returns:
      the tool definition, never null
    • createAll

      public static List<LLMProvider.ToolSpec> createAll(DatabaseProvider provider)
      Creates all database provider tools for the given provider.
      Parameters:
      provider - the database provider, not null
      Returns:
      a list of all database provider tools, never null