You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/agents/how-to/tools/openapi-spec-samples.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Use this article to find step-by-step instructions and code samples for using Op
20
20
:::zone pivot="portal"
21
21
22
22
1. Go to the [Azure AI Foundry portal](https://ai.azure.com/). in the **Create and debug** screen or **Agent playground**, select your agent.
23
-
1. Scroll down the **Setup** pane on the right to **action**. Then select **Add**.
23
+
1. Scroll down the **Setup** pane to **action**. Then select **Add**.
24
24
25
25
:::image type="content" source="../../media/tools/action-tools.png" alt-text="A screenshot showing the available tool categories in the Azure AI Foundry portal." lightbox="../../media/tools/action-tools.png":::
26
26
@@ -32,7 +32,7 @@ Use this article to find step-by-step instructions and code samples for using Op
32
32
33
33
:::image type="content" source="../../media/tools/open-api-details.png" alt-text="A screenshot showing the openAPI tool details in the Azure AI Foundry portal." lightbox="../../media/tools/open-api-details.png":::
34
34
35
-
1.Click Next and select your authentication method. Choose `connection` for `API key`.
35
+
1.Select **Next** and select your authentication method. Choose `connection` for `API key`.
36
36
1. If you choose `connection`, you need to select the custom keys connection you have created before.
37
37
1. If you choose `managed identity`, you need to input the audience to get your token. An example of an audience would be `https://cognitiveservices.azure.com/` to connect to Azure AI Services. Make sure you have already set up authentication and role assignment (as described in the [section](./openapi-spec.md#authenticating-with-managed-identity-microsoft-entra-id) above).
38
38
@@ -46,7 +46,7 @@ Use this article to find step-by-step instructions and code samples for using Op
46
46
47
47
## Using the .NET SDK
48
48
49
-
In this example we will demonstrate the possibility to use services with [OpenAPI Specification](https://en.wikipedia.org/wiki/OpenAPI_Specification) with the agent. We will use [wttr.in](https://wttr.in) service to get weather and its specification file [weather_openapi.json](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/weather_openapi.json).
49
+
In this example we'll demonstrate the possibility to use services with [OpenAPI Specification](https://en.wikipedia.org/wiki/OpenAPI_Specification) with the agent. We will use [wttr.in](https://wttr.in) service to get weather and its specification file [weather_openapi.json](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/weather_openapi.json).
50
50
51
51
1. First get `ProjectEndpoint` and `ModelDeploymentName` from config and create a `PersistentAgentsClient`. Also, create an `OpenApiAnonymousAuthDetails` and `OpenApiToolDefinition` from config.
52
52
@@ -67,7 +67,7 @@ In this example we will demonstrate the possibility to use services with [OpenAP
67
67
);
68
68
```
69
69
70
-
2. Next we will need to create an agent.
70
+
2. Next we'll need to create an agent.
71
71
72
72
```csharp
73
73
PersistentAgentagent=client.CreateAgent(
@@ -78,7 +78,7 @@ In this example we will demonstrate the possibility to use services with [OpenAP
78
78
);
79
79
```
80
80
81
-
3. Now we will create a `ThreadRun` and wait until it is complete. If the run will not be successful, we will print the last error.
81
+
3. Now we'll create a `ThreadRun` and wait until it is complete. If the run will not be successful, we'll print the last error.
82
82
83
83
84
84
```csharp
@@ -121,7 +121,7 @@ In this example we will demonstrate the possibility to use services with [OpenAP
121
121
}
122
122
```
123
123
124
-
5. Finally, we delete all the resources, we have created in this sample.
124
+
5. Finally, we delete all the resources we have created in this sample.
125
125
126
126
```csharp
127
127
client.DeleteThread(thread.Id);
@@ -232,7 +232,7 @@ Create a run and observe that the model uses the OpenAPI Spec tool to provide a
232
232
233
233
:::zone pivot="rest-api"
234
234
235
-
## Step 1: Create the OpenAPI Spec tool definition, agent and thread
235
+
## Step 1: Create the OpenAPI Spec tool definition, agent, and thread
236
236
237
237
You might want to store the OpenAPI specification in another file and import the content to initialize the tool. This example is using `anonymous` as the authentication type.
0 commit comments