Skip to content

Commit 0be7a0e

Browse files
Add connector endpoint to trusted URLs step and remove stream parameter
Signed-off-by: Nathalie Jonathan <[email protected]>
1 parent d05674a commit 0be7a0e

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

docs/remote_inference_blueprints/deepseek_connector_chat_blueprint.md

+20-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,20 @@
22
This blueprint integrates [DeepSeek Chat Model](https://api-docs.deepseek.com/api/create-chat-completion) for question-answering capabilities for standalone interactions. Full conversational functionality requires additional development.
33
Adapt and extend this blueprint as needed for your specific use case.
44

5-
## 1. Create connector for DeepSeek Chat:
5+
## 1. Add connector endpoint to trusted URLs:
6+
Note: skip this step starting 2.19.0
7+
8+
```json
9+
PUT /_cluster/settings
10+
{
11+
"persistent": {
12+
"plugins.ml_commons.trusted_connector_endpoints_regex": [
13+
"^https://api\\.deepseek\\.com/.*$"
14+
]
15+
}
16+
}
17+
```
18+
## 2. Create connector for DeepSeek Chat:
619

720
```json
821
POST /_plugins/_ml/connectors/_create
@@ -13,8 +26,7 @@ POST /_plugins/_ml/connectors/_create
1326
"protocol": "http",
1427
"parameters": {
1528
"endpoint": "api.deepseek.com",
16-
"model": "deepseek-chat",
17-
"stream": false
29+
"model": "deepseek-chat"
1830
},
1931
"credential": {
2032
"deepSeek_key": "<PLEASE ADD YOUR DEEPSEEK API KEY HERE>"
@@ -28,7 +40,7 @@ POST /_plugins/_ml/connectors/_create
2840
"Content-Type": "application/json",
2941
"Authorization": "Bearer ${credential.deepSeek_key}"
3042
},
31-
"request_body": "{ \"model\": \"${parameters.model}\", \"messages\": ${parameters.messages}, \"stream\":${parameters.stream} }"
43+
"request_body": "{ \"model\": \"${parameters.model}\", \"messages\": ${parameters.messages} }"
3244
}
3345
]
3446
}
@@ -41,7 +53,7 @@ POST /_plugins/_ml/connectors/_create
4153
}
4254
```
4355

44-
## 2. Create model group:
56+
## 3. Create model group:
4557

4658
```json
4759
POST /_plugins/_ml/model_groups/_register
@@ -59,7 +71,7 @@ POST /_plugins/_ml/model_groups/_register
5971
}
6072
```
6173

62-
## 3. Register model to model group & deploy model:
74+
## 4. Register model to model group & deploy model:
6375

6476
```json
6577
POST /_plugins/_ml/models/_register?deploy=true
@@ -81,7 +93,7 @@ POST /_plugins/_ml/models/_register?deploy=true
8193
}
8294
```
8395

84-
## 4. Test model inference
96+
## 5. Test model inference
8597

8698
```json
8799
POST /_plugins/_ml/models/oUdPqZQBQwAL8-GOCZYL/_predict
@@ -97,8 +109,7 @@ POST /_plugins/_ml/models/oUdPqZQBQwAL8-GOCZYL/_predict
97109
"content": "Hello!"
98110
}
99111
]
100-
},
101-
"stream": false
112+
}
102113
}
103114
```
104115

0 commit comments

Comments
 (0)