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_API_KEY=your_api_key
DATABRICKS_API_BASE=https://[your-work-space].cloud.databricks.com/serving-endpoints/[your-serving-endpoint]
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/[your-serving-endpoint]",
)
# 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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2716236d51492e0fc1b6476cab1315f5738f7fe72f33eda6e9ae2e03324b3810 |
|
MD5 | 5f83a8bb5867f92c43b68fd31f8c0009 |
|
BLAKE2b-256 | 2e784112e7e2b2d71959f9da92f8f4c48ae8ed47d703b1570fd18c571ffccfa5 |
Close
Hashes for llama_index_llms_databricks-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90296a0087c26e4aca74df709d744f805af3ad9fab727d2321bd4b0c8b2bed49 |
|
MD5 | a96bfe0a0113de1107ddcef7f525c4e8 |
|
BLAKE2b-256 | b58e81a88ed1e3dfdd7996b885a1bafa4001e841c78a717af982365101ac0341 |