Package com.basis.api.admin
Class BBjAdminAIConfig
java.lang.Object
com.basis.api.admin.BBjAdminAIConfig
- All Implemented Interfaces:
Serializable
Configuration for the Basis AI natural-language-to-SQL library.
Use the provider constants to choose an LLM back-end, then configure the matching nested config object:
BBjAdminAIConfig cfg = new BBjAdminAIConfig();
cfg.setActiveProvider(BBjAdminAIConfig.PROVIDER_OPENAI);
cfg.getOpenai().setApiKey("sk-...");
cfg.getOpenai().setModelName("gpt-4o");
cfg.getLucene().setIndexPath("/var/bbj/ai-index");
Credential values written to disk via
BBjAdminAI.saveConfig() / BBjAdminAI.saveConfig(String) are
encrypted with AES-256-GCM before being stored.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfiguration for the Anthropic Claude provider.static classConfiguration for the Google Gemini provider.static classConfiguration for the GitHub Copilot / GitHub Models provider.static classConfiguration for the JSON-backed vector store that stores schema embeddings.static classConfiguration for the OpenAI provider (ChatGPT). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAnthropic Claude models (claude-3-5-sonnet-…, …).static final StringGoogle AI Gemini models (gemini-2.0-flash, gemini-1.5-pro, …).static final StringGitHub Models via OpenAI-compatible API.static final StringOpenAI ChatGPT models (gpt-4o, gpt-4o-mini, …). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the active LLM provider name.Returns the Anthropic provider configuration block.Returns the Google Gemini provider configuration block.Returns the default system prompt used for general (BBjAdminAI.sendPrompt(String)) calls.Returns the GitHub Copilot / GitHub Models provider configuration block.Returns the schema vector store configuration block.Returns the OpenAI provider configuration block.Returns the system prompt prepended to every SQL-generation (BBjAdminAI.buildQuery(java.lang.String)) call.voidsetActiveProvider(String activeProvider) Sets the active LLM provider.voidsetAnthropic(BBjAdminAIConfig.Anthropic anthropic) voidsetGemini(BBjAdminAIConfig.Gemini gemini) voidsetGeneralSystemPrompt(String generalSystemPrompt) voidsetGithubCopilot(BBjAdminAIConfig.GitHubCopilot githubCopilot) voidsetLucene(BBjAdminAIConfig.Lucene lucene) voidsetOpenai(BBjAdminAIConfig.OpenAI openai) voidsetSqlSystemPrompt(String sqlSystemPrompt)
-
Field Details
-
PROVIDER_OPENAI
OpenAI ChatGPT models (gpt-4o, gpt-4o-mini, …).- See Also:
-
PROVIDER_GEMINI
Google AI Gemini models (gemini-2.0-flash, gemini-1.5-pro, …).- See Also:
-
PROVIDER_ANTHROPIC
Anthropic Claude models (claude-3-5-sonnet-…, …).- See Also:
-
PROVIDER_GITHUB_COPILOT
GitHub Models via OpenAI-compatible API. Requires a GitHub personal access token withmodels:readpermission.- See Also:
-
-
Constructor Details
-
BBjAdminAIConfig
public BBjAdminAIConfig()
-
-
Method Details
-
getActiveProvider
Returns the active LLM provider name. Matches one of thePROVIDER_*constants defined on this class. -
setActiveProvider
Sets the active LLM provider. Use one of thePROVIDER_*constants defined on this class (e.g.PROVIDER_OPENAI). -
getOpenai
Returns the OpenAI provider configuration block. -
setOpenai
-
getAnthropic
Returns the Anthropic provider configuration block. -
setAnthropic
-
getGemini
Returns the Google Gemini provider configuration block. -
setGemini
-
getGithubCopilot
Returns the GitHub Copilot / GitHub Models provider configuration block. -
setGithubCopilot
-
getLucene
Returns the schema vector store configuration block. -
setLucene
-
getSqlSystemPrompt
Returns the system prompt prepended to every SQL-generation (BBjAdminAI.buildQuery(java.lang.String)) call. Override to inject database-specific hints or dialect notes. -
setSqlSystemPrompt
-
getGeneralSystemPrompt
Returns the default system prompt used for general (BBjAdminAI.sendPrompt(String)) calls. -
setGeneralSystemPrompt
-