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.2.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: llama_index_llms_databricks-0.2.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for llama_index_llms_databricks-0.2.1.tar.gz
Algorithm Hash digest
SHA256 641ea1ce3b46a6dd6bce33eddfa902117ed758e2d143fe36db330ba91088d8b1
MD5 a82162e8bd7c6570a52530a726a1cddb
BLAKE2b-256 651aaafeef6a3f67f266c1a9838b64ccd12cc05ae9f3f6d906d718a9671ad367

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_databricks-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5969a945bdbc85ce3ff46e8d0887065c92bdc10bcefa947a831eb278bd1bc528
MD5 eaf4420490b2851264cb4d1f9f821fd2
BLAKE2b-256 787bc4901c5087c3ca20e294fdf7b20b737aba9ec24713db9c4c665228626996

See more details on using hashes here.

Supported by

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