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
Close
Hashes for llama_index_llms_databricks-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8284011f4844579ded455db294d074bdd306a2b6f6fd1c42917e7cf668a1b982 |
|
MD5 | 8c4a2674c931d615c82a602f6914cf26 |
|
BLAKE2b-256 | 3a44f0657b7bb8e2bf55862a2da8714c40e3235fe88f2702437da787d4b643f7 |
Close
Hashes for llama_index_llms_databricks-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ce8b25db29792fed60f5a8315ebc20e1ee60fc718b80edeea755b3a8cca4f3a |
|
MD5 | b31c554c7a73c98c8cd42bd75aed93f2 |
|
BLAKE2b-256 | c8c0c554a02bdec856c0581d24dd3bdeafb8497fd0c93ba1b5860a90183e8e6c |