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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_llms_databricks-0.4.0.tar.gz
Algorithm Hash digest
SHA256 361f4d7eecf11129e5c6990369e27e4b557353ecd6a462363f886f67102563ec
MD5 c0de818b61f445763dbe56b63439efc7
BLAKE2b-256 58de27da37e3211144f3f53cc916c04e9d6645dd80078d94f4cc5eb810d0b6b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_databricks-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 725f03fdc3748d07a04929477e52b594f14de18bbc30b43b8f85ac88e69ea8df
MD5 907a156a4a926438282c2b85d339883c
BLAKE2b-256 3a8f10932972d52e135aa866ce14784408c9293f3bedf401f0102bb27ec32346

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