Skip to content

Commit bcdfa4b

Browse files
committed
Add using
1 parent 34f4786 commit bcdfa4b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

articles/ai-studio/how-to/develop/sdk-overview.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ dotnet add package Azure.AI.Projects
9090
dotnet add package Azure.Identity
9191
```
9292

93+
Add using statements:
94+
95+
```csharp
96+
using Azure.Identity;
97+
using Azure.AI.Projects;
98+
```
99+
93100
Create a project client in code:
94101

95102
# [Sync](#tab/sync)
@@ -149,6 +156,17 @@ print(response.choices[0].message.content)
149156

150157
::: zone pivot="programming-language-csharp"
151158

159+
```dotnet
160+
dotnet add package Azure.AI.OpenAI
161+
```
162+
163+
Add using statements:
164+
165+
```csharp
166+
using OpenAI.Chat;
167+
using Azure.AI.OpenAI;
168+
```
169+
152170
If you have existing code that uses the OpenAI SDK, you can use the project client to create an `AzureOpenAI` client that uses your project's Azure OpenAI connection:
153171

154172
:::code language="csharp" source="~/azureai-samples-csharp/scenarios/projects/basic-csharp/Program.cs" id="azure_openai":::
@@ -196,6 +214,13 @@ print(response.choices[0].message.content)
196214
```dotnet
197215
dotnet add package Azure.AI.Inference
198216
```
217+
218+
Add using statements:
219+
220+
```csharp
221+
using Azure.AI.Inference;
222+
```
223+
199224
You can use the project client to get a configured and authenticated `ChatCompletionsClient` or `EmbeddingsClient`:
200225

201226
:::code language="csharp" source="~/azureai-samples-csharp/scenarios/projects/basic-csharp/Program.cs" id="snippet_inference":::
@@ -314,6 +339,13 @@ search_client = SearchClient(
314339
dotnet add package Azure.Search.Documents
315340
```
316341

342+
Add using statements:
343+
344+
```csharp
345+
using Azure.Search.Documents;
346+
using Azure.Search.Documents.Models;
347+
```
348+
317349
Instantiate the search and/or search index client as desired:
318350

319351
:::code language="csharp" source="~/azureai-samples-csharp/scenarios/projects/basic-csharp/Program.cs" id="azure_aisearch":::

0 commit comments

Comments
 (0)