Skip to content

Commit ab6c7bb

Browse files
authored
add doc (#225)
1 parent 1745545 commit ab6c7bb

File tree

5 files changed

+55
-0
lines changed

5 files changed

+55
-0
lines changed

docs/tutorials/img/databricks1.png

105 KB
Loading

docs/tutorials/img/databricks2.png

74 KB
Loading

docs/tutorials/img/databricks4.png

34.8 KB
Loading
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Using Databricks Models in AI DIAL
2+
3+
From this document you can learn how to use Databricks models in AI DIAL.
4+
5+
## Configure Databricks
6+
7+
### Step 1 (Optional): Create Serving Endpoint
8+
9+
Create a serving endpoint for a Databricks model unless you already have one:
10+
11+
1. In the **Machine Learning** section, navigate to the **Serving** tab and click **Create serving endpoint**.
12+
13+
![](img/databricks1.png)
14+
15+
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).
16+
17+
![](img/databricks2.png)
18+
19+
3. Click **Create**
20+
21+
### Step 2: Create Access Token
22+
23+
To generate access token, navigate to the **Developer** section in your **User Settings**.
24+
25+
![](img/databricks4.png)
26+
27+
## Configure AI DIAL
28+
29+
### Step 3: Configure AI DIAL Model
30+
31+
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:
32+
33+
```json
34+
"{dial-deployment-name}":
35+
{
36+
"type": "chat",
37+
"displayName": "{Deployment name}",
38+
"endpoint": "http://{open-ai-adapter-host}/openai/deployments/{databricks-deployment-name}/chat/completions",
39+
"upstreams": [
40+
{
41+
"endpoint": "{databricks-account-address}/serving-endpoints/chat/completions",
42+
"key": "access token"
43+
}
44+
]
45+
}
46+
```
47+
### Step 4: Configure OpenAI Adapter
48+
49+
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.
50+
2. Restart AI DIAL OpenAI Adapter for changes to apply.

sidebars.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,11 @@ const sidebars = {
193193
type: 'doc',
194194
id: 'tutorials/custom-buttons',
195195
label: 'Custom Buttons in Apps',
196+
},
197+
{
198+
type: 'doc',
199+
id: 'tutorials/use-databricks-model',
200+
label: 'Using Databricks Models in AI DIAL',
196201
}
197202
],
198203
},

0 commit comments

Comments
 (0)