Skip to content

Commit 67c4a98

Browse files
committed
Minor fixes for Chat Completions REST API page
1 parent 32ecba3 commit 67c4a98

File tree

1 file changed

+31
-12
lines changed

1 file changed

+31
-12
lines changed

articles/ai-services/openai/reference.md

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ POST https://{your-resource-name}.openai.azure.com/openai/deployments/{deploymen
197197
|--|--|--|--|
198198
| ```your-resource-name``` | string | Required | The name of your Azure OpenAI Resource. |
199199
| ```deployment-id``` | string | Required | The name of your model deployment. You're required to first deploy a model before you can make calls. |
200-
| ```api-version``` | string | Required |The API version to use for this operation. This follows the YYYY-MM-DD format. |
200+
| ```api-version``` | string | Required |The API version to use for this operation. This follows the YYYY-MM-DD or YYYY-MM-DD-preview format. |
201201

202202
**Supported versions**
203203

@@ -251,27 +251,46 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYM
251251
#### Example response
252252

253253
```console
254-
{"id":"chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
255-
"object":"chat.completion","created":1679072642,
256-
"model":"gpt-35-turbo",
257-
"usage":{"prompt_tokens":58,
258-
"completion_tokens":68,
259-
"total_tokens":126},
260-
"choices":[{"message":{"role":"assistant",
261-
"content":"Yes, other Azure AI services also support customer managed keys. Azure AI services offer multiple options for customers to manage keys, such as using Azure Key Vault, customer-managed keys in Azure Key Vault or customer-managed keys through Azure Storage service. This helps customers ensure that their data is secure and access to their services is controlled."},"finish_reason":"stop","index":0}]}
254+
{
255+
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
256+
"object": "chat.completion",
257+
"created": 1679072642,
258+
"model": "gpt-35-turbo",
259+
"usage":
260+
{
261+
"prompt_tokens": 58,
262+
"completion_tokens": 68,
263+
"total_tokens": 126
264+
},
265+
"choices":
266+
[
267+
{
268+
"message":
269+
{
270+
"role": "assistant",
271+
"content": "Yes, other Azure AI services also support customer managed keys.
272+
Azure AI services offer multiple options for customers to manage keys, such as
273+
using Azure Key Vault, customer-managed keys in Azure Key Vault or
274+
customer-managed keys through Azure Storage service. This helps customers ensure
275+
that their data is secure and access to their services is controlled."
276+
},
277+
"finish_reason": "stop",
278+
"index": 0
279+
}
280+
]
281+
}
262282
```
283+
Output formatting adjusted for ease of reading, actual output is a single block of text without line breaks.
263284

264285
In the example response, `finish_reason` equals `stop`. If `finish_reason` equals `content_filter` consult our [content filtering guide](./concepts/content-filter.md) to understand why this is occurring.
265286

266-
Output formatting adjusted for ease of reading, actual output is a single block of text without line breaks.
267-
268287
> [!IMPORTANT]
269288
> The `functions` and `function_call` parameters have been deprecated with the release of the [`2023-12-01-preview`](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-12-01-preview/inference.json) version of the API. The replacement for `functions` is the `tools` parameter. The replacement for `function_call` is the `tool_choice` parameter. Parallel function calling which was introduced as part of the [`2023-12-01-preview`](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-12-01-preview/inference.json) is only supported with `gpt-35-turbo` (1106) and `gpt-4` (1106-preview) also known as GPT-4 Turbo Preview.
270289
271290
| Parameter | Type | Required? | Default | Description |
272291
|--|--|--|--|--|
273292
| ```messages``` | array | Required | | The collection of context messages associated with this chat completions request. Typical usage begins with a [chat message](#chatmessage) for the System role that provides instructions for the behavior of the assistant, followed by alternating messages between the User and Assistant roles.|
274-
| ```temperature```| number | Optional | 1 | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both. |
293+
| ```temperature```| number | Optional | 1 | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. |
275294
| ```n``` | integer | Optional | 1 | How many chat completion choices to generate for each input message. |
276295
| ```stream``` | boolean | Optional | false | If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a `data: [DONE]` message." |
277296
| ```stop``` | string or array | Optional | null | Up to 4 sequences where the API will stop generating further tokens.|

0 commit comments

Comments
 (0)