Skip to content

Commit 6820fb6

Browse files
AWarnolbliii
authored andcommitted
docs(parametrize-model-curl-requests): parametrize model in docs (#482)
parametrize model name for convenience --------- Signed-off-by: AWarno <[email protected]> Signed-off-by: Lawrence Lane <[email protected]>
1 parent fb87718 commit 6820fb6

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

docs/deployment/bring-your-own-endpoint/testing-endpoint-oai-compatibility.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Your endpoint should support the following parameters:
2828
```bash
2929
export FULL_ENDPOINT_URL="https://your-server.com/v1/chat/completions"
3030
export API_KEY="your-api-key-here"
31+
export MODEL_NAME="your-model-name-here"
3132

3233
curl -X POST ${FULL_ENDPOINT_URL} \
3334
-H "Content-Type: application/json" \
@@ -39,7 +40,7 @@ curl -X POST ${FULL_ENDPOINT_URL} \
3940
"content": "Write Python code that can add a list of numbers together."
4041
}
4142
],
42-
"model": "<YOUR_MODEL_NAME>",
43+
"model": "'"$MODEL_NAME"'",
4344
"temperature": 0.6,
4445
"top_p": 0.95,
4546
"max_tokens": 256,
@@ -52,13 +53,14 @@ curl -X POST ${FULL_ENDPOINT_URL} \
5253
```bash
5354
export FULL_ENDPOINT_URL="https://your-server.com/v1/completions"
5455
export API_KEY="your-api-key-here"
56+
export MODEL_NAME="your-model-name-here"
5557

5658
curl -X POST ${FULL_ENDPOINT_URL} \
5759
-H "Content-Type: application/json" \
5860
-H "Authorization: Bearer ${API_KEY}" \
5961
-d '{
6062
"prompt": "Write Python code that can add a list of numbers together.",
61-
"model": "<YOUR_MODEL_NAME>",
63+
"model": "'"$MODEL_NAME"'",
6264
"temperature": 0.6,
6365
"top_p": 0.95,
6466
"max_tokens": 256,
@@ -76,6 +78,7 @@ NeMo Evaluator supports the **OpenAI Images API** ([docs](https://platform.opena
7678
```bash
7779
export FULL_ENDPOINT_URL="https://your-server.com/v1/chat/completions"
7880
export API_KEY="your-api-key-here"
81+
export MODEL_NAME="your-model-name-here"
7982

8083
curl -X POST ${FULL_ENDPOINT_URL} \
8184
-H "Content-Type: application/json" \
@@ -99,7 +102,7 @@ curl -X POST ${FULL_ENDPOINT_URL} \
99102
]
100103
}
101104
],
102-
"model": "<YOUR_MODEL_NAME>",
105+
"model": "'"$MODEL_NAME"'",
103106
"stream": false,
104107
"max_tokens": 16,
105108
"temperature": 0.0,
@@ -116,13 +119,14 @@ Function calling request:
116119
```bash
117120
export FULL_ENDPOINT_URL="https://your-server.com/v1/chat/completions"
118121
export API_KEY="your-api-key-here"
122+
export MODEL_NAME="your-model-name-here"
119123

120124
curl -X POST ${FULL_ENDPOINT_URL} \
121125
-H "Content-Type: application/json" \
122126
-H "Authorization: Bearer ${API_KEY}" \
123127
-H "Accept: application/json" \
124128
-d '{
125-
"model": "<YOUR_MODEL_NAME>",
129+
"model": "'"$MODEL_NAME"'",
126130
"stream": false,
127131
"max_tokens": 16,
128132
"temperature": 0.0,
@@ -178,14 +182,15 @@ Example:
178182
``` bash
179183
export FULL_ENDPOINT_URL="https://your-server.com/v1/chat/completions"
180184
export API_KEY="your-api-key-here"
185+
export MODEL_NAME="your-model-name-here"
181186

182187
curl -X POST ${FULL_ENDPOINT_URL} \
183188
-H "Content-Type: application/json" \
184189
-H "Authorization: Bearer ${API_KEY}" \
185190
-H "Accept: application/json" \
186191
-d '{
187192
"max_tokens": 256,
188-
"model": "<YOUR_MODEL_NAME>",
193+
"model": "'"$MODEL_NAME"'",
189194
"messages": [
190195
{
191196
"content": [

0 commit comments

Comments
 (0)