llama-index llms databricks integration
Project description
LlamaIndex Llms Integration: Databricks
Overview
Integrate with Databricks LLMs APIs.
Installation
pip install llama-index-llms-databricks
Example
With environmental variables.
DATABRICKS_TOKEN=your_api_key
DATABRICKS_SERVING_ENDPOINT=https://[your-work-space].cloud.databricks.com/serving-endpoints
from llama_index.llms.databricks import Databricks
# Initialize Databricks LLM without explicitly passing the API key and base
llm = Databricks(model="databricks-dbrx-instruct")
# Make a query to the LLM
response = llm.complete("Explain the importance of open source LLMs")
print(response)
Without environmental variables
from llama_index.llms.databricks import Databricks
# Set up the Databricks class with the required model, API key and serving endpoint
llm = Databricks(
model="databricks-dbrx-instruct",
api_key="your_api_key",
api_base="https://[your-work-space].cloud.databricks.com/serving-endpoints",
)
# Call the complete method with a query
response = llm.complete("Explain the importance of open source LLMs")
print(response)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_llms_databricks-0.3.2.tar.gz.
File metadata
- Download URL: llama_index_llms_databricks-0.3.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de11651007ef40b363ba70ded929d98966dc3192d23e494d3ac1cb517ac6ace4
|
|
| MD5 |
068c3d084c231a4b0d7fe5f374fffc40
|
|
| BLAKE2b-256 |
4e1cac93afb1cea881320ef086b66ba49435847589484b0a2edee0ea246f7a40
|
File details
Details for the file llama_index_llms_databricks-0.3.2-py3-none-any.whl.
File metadata
- Download URL: llama_index_llms_databricks-0.3.2-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8399f5bb9bef540d66c17b9abb266ef4500ac596c496d8857053e3b999991bde
|
|
| MD5 |
1e582dc14ee85f5a0c99e7f8db801a3f
|
|
| BLAKE2b-256 |
e474ed7e393ea5365a95bbe2852dcd3a3350ee4c0a7f1fc5690c7f45abe48e8f
|