Skip to content

Commit

Permalink
add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sr-remsha committed Jan 24, 2025
1 parent 1745545 commit d04ce07
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 0 deletions.
Binary file added docs/tutorials/img/databricks1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorials/img/databricks2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorials/img/databricks4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions docs/tutorials/use-databricks-model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Using Databricks Models in AI DIAL

From this document you can learn how to use Databricks models in AI DIAL.

## Configure Databricks

### Step 1 (Optional): Create Serving Endpoint

Create a serving endpoint for a Databricks model unless you already have one:

1. In the **Machine Learning** section, navigate to the **Serving** tab and click **Create serving endpoint**.

![](img/databricks1.png)

2. Enter a serving endpoint name (it will be used in the [Step 4](#step-4-configure-openai-adapter)) and select the served Entity (model).

![](img/databricks2.png)

3. Click **Create**

### Step 2: Create Access Token

To generate access token, navigate to the **Developer** section in your **User Settings**.

![](img/databricks4.png)

## Configure AI DIAL

### Step 3: Configure AI DIAL Model

Use the serving endpoint and the access token you have created in two previous steps to add the following configuration in the [DIAL Core dynamic settings](https://github.com/epam/ai-dial-core?tab=readme-ov-file#dynamic-settings) to the `model` section:

```json
"{dial-deployment-name}":
{
"type": "chat",
"displayName": "{Deployment name}",
"endpoint": "http://{open-ai-adapter-host}/openai/deployments/{databricks-deployment-name}/chat/completions",
"upstreams": [
{
"endpoint": "{databricks-account-address}/serving-endpoints/chat/completions",
"key": "access token"
}
]
}
```
### Step 4: Configure OpenAI Adapter

1. Since Databricks serving endpoints utilize an authorization flow that differs from OpenAI's, it's necessary to specify the Databricks deployments in the OpenAI Adapter environment variable: `DATABRICKS_DEPLOYMENTS=databricks-deployment-name`. Refer to [AI DIAL OpenAI adapter documentation](https://github.com/epam/ai-dial-adapter-openai?tab=readme-ov-file#categories-of-deployments) for details.
2. Restart AI DIAL OpenAI Adapter for changes to apply.
5 changes: 5 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ const sidebars = {
type: 'doc',
id: 'tutorials/custom-buttons',
label: 'Custom Buttons in Apps',
},
{
type: 'doc',
id: 'tutorials/use-databricks-model',
label: 'Using Databricks Models in AI DIAL',
}
],
},
Expand Down

0 comments on commit d04ce07

Please sign in to comment.