Skip to main content

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

llama_index_llms_databricks-0.3.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_llms_databricks-0.3.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_llms_databricks-0.3.2.tar.gz.

File metadata

File hashes

Hashes for llama_index_llms_databricks-0.3.2.tar.gz
Algorithm Hash digest
SHA256 de11651007ef40b363ba70ded929d98966dc3192d23e494d3ac1cb517ac6ace4
MD5 068c3d084c231a4b0d7fe5f374fffc40
BLAKE2b-256 4e1cac93afb1cea881320ef086b66ba49435847589484b0a2edee0ea246f7a40

See more details on using hashes here.

File details

Details for the file llama_index_llms_databricks-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_llms_databricks-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8399f5bb9bef540d66c17b9abb266ef4500ac596c496d8857053e3b999991bde
MD5 1e582dc14ee85f5a0c99e7f8db801a3f
BLAKE2b-256 e474ed7e393ea5365a95bbe2852dcd3a3350ee4c0a7f1fc5690c7f45abe48e8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page