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.1.tar.gz (2.5 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.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llama_index_llms_databricks-0.3.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.3.1.tar.gz
Algorithm Hash digest
SHA256 29f7889aab10537f44a23481738cf69264e58ed6b3b997116bfa996418bce723
MD5 22867b2cb91bf3bd8b4cfd30e905558d
BLAKE2b-256 00a2a0f3551ea3d5652f4bb8c6aca1412fd04a686f268406fc26a57b0e4e9fe4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_databricks-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 beec7afb5269395fe299fe4c19baac9fbc5e174605d00392bb52c3eb309b65bc
MD5 9aad1c4f14c6a51808ec169e01558b60
BLAKE2b-256 0388b35df4374c8a59d1636d5e1b6fced31402ebb643626f32913c491e407bd0

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