File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
articles/ai-studio/how-to/develop Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,13 @@ dotnet add package Azure.AI.Projects
9090dotnet add package Azure.Identity
9191```
9292
93+ Add using statements:
94+
95+ ``` csharp
96+ using Azure .Identity ;
97+ using Azure .AI .Projects ;
98+ ```
99+
93100Create 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+
152170If 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
197215dotnet add package Azure.AI.Inference
198216```
217+
218+ Add using statements:
219+
220+ ``` csharp
221+ using Azure .AI .Inference ;
222+ ```
223+
199224You 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(
314339dotnet 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+
317349Instantiate 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":::
You can’t perform that action at this time.
0 commit comments