You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|```messages```| array | Required || The messages to generate chat completions for, in the chat format. |
232
+
|```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.|
232
233
|```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. |
233
234
|```n```| integer | Optional | 1 | How many chat completion choices to generate for each input message. |
234
235
|```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." |
@@ -238,6 +239,49 @@ Output formatting adjusted for ease of reading, actual output is a single block
238
239
|```frequency_penalty```| number | Optional | 0 | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.|
239
240
|```logit_bias```| object | Optional | null | Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.|
240
241
|```user```| string | Optional || A unique identifier representing your end-user, which can help Azure OpenAI to monitor and detect abuse.|
242
+
|```function_call```|| Optional || Controls how the model responds to function calls. "none" means the model does not call a function, and responds to the end-user. "auto" means the model can pick between an end-user or calling a function. Specifying a particular function via {"name": "my_function"} forces the model to call that function. "none" is the default when no functions are present. "auto" is the default if functions are present. This parameter requires API version [`2023-07-01-preview`](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-07-01-preview/generated.json)|
243
+
|```functions```|[`FunctionDefinition[]`](#functiondefinition)| Optional || A list of functions the model may generate JSON inputs for. This parameter requires API version [`2023-07-01-preview`](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-07-01-preview/generated.json)|
244
+
245
+
### ChatMessage
246
+
247
+
A single, role-attributed message within a chat completion interaction.
248
+
249
+
| Name | Type | Description |
250
+
|---|---|---|
251
+
| content | string | The text associated with this message payload.|
252
+
| function_call |[FunctionCall](#functioncall)| The name and arguments of a function that should be called, as generated by the model. |
253
+
| name | string | The `name` of the author of this message. `name` is required if role is `function`, and it should be the name of the function whose response is in the `content`. May contain a-z, A-Z, 0-9, and underscores, with a maximum length of 64 characters.|
254
+
|role |[ChatRole](#chatrole)| The role associated with this message payload |
255
+
256
+
### ChatRole
257
+
258
+
A description of the intended purpose of a message within a chat completions interaction.
259
+
260
+
|Name | Type | Description |
261
+
|---|---|---|
262
+
| assistant | string | The role that provides responses to system-instructed, user-prompted input. |
263
+
| function | string | The role that provides function results for chat completions. |
264
+
| system | string | The role that instructs or sets the behavior of the assistant. |
265
+
| user | string | The role that provides input for chat completions. |
266
+
267
+
### FunctionCall
268
+
269
+
The name and arguments of a function that should be called, as generated by the model. This requires API version [`2023-07-01-preview`](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-07-01-preview/generated.json)
270
+
271
+
| Name | Type | Description|
272
+
|---|---|---|
273
+
| arguments | string | The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may fabricate parameters not defined by your function schema. Validate the arguments in your code before calling your function. |
274
+
| name | string | The name of the function to call.|
275
+
276
+
### FunctionDefinition
277
+
278
+
The definition of a caller-specified function that chat completions may invoke in response to matching user input. This requires API version [`2023-07-01-preview`](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-07-01-preview/generated.json)
279
+
280
+
|Name | Type| Description|
281
+
|---|---|---|
282
+
| description | string | A description of what the function does. The model will use this description when selecting the function and interpreting its parameters. |
283
+
| name | string | The name of the function to be called. |
284
+
| parameters || The parameters the functions accepts, described as a [JSON Schema](https://json-schema.org/understanding-json-schema/) object.|
241
285
242
286
## Completions extensions
243
287
@@ -489,5 +533,5 @@ Azure OpenAI is deployed as a part of the Azure AI services. All Azure AI servic
489
533
490
534
## Next steps
491
535
492
-
Learn about [managing deployments, models, and fine-tuning with the REST API](/rest/api/cognitiveservices/azureopenaistable/deployments/create).
536
+
Learn about [ Models, and fine-tuning with the REST API](/rest/api/cognitiveservices/azureopenaistable/files).
493
537
Learn more about the [underlying models that power Azure OpenAI](./concepts/models.md).
0 commit comments