Skip to content

Commit 9dcda67

Browse files
committed
Add REST (from Bala)
1 parent e82fe0e commit 9dcda67

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

articles/ai-foundry/includes/get-started-fdp.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ No installation is necessary to use the Azure AI Foundry portal.
8484
8585
# [JavaScript (preview)](#tab/javascript)
8686
87-
1. [Install JavaScript and Azure CLI](../how-to/develop/install-cli-sdk.md?pivots=programming-language-javascript)
87+
1. [Install Node.js and Azure CLI](../how-to/develop/install-cli-sdk.md?pivots=programming-language-javascript)
8888
1. Make sure to sign in using the CLI `az login` (or `az login --use-device-code`) command to authenticate before running your JavaScript scripts.
8989
1. Download [package.json](https://github.com/azure-ai-foundry/foundry-samples/blob/main/samples/microsoft/javascript/mslearn-resources/quickstart/package.json).
9090
1. Install packages with `npm install`
@@ -112,6 +112,21 @@ No installation is necessary to use the Azure AI Foundry portal.
112112
> [!TIP]
113113
> All the code in this article is at [GitHub Quickstart](https://github.com/azure-ai-foundry/foundry-samples/tree/main/samples/microsoft/csharp/mslearn-resources/quickstart).
114114
115+
# [REST API](#tab/rest)
116+
117+
1. [Install Azure CLI]()
118+
1. Get a temporary access token. It will expire in 2 hours, you'll need to refresh after that.
119+
120+
```cli
121+
az account get-access-token --scope https://ai.azure.com/.default
122+
```
123+
124+
1. Save the results as the environment variable `AZURE_AI_AUTH_TOKEN`.
125+
126+
> [!TIP]
127+
> All the code in this article is at [GitHub Quickstart](https://github.com/azure-ai-foundry/foundry-samples/tree/main/samples/microsoft/csharp/mslearn-resources/quickstart).
128+
129+
115130
---
116131
117132
## Run a chat completion
@@ -146,6 +161,10 @@ Substitute your value for the endpoint in this code:
146161
147162
:::code language="csharp" source="~/foundry-samples/samples/microsoft/csharp/mslearn-resources/quickstart/Samples/SimpleInference.cs" id="chat_completion":::
148163
164+
# [REST API](#tab/rest)
165+
166+
:::code language="python" source="~/foundry-samples/samples/microsoft/python/mslearn-resources/quickstart/quickstart.sh" id="chat_completion":::
167+
149168
---
150169
151170
## Create and run an agent
@@ -178,6 +197,11 @@ Agents allow more powerful capabilities through the use of tools. First, let's w
178197
179198
:::code language="csharp" source="~/foundry-samples/samples/microsoft/csharp/mslearn-resources/quickstart/Samples/AgentService.cs" id="create_and_run_agent" :::
180199
200+
# [REST API](#tab/rest)
201+
202+
:::code language="python" source="~/foundry-samples/samples/microsoft/rest/mslearn-resources/quickstart/quickstart.py" id="create_and_run_agent":::
203+
204+
181205
---
182206
183207
## Add files to the agent
@@ -215,6 +239,10 @@ Now let's add a file search tool that enables us to do knowledge retrieval.
215239
216240
:::code language="csharp" source="~/foundry-samples/samples/microsoft/csharp/mslearn-resources/quickstart/Samples/AgentFileSearch.cs" id="create_filesearch_agent":::
217241
242+
# [REST API](#tab/rest)
243+
244+
:::code language="python" source="~/foundry-samples/samples/microsoft/rest/mslearn-resources/quickstart/quickstart.py" id="create_filesearch_agent":::
245+
218246
---
219247
220248

0 commit comments

Comments
 (0)