Class DatabricksClient
- All Implemented Interfaces:
com.tnsai.llm.LLMClient
Databricks hosts foundation models (DBRX, Llama, Mixtral, plus
customer-fine-tuned models) behind workspace-scoped serving
endpoints. The Foundation Model API exposes an OpenAI-compatible
chat-completions surface — same wire format as GroqClient /
XAIGrokClient / YiClient.
Workspace-scoped URL. Unlike the multi-tenant cloud
providers (xAI, Yi, Hunyuan), Databricks endpoints live on a
per-customer hostname:
https://{workspace}.cloud.databricks.com/serving-endpoints.
There is no universally-correct default — every caller must supply
their workspace URL via the DATABRICKS_BASE_URL env var or
the constructor's baseUrl argument.
Supported models (built-in catalog at time of writing):
- databricks-meta-llama-3-3-70b-instruct — frontier Llama 3.3
- databricks-meta-llama-3-1-405b-instruct — largest Llama 3.1
- databricks-dbrx-instruct — Databricks's own DBRX
- databricks-mixtral-8x7b-instruct — Mixtral MoE
Customers can also point this client at their own fine-tuned
endpoints by passing the endpoint name as the model
argument — Databricks resolves it relative to the workspace.
Configuration via environment variables:
DATABRICKS_API_KEY— Required. Either a Personal Access Token (PAT) or a service-principal OAuth token. v1 supports both as opaque bearer tokens; native service-principal OAuth flows can land as a follow-up.DATABRICKS_BASE_URL— Required. The full workspace-scoped URL up to and including/serving-endpoints.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDatabricksClient(String model) DatabricksClient(String model, float temperature) DatabricksClient(String model, float temperature, Float topP, Integer maxTokens) DatabricksClient(String model, float temperature, Integer maxTokens) DatabricksClient(String baseUrl, String model, float temperature, Float topP, Integer maxTokens, String apiKey) DatabricksClient(String baseUrl, String model, float temperature, Integer maxTokens, String apiKey) -
Method Summary
Methods inherited from class com.tnsai.llm.providers.AbstractOpenAICompatibleClient
chat, streamChatMethods inherited from class com.tnsai.llm.providers.AbstractLLMClient
getBaseUrl, getCallTimeoutMs, getMaxTokens, getModel, getTemperature, getTopPMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tnsai.llm.LLMClient
chat, chat, chat, chat, chat, getCapabilities, getProviderName, listModels, streamChat, streamChat, streamChatWithHandler, streamChatWithHandler, streamChatWithSpec, streamChatWithSpec
-
Constructor Details
-
DatabricksClient
-
DatabricksClient
-
DatabricksClient
-
DatabricksClient
-
DatabricksClient
-
DatabricksClient
-