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
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
File details
Details for the file llama_index_llms_databricks-0.2.0.tar.gz
.
File metadata
- Download URL: llama_index_llms_databricks-0.2.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dc2dcb4f2f313fec0fcec25af8dc435a76a51f017983a326050e9bdc980d46f |
|
MD5 | 45f3df77dc0c98e63037ce75e1263d49 |
|
BLAKE2b-256 | 04f834618a61be3b446e2fc6c2b9b74e77b3a5084f9a6c0a1f1a3186ce002612 |
File details
Details for the file llama_index_llms_databricks-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_llms_databricks-0.2.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc79a9f9468c1b5f614b36be6c02f8fcfa1dd29dcb3a1aea8c0a9d6fc538671a |
|
MD5 | 4546d64868234fbcb5596d997924583f |
|
BLAKE2b-256 | 6c59138ddcb125fd2c6982d266dea244b4094579d913e657fdf32b0075d23fb0 |