Skip to content

Commit a52d64b

Browse files
committed
fixing links
1 parent d6c5d59 commit a52d64b

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

articles/ai-services/agents/how-to/use-your-own-vnet.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ ms.custom: azure-ai-agents
5757
</summary>
5858

5959
**The Bicep template automates the following configurations and resource provisions:**
60-
* Creates a User Assigned Identify. [Learn more](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities?pivots=identity-mi-methods-azp#create-a-user-assigned-managed-identity)
60+
* Creates a User Assigned Identify. [Learn more](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities?pivots=identity-mi-methods-azp#create-a-user-assigned-managed-identity)
6161
* The User Assigned Managed Identity requires the following Role Based Access Roles: KeyVault Secret Officer, KeyVault Contributor , Storage Blob Data Owner, Storage Queue Data Contributor, Cognitive Services Contributor, Cognitive Services OpenAI User, Search Index Data Contributor, Search Service Contributor
6262

6363
* Configures a managed virtual network with two subnet resources:
@@ -141,23 +141,26 @@ ms.custom: azure-ai-agents
141141

142142
**The following code shows how to create and run an agent using Python (Azure SDK):**
143143

144-
* C#: See the [C# quickstart](https://learn.microsoft.com/azure/ai-services/agents/quickstart?pivots=programming-language-csharp)
145-
* Python OpenAI SDK: See the [Python OpenAI SDK quickstart](https://learn.microsoft.com/azure/ai-services/agents/quickstart?pivots=programming-language-python-openai)
144+
* C#: See the [C# quickstart](../includes/quickstart-csharp.md)
145+
* Python OpenAI SDK: See the [Python OpenAI SDK quickstart](../includes/quickstart-python-openai.md)
146146

147147
Run the following commands to install the python packages.
148148

149149
```console
150150
pip install azure-ai-projects
151151
pip install azure-identity
152152
```
153+
Next, to authenticate your API requests and run the program, use the [az login](/cli/azure/authenticate-azure-cli-interactively) command to sign into your Azure subscription.
154+
155+
```azurecli
156+
az login
157+
```
153158

154159
Use the following code to create and run an agent. To run this code, you will need to create a connection string using information from your project. This string is in the format:
155160

156161
`<HostName>;<AzureSubscriptionId>;<ResourceGroup>;<ProjectName>`
157162

158-
> [!TIP]
159-
> You can also find your connection string in the **overview** for your project in the [Azure AI Foundry portal](https://ai.azure.com/), under **Project details** > **Project connection string**.
160-
> :::image type="content" source="portal-connection-string.png" alt-text="A screenshot showing the connection string in the Azure AI Foundry portal." lightbox="portal-connection-string.png":::
163+
[!INCLUDE [connection-string-portal](connection-string-portal.md)]
161164

162165
`HostName` can be found by navigating to your `discovery_url` and removing the leading `https://` and trailing `/discovery`. To find your `discovery_url`, run this CLI command:
163166

@@ -229,7 +232,7 @@ with project_client:
229232
print(f"Messages: {messages}")
230233

231234
# Get the last message from the sender
232-
last_msg = messages.get_last_text_message_by_sender("assistant")
235+
last_msg = messages.get_last_text_message_by_role("assistant")
233236
if last_msg:
234237
print(f"Last Message: {last_msg.text.value}")
235238

@@ -253,4 +256,3 @@ with project_client:
253256
# Delete the agent once done
254257
project_client.agents.delete_agent(agent.id)
255258
print("Deleted agent")
256-
```

0 commit comments

Comments
 (0)