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.3.0.tar.gz
.
File metadata
- Download URL: llama_index_llms_databricks-0.3.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 160868d68eb48e2a71aee3fc826c4d280aebce6035d6fce94008e21e7b3bad6a |
|
MD5 | 303a0182ebdfb5cb9d2b1c20413f9021 |
|
BLAKE2b-256 | fe995b52a82f2a0fbffc0bb5aeadd7b2254b6fcfe7a215e6ea4962c299278a6c |
File details
Details for the file llama_index_llms_databricks-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_llms_databricks-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e600eff3c4fefe7c23ecc62c39389a45f27b8ca61769ff604dcc3196b48991f7 |
|
MD5 | dfe336eb85d521b79bfa2360e5334ef3 |
|
BLAKE2b-256 | a8c7114ecd8de13fc18cf0f72890b53e92da13bc4a36ebebcfd97df4446a3d75 |