Skip to content

Commit c5d6e6a

Browse files
Merge pull request #249904 from PatrickFarley/openai-updates-new
[ai-svcs] Openai updates new
2 parents f87a398 + 2d0959e commit c5d6e6a

23 files changed

+783
-491
lines changed

articles/ai-services/openai/dall-e-quickstart.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,36 @@ zone_pivot_groups: openai-quickstart-dall-e
1616

1717
# Quickstart: Generate images with Azure OpenAI Service
1818

19+
> [!NOTE]
20+
> The image generation API creates an image from a text prompt. It does not edit existing images or create variations.
1921
2022
::: zone pivot="programming-language-studio"
2123

2224
[!INCLUDE [Studio quickstart](includes/dall-e-studio.md)]
2325

2426
::: zone-end
2527

26-
::: zone pivot="rest-api"
28+
::: zone pivot="programming-language-csharp"
2729

28-
[!INCLUDE [REST API quickstart](includes/dall-e-rest.md)]
30+
[!INCLUDE [C# SDK quickstart](includes/dall-e-dotnet.md)]
31+
32+
::: zone-end
33+
34+
::: zone pivot="programming-language-java"
35+
36+
[!INCLUDE [Java SDK quickstart](includes/dall-e-java.md)]
37+
38+
::: zone-end
39+
40+
::: zone pivot="programming-language-javascript"
41+
42+
[!INCLUDE [JavaScript SDK quickstart](includes/dall-e-javascript.md)]
43+
44+
::: zone-end
45+
46+
::: zone pivot="programming-language-go"
47+
48+
[!INCLUDE [Go SDK quickstart](includes/dall-e-go.md)]
2949

3050
::: zone-end
3151

@@ -34,3 +54,10 @@ zone_pivot_groups: openai-quickstart-dall-e
3454
[!INCLUDE [Python SDK quickstart](includes/dall-e-python.md)]
3555

3656
::: zone-end
57+
58+
::: zone pivot="rest-api"
59+
60+
[!INCLUDE [REST API quickstart](includes/dall-e-rest.md)]
61+
62+
::: zone-end
63+

articles/ai-services/openai/includes/chatgpt-dotnet.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -60,53 +60,10 @@ Install the OpenAI .NET client library with:
6060
dotnet add package Azure.AI.OpenAI --prerelease
6161
```
6262

63-
### Retrieve key and endpoint
63+
[!INCLUDE [get-key-endpoint](get-key-endpoint.md)]
6464

65-
To successfully make a call against Azure OpenAI, you need an **endpoint** and a **key**.
65+
[!INCLUDE [environment-variables](environment-variables.md)]
6666

67-
|Variable name | Value |
68-
|--------------------------|-------------|
69-
| `ENDPOINT` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively, you can find the value in the **Azure OpenAI Studio** > **Playground** > **Code View**. An example endpoint is: `https://docs-test-001.openai.azure.com/`.|
70-
| `API-KEY` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. You can use either `KEY1` or `KEY2`.|
71-
72-
Go to your resource in the Azure portal. The **Endpoint and Keys** can be found in the **Resource Management** section. Copy your endpoint and access key as you'll need both for authenticating your API calls. You can use either `KEY1` or `KEY2`. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption.
73-
74-
:::image type="content" source="../media/quickstarts/endpoint.png" alt-text="Screenshot of the overview UI for an OpenAI Resource in the Azure portal with the endpoint and access keys location circled in red." lightbox="../media/quickstarts/endpoint.png":::
75-
76-
Create and assign persistent environment variables for your key and endpoint.
77-
78-
### Environment variables
79-
80-
# [Command Line](#tab/command-line)
81-
82-
```CMD
83-
setx AZURE_OPENAI_KEY "REPLACE_WITH_YOUR_KEY_VALUE_HERE"
84-
```
85-
86-
```CMD
87-
setx AZURE_OPENAI_ENDPOINT "REPLACE_WITH_YOUR_ENDPOINT_HERE"
88-
```
89-
90-
# [PowerShell](#tab/powershell)
91-
92-
```powershell
93-
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_KEY', 'REPLACE_WITH_YOUR_KEY_VALUE_HERE', 'User')
94-
```
95-
96-
```powershell
97-
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_ENDPOINT', 'REPLACE_WITH_YOUR_ENDPOINT_HERE', 'User')
98-
```
99-
100-
# [Bash](#tab/bash)
101-
102-
```Bash
103-
echo export AZURE_OPENAI_KEY="REPLACE_WITH_YOUR_KEY_VALUE_HERE" >> /etc/environment && source /etc/environment
104-
```
105-
106-
```Bash
107-
echo export AZURE_OPENAI_ENDPOINT="REPLACE_WITH_YOUR_ENDPOINT_HERE" >> /etc/environment && source /etc/environment
108-
```
109-
---
11067

11168
> [!div class="nextstepaction"]
11269
> [I ran into an issue with the setup.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=DOTNET&Pillar=AOAI&Product=Chatgpt&Page=quickstart&Section=Set-up)

articles/ai-services/openai/includes/chatgpt-java.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -69,53 +69,10 @@ mkdir "quickstart/src/main/java/com/azure/ai/openai/usage"
6969
</project>
7070
```
7171

72-
### Retrieve key and endpoint
72+
[!INCLUDE [get-key-endpoint](get-key-endpoint.md)]
7373

74-
To successfully make a call against Azure OpenAI, you need an **endpoint** and a **key**.
74+
[!INCLUDE [environment-variables](environment-variables.md)]
7575

76-
|Variable name | Value |
77-
|--------------------------|-------------|
78-
| `ENDPOINT` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively, you can find the value in the **Azure AI Studio** > **Playground** > **Code View**. An example endpoint is: `https://docs-test-001.openai.azure.com/`.|
79-
| `API-KEY` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. You can use either `KEY1` or `KEY2`.|
80-
81-
Go to your resource in the Azure portal. The **Endpoint and Keys** can be found in the **Resource Management** section. Copy your endpoint and access key as you'll need both for authenticating your API calls. You can use either `KEY1` or `KEY2`. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption.
82-
83-
:::image type="content" source="../media/quickstarts/endpoint.png" alt-text="Screenshot of the overview UI for an OpenAI Resource in the Azure portal with the endpoint and access keys location circled in red." lightbox="../media/quickstarts/endpoint.png":::
84-
85-
Create and assign persistent environment variables for your key and endpoint.
86-
87-
### Environment variables
88-
89-
# [Command Line](#tab/command-line)
90-
91-
```CMD
92-
setx AZURE_OPENAI_KEY "REPLACE_WITH_YOUR_KEY_VALUE_HERE"
93-
```
94-
95-
```CMD
96-
setx AZURE_OPENAI_ENDPOINT "REPLACE_WITH_YOUR_ENDPOINT_HERE"
97-
```
98-
99-
# [PowerShell](#tab/powershell)
100-
101-
```powershell
102-
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_KEY', 'REPLACE_WITH_YOUR_KEY_VALUE_HERE', 'User')
103-
```
104-
105-
```powershell
106-
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_ENDPOINT', 'REPLACE_WITH_YOUR_ENDPOINT_HERE', 'User')
107-
```
108-
109-
# [Bash](#tab/bash)
110-
111-
```Bash
112-
echo export AZURE_OPENAI_KEY="REPLACE_WITH_YOUR_KEY_VALUE_HERE" >> /etc/environment && source /etc/environment
113-
```
114-
115-
```Bash
116-
echo export AZURE_OPENAI_ENDPOINT="REPLACE_WITH_YOUR_ENDPOINT_HERE" >> /etc/environment && source /etc/environment
117-
```
118-
---
11976

12077
> [!div class="nextstepaction"]
12178
> [I ran into an issue with the setup.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVA&Pillar=AOAI&Product=Chatgpt&Page=quickstart&Section=Set-up-the-environment)

articles/ai-services/openai/includes/chatgpt-javascript.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -40,53 +40,10 @@ Install the Azure OpenAI client library for JavaScript with npm:
4040
npm install @azure/openai
4141
```
4242

43-
### Retrieve key and endpoint
43+
[!INCLUDE [get-key-endpoint](get-key-endpoint.md)]
4444

45-
To successfully make a call against Azure OpenAI, you need an **endpoint** and a **key**.
45+
[!INCLUDE [environment-variables](environment-variables.md)]
4646

47-
|Variable name | Value |
48-
|--------------------------|-------------|
49-
| `ENDPOINT` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively, you can find the value in the **Azure OpenAI Studio** > **Playground** > **Code View**. An example endpoint is: `https://docs-test-001.openai.azure.com/`.|
50-
| `API-KEY` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. You can use either `KEY1` or `KEY2`.|
51-
52-
Go to your resource in the Azure portal. The **Endpoint and Keys** can be found in the **Resource Management** section. Copy your endpoint and access key as you'll need both for authenticating your API calls. You can use either `KEY1` or `KEY2`. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption.
53-
54-
:::image type="content" source="../media/quickstarts/endpoint.png" alt-text="Screenshot of the overview UI for an OpenAI Resource in the Azure portal with the endpoint and access keys location circled in red." lightbox="../media/quickstarts/endpoint.png":::
55-
56-
Create and assign persistent environment variables for your key and endpoint.
57-
58-
### Environment variables
59-
60-
# [Command Line](#tab/command-line)
61-
62-
```CMD
63-
setx AZURE_OPENAI_KEY "REPLACE_WITH_YOUR_KEY_VALUE_HERE"
64-
```
65-
66-
```CMD
67-
setx AZURE_OPENAI_ENDPOINT "REPLACE_WITH_YOUR_ENDPOINT_HERE"
68-
```
69-
70-
# [PowerShell](#tab/powershell)
71-
72-
```powershell
73-
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_KEY', 'REPLACE_WITH_YOUR_KEY_VALUE_HERE', 'User')
74-
```
75-
76-
```powershell
77-
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_ENDPOINT', 'REPLACE_WITH_YOUR_ENDPOINT_HERE', 'User')
78-
```
79-
80-
# [Bash](#tab/bash)
81-
82-
```Bash
83-
echo export AZURE_OPENAI_KEY="REPLACE_WITH_YOUR_KEY_VALUE_HERE" >> /etc/environment && source /etc/environment
84-
```
85-
86-
```Bash
87-
echo export AZURE_OPENAI_ENDPOINT="REPLACE_WITH_YOUR_ENDPOINT_HERE" >> /etc/environment && source /etc/environment
88-
```
89-
---
9047

9148
> [!div class="nextstepaction"]
9249
> [I ran into an issue with the setup.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVASCRIPT&Pillar=AOAI&Product=Chatgpt&Page=quickstart&Section=Set-up-the-environment)

articles/ai-services/openai/includes/chatgpt-python.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -40,53 +40,10 @@ pip install openai
4040
> [!NOTE]
4141
> This library is maintained by OpenAI and is currently in preview. Refer to the [release history](https://github.com/openai/openai-python/releases) or the [version.py commit history](https://github.com/openai/openai-python/commits/main/openai/version.py) to track the latest updates to the library.
4242
43-
### Retrieve key and endpoint
43+
[!INCLUDE [get-key-endpoint](get-key-endpoint.md)]
4444

45-
To successfully make a call against Azure OpenAI, you'll need an **endpoint** and a **key**.
45+
[!INCLUDE [environment-variables](environment-variables.md)]
4646

47-
|Variable name | Value |
48-
|--------------------------|-------------|
49-
| `ENDPOINT` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively, you can find the value in the **Azure OpenAI Studio** > **Playground** > **Code View**. An example endpoint is: `https://docs-test-001.openai.azure.com/`.|
50-
| `API-KEY` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. You can use either `KEY1` or `KEY2`.|
51-
52-
Go to your resource in the Azure portal. The **Endpoint and Keys** can be found in the **Resource Management** section. Copy your endpoint and access key as you'll need both for authenticating your API calls. You can use either `KEY1` or `KEY2`. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption.
53-
54-
:::image type="content" source="../media/quickstarts/endpoint.png" alt-text="Screenshot of the overview UI for an OpenAI Resource in the Azure portal with the endpoint & access keys location circled in red." lightbox="../media/quickstarts/endpoint.png":::
55-
56-
Create and assign persistent environment variables for your key and endpoint.
57-
58-
### Environment variables
59-
60-
# [Command Line](#tab/command-line)
61-
62-
```CMD
63-
setx AZURE_OPENAI_KEY "REPLACE_WITH_YOUR_KEY_VALUE_HERE"
64-
```
65-
66-
```CMD
67-
setx AZURE_OPENAI_ENDPOINT "REPLACE_WITH_YOUR_ENDPOINT_HERE"
68-
```
69-
70-
# [PowerShell](#tab/powershell)
71-
72-
```powershell
73-
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_KEY', 'REPLACE_WITH_YOUR_KEY_VALUE_HERE', 'User')
74-
```
75-
76-
```powershell
77-
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_ENDPOINT', 'REPLACE_WITH_YOUR_ENDPOINT_HERE', 'User')
78-
```
79-
80-
# [Bash](#tab/bash)
81-
82-
```Bash
83-
echo export AZURE_OPENAI_KEY="REPLACE_WITH_YOUR_KEY_VALUE_HERE" >> /etc/environment && source /etc/environment
84-
```
85-
86-
```Bash
87-
echo export AZURE_OPENAI_ENDPOINT="REPLACE_WITH_YOUR_ENDPOINT_HERE" >> /etc/environment && source /etc/environment
88-
```
89-
---
9047

9148
> [!div class="nextstepaction"]
9249
> [I ran into an issue with the setup.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=PYTHON&Pillar=AOAI&Product=Chatgpt&Page=quickstart&Section=Set-up)

articles/ai-services/openai/includes/chatgpt-rest.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -26,53 +26,10 @@ keywords:
2626

2727
## Set up
2828

29-
### Retrieve key and endpoint
29+
[!INCLUDE [get-key-endpoint](get-key-endpoint.md)]
3030

31-
To successfully make a call against Azure OpenAI, you'll need an **endpoint** and a **key**.
31+
[!INCLUDE [environment-variables](environment-variables.md)]
3232

33-
|Variable name | Value |
34-
|--------------------------|-------------|
35-
| `ENDPOINT` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively, you can find the value in the **Azure OpenAI Studio** > **Playground** > **Code View**. An example endpoint is: `https://docs-test-001.openai.azure.com/`.|
36-
| `API-KEY` | This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. You can use either `KEY1` or `KEY2`.|
37-
38-
Go to your resource in the Azure portal. The **Endpoint and Keys** can be found in the **Resource Management** section. Copy your endpoint and access key as you'll need both for authenticating your API calls. You can use either `KEY1` or `KEY2`. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption.
39-
40-
:::image type="content" source="../media/quickstarts/endpoint.png" alt-text="Screenshot of the overview UI for an OpenAI Resource in the Azure portal with the endpoint & access keys location circled in red." lightbox="../media/quickstarts/endpoint.png":::
41-
42-
Create and assign persistent environment variables for your key and endpoint.
43-
44-
### Environment variables
45-
46-
# [Command Line](#tab/command-line)
47-
48-
```CMD
49-
setx AZURE_OPENAI_KEY "REPLACE_WITH_YOUR_KEY_VALUE_HERE"
50-
```
51-
52-
```CMD
53-
setx AZURE_OPENAI_ENDPOINT "REPLACE_WITH_YOUR_ENDPOINT_HERE"
54-
```
55-
56-
# [PowerShell](#tab/powershell)
57-
58-
```powershell
59-
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_KEY', 'REPLACE_WITH_YOUR_KEY_VALUE_HERE', 'User')
60-
```
61-
62-
```powershell
63-
[System.Environment]::SetEnvironmentVariable('AZURE_OPENAI_ENDPOINT', 'REPLACE_WITH_YOUR_ENDPOINT_HERE', 'User')
64-
```
65-
66-
# [Bash](#tab/bash)
67-
68-
```Bash
69-
echo export AZURE_OPENAI_KEY="REPLACE_WITH_YOUR_KEY_VALUE_HERE" >> /etc/environment && source /etc/environment
70-
```
71-
72-
```Bash
73-
echo export AZURE_OPENAI_ENDPOINT="REPLACE_WITH_YOUR_ENDPOINT_HERE" >> /etc/environment && source /etc/environment
74-
```
75-
---
7633

7734
> [!div class="nextstepaction"]
7835
> [I ran into an issue with the setup.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=REST&Pillar=AOAI&Product=Chatgpt&Page=quickstart&Section=Set-up)

0 commit comments

Comments
 (0)