Skip to content

Commit 1c2cb18

Browse files
committed
add bullets
1 parent b83e801 commit 1c2cb18

File tree

1 file changed

+73
-78
lines changed

1 file changed

+73
-78
lines changed

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

Lines changed: 73 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -42,115 +42,110 @@ The Azure AI Foundry Projects client library is a unified library that enables y
4242

4343
::: zone pivot="programming-language-python"
4444

45-
To install the project client library:
45+
* Install the project client library
4646

47-
```bash
48-
pip install azure-ai-projects azure-ai-identity
49-
```
50-
51-
Create a project client in code:
52-
53-
```python
54-
from azure.identity import DefaultAzureCredential
55-
from azure.ai.projects import AIProjectClient
47+
```bash
48+
pip install azure-ai-projects azure-ai-identity
49+
```
5650

57-
project = AIProjectClient.from_connection_string(
58-
endpoint="your_project_endpoint", # Replace with your endpoint
59-
credential=DefaultAzureCredential())
60-
```
51+
* Create a project client in code. **Copy** the the Azure AI Foundry project endpoint from the Overview page of the project and update the connections string value.
6152

62-
**Copy** the the Azure AI Foundry project endpoint from the Overview page of the project and update the connections string value above.
53+
```python
54+
from azure.identity import DefaultAzureCredential
55+
from azure.ai.projects import AIProjectClient
56+
57+
project = AIProjectClient.from_connection_string(
58+
endpoint="your_project_endpoint", # Replace with your endpoint
59+
credential=DefaultAzureCredential())
60+
```
6361

6462
::: zone-end
6563

6664
::: zone pivot="programming-language-java"
6765

6866

69-
Create a project client in code:
67+
* Add these packages to your installation:
68+
* `com.azure.ai.projects`
69+
* `com.azure.core`
7070

71-
```java
72-
import com.azure.ai.projects.ProjectsClient;
73-
import com.azure.ai.projects.ProjectsClientBuilder;
74-
import com.azure.core.credential.AzureKeyCredential;
71+
* Create a project client in code. **Copy** the the Azure AI Foundry project endpoint from the Overview page of the project and update the connections string value.
7572

76-
String endpoint ="your_project_endpoint"; // Replace with your endpoint
73+
```java
74+
import com.azure.ai.projects.ProjectsClient;
75+
import com.azure.ai.projects.ProjectsClientBuilder;
76+
import com.azure.core.credential.AzureKeyCredential;
77+
78+
String endpoint ="your_project_endpoint"; // Replace with your endpoint
79+
80+
ProjectsClient client = new ProjectsClientBuilder()
81+
.credential(new AzureKeyCredential(apiKey))
82+
.endpoint(endpoint)
83+
.buildClient();
84+
```
7785

78-
ProjectsClient client = new ProjectsClientBuilder()
79-
.credential(new AzureKeyCredential(apiKey))
80-
.endpoint(endpoint)
81-
.buildClient();
82-
```
8386

84-
**Copy** the the Azure AI Foundry project endpoint from the Overview page of the project and update the connections string value above.
8587

8688
::: zone-end
8789

8890
::: zone pivot="programming-language-javascript"
8991

90-
Create a project client in code:
91-
92-
Install dependencies:
93-
94-
```bash
95-
npm install @azure/ai-projects @azure/identity
96-
```
92+
* Install dependencies:
9793

98-
Create a project client in code:
99-
100-
101-
```javascript
102-
import { AIProjectClient } from '@azure/ai-projects';
103-
import { DefaultAzureCredential } from '@azure/identity';
104-
105-
const endpoint = "your_project_endpoint"; // Replace with your actual endpoint
106-
const project = new AIProjectClient(endpoint, new DefaultAzureCredential());
94+
```bash
95+
npm install @azure/ai-projects @azure/identity
96+
```
10797

108-
const client = project.inference.azureOpenAI();
109-
```
98+
* Create a project client in code. **Copy** the the Azure AI Foundry project endpoint from the Overview page of the project and update the connections string value.
11099

111-
**Copy** the the Azure AI Foundry project endpoint from the Overview page of the project and update the endpoint value above.
112100

101+
```javascript
102+
import { AIProjectClient } from '@azure/ai-projects';
103+
import { DefaultAzureCredential } from '@azure/identity';
104+
105+
const endpoint = "your_project_endpoint"; // Replace with your actual endpoint
106+
const project = new AIProjectClient(endpoint, new DefaultAzureCredential());
107+
108+
const client = project.inference.azureOpenAI();
109+
```
113110
114111
::: zone-end
115112
116113
::: zone pivot="programming-language-csharp"
117114
118-
Install packages:
115+
* Install packages:
119116
120-
```bash
121-
dotnet add package Azure.Identity
122-
dotnet add package Azure.Core
123-
dotnet add package Azure.AI.Inference
124-
```
117+
```bash
118+
dotnet add package Azure.Identity
119+
dotnet add package Azure.Core
120+
dotnet add package Azure.AI.Inference
121+
```
125122
126-
Create the project client:
127-
128-
```csharp
129-
using Azure;
130-
using Azure.Identity;
131-
using Azure.AI.Inference;
132-
using Azure.Core;
133-
using Azure.Core.Pipeline;
134-
135-
var endpointUrl = "your_project_endpoint"; // Replace with your actual endpoint
136-
var credential = new DefaultAzureCredential();
137-
138-
AzureAIInferenceClientOptions clientOptions = new AzureAIInferenceClientOptions();
139-
BearerTokenAuthenticationPolicy tokenPolicy = new BearerTokenAuthenticationPolicy(
140-
credential,
141-
new string[] { "https://cognitiveservices.azure.com/.default" }
142-
);
143-
clientOptions.AddPolicy(tokenPolicy, HttpPipelinePosition.PerRetry);
144-
145-
var client = new ChatCompletionsClient(
146-
endpointUrl,
147-
credential,
148-
clientOptions
149-
);
123+
* Create a project client in code. **Copy** the the Azure AI Foundry project endpoint from the Overview page of the project and update the connections string value.
124+
125+
```csharp
126+
using Azure;
127+
using Azure.Identity;
128+
using Azure.AI.Inference;
129+
using Azure.Core;
130+
using Azure.Core.Pipeline;
131+
132+
var endpointUrl = "your_project_endpoint"; // Replace with your actual endpoint
133+
var credential = new DefaultAzureCredential();
134+
135+
AzureAIInferenceClientOptions clientOptions = new AzureAIInferenceClientOptions();
136+
BearerTokenAuthenticationPolicy tokenPolicy = new BearerTokenAuthenticationPolicy(
137+
credential,
138+
new string[] { "https://cognitiveservices.azure.com/.default" }
139+
);
140+
clientOptions.AddPolicy(tokenPolicy, HttpPipelinePosition.PerRetry);
141+
142+
var client = new ChatCompletionsClient(
143+
endpointUrl,
144+
credential,
145+
clientOptions
146+
);
150147
```
151148
152-
**Copy** the the Azure AI Foundry project endpoint from the Overview page of the project and update the connections string value above.
153-
154149
::: zone-end
155150
156151
<a name="azure-ai-agent-service"></a>

0 commit comments

Comments
 (0)