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.4.1.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.4.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_llms_databricks-0.4.1.tar.gz
Algorithm Hash digest
SHA256 37b320720b9e45c2b5c751662e920dffed9e0f82431a48b748d1724193454d18
MD5 63d70a72bc9ac29a1c8c2ac240088b0f
BLAKE2b-256 95018a66763981cdfea297d6c3c6012ec989df95eaca87dd5ca596a0dc1f7486

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_databricks-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5ca1a13bd333e358044e3a5024ff4b85ca783a32550f951393e421f0faee2141
MD5 47871aa9e1352294f267129195fa5270
BLAKE2b-256 45d2c6817fd9c7653d3793c3f1317e251eb5d8b32ea97b422c1b7cfb9d72757d

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