Skip to content

Commit 9128bc9

Browse files
Merge pull request #231471 from mrbullwinkle/mrb_03_20_2023_PM_updates_003
[Cognitive Services] [Release Branch] PM feedback
2 parents 06fd1d9 + a6dd48a commit 9128bc9

File tree

17 files changed

+69
-37
lines changed

17 files changed

+69
-37
lines changed

articles/cognitive-services/openai/chatgpt-quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Quickstart - Get started using ChatGPT and GPT-4 with Azure OpenAI Service'
2+
title: 'Quickstart - Get started using ChatGPT (Preview) and GPT-4 (Preview) with Azure OpenAI Service'
33
titleSuffix: Azure OpenAI Service
44
description: Walkthrough on how to get started with ChatGPT and GPT-4 on Azure OpenAI Service.
55
services: cognitive-services
@@ -14,7 +14,7 @@ zone_pivot_groups: openai-quickstart
1414
recommendations: false
1515
---
1616

17-
# Quickstart: Get started using ChatGPT and GPT-4 with Azure OpenAI Service
17+
# Quickstart: Get started using ChatGPT (preview) and GPT-4 (preview) with Azure OpenAI Service
1818

1919
Use this article to get started using Azure OpenAI.
2020

articles/cognitive-services/openai/concepts/models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Azure OpenAI provides access to many different models, grouped by family and cap
1919

2020
| Model family | Description |
2121
|--|--|
22-
| [GPT-4](#gpt-4-models) | A set of models that improve on GPT-3.5 and can understand as well as generate natural language and code. These models are currently in preview.|
22+
| [GPT-4](#gpt-4-models) | A set of models that improve on GPT-3.5 and can understand as well as generate natural language and code. **These models are currently in preview.**|
2323
| [GPT-3](#gpt-3-models) | A series of models that can understand and generate natural language. This includes the new [ChatGPT model (preview)](#chatgpt-gpt-35-turbo-preview). |
2424
| [Codex](#codex-models) | A series of models that can understand and generate code, including translating natural language to code. |
2525
| [Embeddings](#embeddings-models) | A set of models that can understand and use embeddings. An embedding is a special format of data representation that can be easily utilized by machine learning models and algorithms. The embedding is an information dense representation of the semantic meaning of a piece of text. Currently, we offer three families of Embeddings models for different functionalities: similarity, text search, and code search. |

articles/cognitive-services/openai/faq.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sections:
2626
- question: |
2727
Does Azure OpenAI support GPT-4?
2828
answer: |
29-
Azure OpenAI supports the latest GPT-4 models. These models are currently in limited preview. For access, existing Azure OpenAI customers can [apply by filling out this form](https://aka.ms/oai/get-gpt4).
29+
Azure OpenAI supports the latest GPT-4 models. These models are currently in preview. For access, existing Azure OpenAI customers can [apply by filling out this form](https://aka.ms/oai/get-gpt4).
3030
- question: |
3131
How do the capabilities of Azure OpenAI compare to OpenAI?
3232
answer: |
@@ -37,6 +37,14 @@ sections:
3737
Does Azure OpenAI support VNET's and Private Endpoints?
3838
answer: |
3939
Yes, as part of Azure Cognitive Services, Azure OpenAI supports VNET's and Private Endpoints. To learn more consult the [Cognitive Services virtual networking guidance](../cognitive-services-virtual-networks.md?context=/azure/cognitive-services/openai/context/context)
40+
- question: |
41+
Do the GPT-4 preview models currently support image input?
42+
answer: |
43+
No, GPT-4 is designed by OpenAI to be multimodal, but currently only text input and output is supported.
44+
- question: |
45+
How do I apply for new use cases?
46+
answer: |
47+
Previously, the process for adding new use cases required customers to reapply to the service. Now, we're releasing a new process that allows you to quickly add new use cases to your use of the service. This process follows the established Limited Access process within Azure Cognitive Services. [Existing customers can attest to any and all new use cases here](https://customervoice.microsoft.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR7en2Ais5pxKtso_Pz4b1_xUM003VEJPRjRSOTZBRVZBV1E5N1lWMk1XUyQlQCN0PWcu). Please note that this is required anytime you would like to use the service for a new use case you did not originally apply for.
4048
4149
4250
- name: Getting access to Azure OpenAI Service

articles/cognitive-services/openai/how-to/chatgpt.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ keywords: ChatGPT
1212
zone_pivot_groups: openai-chat
1313
---
1414

15-
# Learn how to work with the ChatGPT and GPT-4 models
15+
# Learn how to work with the ChatGPT and GPT-4 models (preview)
1616

1717
The ChatGPT and GPT-4 models are language models that are optimized for conversational interfaces. The models behave differently than the older GPT-3 models. Previous models were text-in and text-out, meaning they accepted a prompt string and returned a completion to append to the prompt. However, the ChatGPT and GPT-4 models are conversation-in and message-out. The models expect input formatted in a specific chat-like transcript format, and return a completion that represents a model-written message in the chat. While this format was designed specifically for multi-turn conversations, you'll find it can also work well for non-chat scenarios too.
1818

19-
In Azure OpenAI there are two different options for interacting with these models:
19+
In Azure OpenAI there are two different options for interacting with these type of models:
2020

21-
- ChatCompletion API
22-
- Completion API with Chat Markup Language (ChatML)
21+
- Chat Completion API.
22+
- Completion API with Chat Markup Language (ChatML).
2323

24-
The ChatCompletion API is a new dedicated API for interacting with the ChatGPT and GPT-4 models. This API is the preferred method for accessing these models.
24+
The Chat Completion API is a new dedicated API for interacting with the ChatGPT and GPT-4 models. **Both sets of models are currently in preview**. This API is the preferred method for accessing these models. **It is also the only way to access the new GPT-4 models**.
2525

26-
ChatML uses the same [completion API](../reference.md#completions) that you use for other models like text-davinci-002, it requires a unique token based prompt format known as Chat Markup Language (ChatML). This provides lower level access than the dedicated ChatCompletion API, but also requires additional input validation and **the underlying format is more likely to change over time**.
26+
ChatML uses the same [completion API](../reference.md#completions) that you use for other models like text-davinci-002, it requires a unique token based prompt format known as Chat Markup Language (ChatML). This provides lower level access than the dedicated Chat Completion API, but also requires additional input validation, only supports ChatGPT (gpt-35-turbo) models, and **the underlying format is more likely to change over time**.
2727

2828
This article walks you through getting started with the new ChatGPT and GPT-4 models. It's important to use the techniques described here to get the best results. If you try to interact with the models the same way you did with the older model series, the models will often be verbose and provide less useful responses.
2929

articles/cognitive-services/openai/includes/chat-completion.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: How to work with the Chat Markup Language (preview)
2+
title: How to work with the Chat Completion API (preview)
33
titleSuffix: Azure OpenAI
4-
description: Learn how to work with Chat Markup Language (preview)
4+
description: Learn how to work with Chat Completion API (preview)
55
author: mrbullwinkle #dereklegenzoff
66
ms.author: mbullwin #delegenz
77
ms.service: cognitive-services

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ keywords:
2222
Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI Service by completing the form at [https://aka.ms/oai/access](https://aka.ms/oai/access?azure-portal=true).
2323
- [Python 3.7.1 or later version](https://www.python.org?azure-portal=true).
2424
- The following Python libraries: os.
25-
- An Azure OpenAI Service resource with either the `gpt-35-turbo (version 0301)`, or the `gpt-4 (version 0314)`<sup>1</sup> models deployed. These models are currently available in East US and South Central US. For more information about model deployment, see the [resource deployment guide](../how-to/create-resource.md).
25+
- An Azure OpenAI Service resource with either the `gpt-35-turbo` (preview), or the `gpt-4` (preview)<sup>1</sup> models deployed. These models are currently available in East US and South Central US. For more information about model deployment, see the [resource deployment guide](../how-to/create-resource.md).
2626

27-
<sup>1</sup> **GPT-4 models are currently in limited preview.** Existing Azure OpenAI customers can [apply for access by filling out this form](https://aka.ms/oai/get-gpt4).
27+
<sup>1</sup> **GPT-4 models are currently in preview.** Existing Azure OpenAI customers can [apply for access by filling out this form](https://aka.ms/oai/get-gpt4).
2828

2929
## Set up
3030

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ keywords:
2020
- An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services?azure-portal=true).
2121
- Access granted to Azure OpenAI Service in the desired Azure subscription.
2222
Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI Service by completing the form at [https://aka.ms/oai/access](https://aka.ms/oai/access?azure-portal=true).
23-
- An Azure OpenAI Service resource with either the `gpt-35-turbo (version 0301)`, or the `gpt-4 (version 0314)`<sup>1</sup> models deployed. These models are currently available in East US and South Central US. For more information about model deployment, see the [resource deployment guide](../how-to/create-resource.md).
23+
- An Azure OpenAI Service resource with either the `gpt-35-turbo` (preview), or the `gpt-4` (preview)<sup>1</sup> models deployed. These models are currently available in East US and South Central US. For more information about model deployment, see the [resource deployment guide](../how-to/create-resource.md).
2424

25-
<sup>1</sup> **GPT-4 models are currently in limited preview.** Existing Azure OpenAI customers can [apply for access by filling out this form](https://aka.ms/oai/get-gpt4).
25+
<sup>1</sup> **GPT-4 models are currently in preview.** To access these models, existing Azure OpenAI customers can [apply for access by filling out this form](https://aka.ms/oai/get-gpt4).
2626

2727
## Set up
2828

@@ -79,13 +79,15 @@ echo export OPENAI_API_BASE="REPLACE_WITH_YOUR_ENDPOINT_HERE" >> /etc/environmen
7979
In a bash shell, run the following command. You will need to replace `gpt-35-turbo` with the deployment name you chose when you deployed the ChatGPT or GPT-4 models. Entering the model name will result in an error unless you chose a deployment name that is identical to the underlying model name.
8080

8181
```bash
82-
curl https://$OPENAI_API_BASE/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview \
82+
curl $OPENAI_API_BASE/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview \
8383
-H "Content-Type: application/json" \
8484
-H "api-key: $OPENAI_API_KEY" \
8585
-d '{"messages":[{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Does Azure OpenAI support customer managed keys?"},{"role": "assistant", "content": "Yes, customer managed keys are supported by Azure OpenAI."},{"role": "user", "content": "Do other Azure Cognitive Services support this too?"}]}'
8686

8787
```
8888

89+
The format of your first line of the command with an example endpoint would appear as follows `curl https://docs-test-001.openai.azure.com/openai/deployments/{YOUR-DEPLOYMENT_NAME_HERE}/chat/completions?api-version=2023-03-15-preview \` If you encounter an error double check to make sure that you don't have a doubling of the `/` at the separation between your endpoint and `/openai/deployments`.
90+
8991
If you want to run this command in a normal Windows command prompt you would need to alter the text to remove the `\` and line breaks.
9092

9193
## Output

articles/cognitive-services/openai/includes/chatgpt-studio.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ keywords:
1717
- Access granted to Azure OpenAI in the desired Azure subscription.
1818

1919
Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI by completing the form at [https://aka.ms/oai/access](https://aka.ms/oai/access?azure-portal=true). Open an issue on this repo to contact us if you have an issue.
20-
- An Azure OpenAI Service resource with the `gpt-35-turbo` model deployed. This model is currently available in East US and South Central US. For more information about model deployment, see the [resource deployment guide](../how-to/create-resource.md).
20+
- An Azure OpenAI Service resource with either the `gpt-35-turbo` (preview), or the `gpt-4` (preview)<sup>1</sup> models deployed. These models are currently available in East US and South Central US. For more information about model deployment, see the [resource deployment guide](../how-to/create-resource.md).
21+
22+
<sup>1</sup> **GPT-4 models are currently in preview.** To access these models, existing Azure OpenAI customers can [apply for access by filling out this form](https://aka.ms/oai/get-gpt4).
2123

2224
## Go to Azure OpenAI Studio
2325

@@ -73,7 +75,7 @@ By default there are three panels: assistant setup, chat session, and settings.
7375

7476
:::image type="content" source="../media/quickstarts/xbox.png" alt-text="Screenshot of a first question and answer in playground." lightbox="../media/quickstarts/xbox.png":::
7577

76-
5. Enter a follow-up question like: "What models are available?"
78+
5. Enter a follow-up question like: "which models support 4K?"
7779

7880
:::image type="content" source="../media/quickstarts/xbox.png" alt-text="Screenshot of follow-up question and answer in playground." lightbox="../media/quickstarts/xbox.png":::
7981

@@ -85,19 +87,18 @@ import os
8587
import openai
8688
openai.api_type = "azure"
8789
openai.api_base = "https://docs-test-001.openai.azure.com/"
88-
openai.api_version = "2022-12-01"
90+
openai.api_version = "2023-03-15-preview"
8991
openai.api_key = os.getenv("OPENAI_API_KEY")
9092

91-
response = openai.Completion.create(
92-
engine="gpt-35-turbo",
93-
prompt="<|im_start|>system\nYou are an Xbox customer support agent whose primary goal is to help users with issues they are experiencing with their Xbox devices. You are friendly and concise. You only provide factual answers to queries, and do not provide answers that are not related to Xbox.\n<|im_end|>\n<|im_start|>user\nI am interested in buying an Xbox?\n<|im_end|>\n<|im_start|>assistant\nGreat! Xbox is a popular gaming console that offers a wide variety of games and features. You can purchase an Xbox from various retailers such as Amazon, Best Buy, and the Microsoft Store. Additionally, you can also purchase an Xbox bundle that includes games and accessories. If you have any specific questions about the Xbox or the purchasing process, please let me know and I'll be happy to assist you.\n\n<|im_end|>\n<|im_start|>user\nWhat models are available?\n<|im_end|>\n<|im_start|>assistant\nCurrently, there are three Xbox models available for purchase: Xbox Series X, Xbox Series S, and Xbox One X. \n\nThe Xbox Series X is the most powerful Xbox console to date, with a custom-designed processor, 12 teraflops of processing power, and 16GB of memory. It also supports 4K gaming and has a built-in 4K Ultra HD Blu-ray player.\n\nThe Xbox Series S is a more affordable option, with a custom-\n<|im_end|>\n",
93+
response = openai.ChatCompletion.create(
94+
engine="gpt-35-turbo", # replace this value with the deployment name you chose when you deployed the associated model.
95+
messages = [{"role":"system","content":"You are an Xbox customer support agent whose primary goal is to help users with issues they are experiencing with their Xbox devices. You are friendly and concise. You only provide factual answers to queries, and do not provide answers that are not related to Xbox."},{"role":"user","content":"How much is a PS5?"},{"role":"assistant","content":"I apologize, but I do not have information about the prices of other gaming devices such as the PS5. My primary focus is to assist with issues regarding Xbox devices. Is there a specific issue you are having with your Xbox device that I may be able to help with?"},{"role":"user","content":"I am interested in buying an Xbox?"},{"role":"assistant","content":"Great! There are several Xbox models available in the market, including the Xbox Series X, Xbox Series S, and Xbox One. The Xbox Series X is the latest and most powerful console, while the Xbox Series S is a more affordable option that still offers great performance. The Xbox One is the previous generation console, but it still has a large library of games available to play.\n\nBefore purchasing an Xbox, you may want to consider factors such as your budget, the types of games you want to play, and whether you want to play games in 4K resolution. Once you have decided on a console, you can purchase it from a retailer or directly from the Xbox website. Let me know if you have any other questions or concerns!"},{"role":"user","content":"Which models are 4K?"},{"role":"assistant","content":"Both the Xbox Series X and Xbox One X support 4K resolution gaming. The Xbox Series S, on the other hand, supports up to 1440p resolution gaming, but it can upscale games to 4K. It's worth noting that in order to take advantage of 4K gaming, you'll need a 4K TV or monitor that supports HDR (High Dynamic Range) and HDMI 2.0 or higher."}],
9496
temperature=0,
95-
max_tokens=100,
97+
max_tokens=350,
9698
top_p=0.95,
9799
frequency_penalty=0,
98100
presence_penalty=0,
99-
best_of=1,
100-
stop=["<|im_end|>"])
101+
stop=None)
101102
```
102103

103104
### Understanding the prompt structure
-1.52 KB
Loading
-11.1 KB
Loading

0 commit comments

Comments
 (0)