Metadata-Version: 2.1
Name: llama-index-llms-databricks
Version: 0.1.0
Summary: llama-index llms databricks integration
License: MIT
Author: Abdulaziz Almuhaidib
Author-email: abdulaziz.almuhaidib.97@gmail.com
Requires-Python: >=3.8.1,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: llama-index-core (>=0.10.0,<0.11.0)
Requires-Dist: llama-index-llms-openai-like (>=0.1.3,<0.2.0)
Description-Content-Type: text/markdown

# LlamaIndex Llms Integration: Databricks

## Overview

Integrate with DataBricks LLMs APIs.

## Installation

```bash
pip install llama-index-llms-databricks
```

## Example

With environmental variables.

```.env
DATABRICKS_API_KEY=your_api_key
DATABRICKS_API_BASE=https://[your-work-space].cloud.databricks.com/serving-endpoints/[your-serving-endpoint]
```

```python
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

```python
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/[your-serving-endpoint]",
)

# Call the complete method with a query
response = llm.complete("Explain the importance of open source LLMs")

print(response)
```

