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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for llama_index_llms_databricks-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2dc2dcb4f2f313fec0fcec25af8dc435a76a51f017983a326050e9bdc980d46f
MD5 45f3df77dc0c98e63037ce75e1263d49
BLAKE2b-256 04f834618a61be3b446e2fc6c2b9b74e77b3a5084f9a6c0a1f1a3186ce002612

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_databricks-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc79a9f9468c1b5f614b36be6c02f8fcfa1dd29dcb3a1aea8c0a9d6fc538671a
MD5 4546d64868234fbcb5596d997924583f
BLAKE2b-256 6c59138ddcb125fd2c6982d266dea244b4094579d913e657fdf32b0075d23fb0

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