Skip to content

Commit ca9c7a9

Browse files
Merge pull request #267664 from likebupt/update-ai-studio-pf-20240229
update aistudio pf deploy article - consume endpoint
2 parents 27500ad + 89df29e commit ca9c7a9

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

articles/ai-studio/how-to/flow-deploy.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.topic: how-to
1010
ms.date: 2/24/2024
1111
ms.reviewer: eur
1212
ms.author: eur
13-
author: eric-urban
13+
author: likebupt
1414
---
1515

1616
# Deploy a flow for real-time inference
@@ -254,7 +254,7 @@ You can also directly go to the **Deployments** page from the left navigation, s
254254

255255
## Test the endpoint
256256

257-
In the endpoint detail page, switch to the **Test** tab.
257+
In the deployment detail page, switch to the **Test** tab.
258258

259259
For endpoints deployed from standard flow, you can input values in form editor or JSON editor to test the endpoint.
260260

@@ -266,7 +266,21 @@ The `chat_input` was set during development of the chat flow. You can input the
266266

267267
## Consume the endpoint
268268

269-
In the endpoint detail page, switch to the **Consume** tab. You can find the REST endpoint and key/token to consume your endpoint. There's also sample code for you to consume the endpoint in different languages.
269+
In the deployment detail page, switch to the **Consume** tab. You can find the REST endpoint and key/token to consume your endpoint. There's also sample code for you to consume the endpoint in different languages.
270+
271+
:::image type="content" source="../media/prompt-flow/how-to-deploy-for-real-time-inference/consume-sample-code.png" alt-text="Screenshot of sample code of consuming endpoints." lightbox = "../media/prompt-flow/how-to-deploy-for-real-time-inference/consume-sample-code.png":::
272+
273+
You need to input values for `RequestBody` or `data` and `api_key`. For example, if your flow has 2 inputs `location` and `url`, then you need to specify data as following.
274+
275+
```json
276+
{
277+
"location": "LA",
278+
"url": "<the_url_to_be_classified>"
279+
}
280+
```
281+
282+
283+
270284

271285

272286
## Clean up resources
114 KB
Loading

0 commit comments

Comments
 (0)