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
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/api-versions/latest-inference-preview.md
+34-36Lines changed: 34 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,9 +44,6 @@ Creates a completion for the provided prompt, parameters and chosen model.
44
44
| logprobs | integer | Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.<br><br>The maximum value for `logprobs` is 5.<br> | No | None |
45
45
| max_tokens | integer | The maximum number of tokens that can be generated in the completion.<br><br>The token count of your prompt plus `max_tokens` can't exceed the model's context length. | No | 16 |
46
46
| n | integer | How many completions to generate for each prompt.<br><br>**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.<br> | No | 1 |
47
-
| modalities |[ChatCompletionModalities](#chatcompletionmodalities)| Output types that you would like the model to generate for this request.<br>Most models are capable of generating text, which is the default:<br><br>`["text"]`<br><br>The `gpt-4o-audio-preview` model can also be used to generate audio. To<br>request that this model generate both text and audio responses, you can<br>use:<br><br>`["text", "audio"]`<br> | No ||
48
-
| prediction |[PredictionContent](#predictioncontent)| Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. This is most common when you are regenerating a file with only minor changes to most of the content. | No ||
49
-
| audio | object | Parameters for audio output. Required when audio output is requested with<br>`modalities: ["audio"]`. | No ||
50
47
| presence_penalty | number | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.<br> | No | 0 |
51
48
| seed | integer | If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.<br><br>Determinism isn't guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.<br> | No ||
52
49
| stop | string or array | Up to four sequences where the API will stop generating further tokens. The returned text won't contain the stop sequence.<br> | No ||
@@ -57,20 +54,6 @@ Creates a completion for the provided prompt, parameters and chosen model.
57
54
| user | string | A unique identifier representing your end-user, which can help to monitor and detect abuse.<br> | No ||
58
55
59
56
60
-
### Properties for audio
61
-
62
-
#### voice
63
-
64
-
| Name | Type | Description | Default |
65
-
|------|------|-------------|--------|
66
-
| voice | string | Specifies the voice type. Supported voices are `alloy`, `echo`, <br>`fable`, `onyx`, `nova`, and `shimmer`.<br> ||
67
-
68
-
#### format
69
-
70
-
| Name | Type | Description | Default |
71
-
|------|------|-------------|--------|
72
-
| format | string | Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,<br>`opus`, or `pcm16`. <br> ||
73
-
74
57
### Responses
75
58
76
59
**Status Code:** 200
@@ -334,6 +317,23 @@ Creates a completion for the chat message
334
317
| function_call | string or [chatCompletionFunctionCallOption](#chatcompletionfunctioncalloption)| Deprecated in favor of `tool_choice`.<br><br>Controls which (if any) function is called by the model.<br>`none` means the model won't call a function and instead generates a message.<br>`auto` means the model can pick between generating a message or calling a function.<br>Specifying a particular function via `{"name": "my_function"}` forces the model to call that function.<br><br>`none` is the default when no functions are present. `auto` is the default if functions are present.<br> | No ||
335
318
| functions | array | Deprecated in favor of `tools`.<br><br>A list of functions the model may generate JSON inputs for.<br> | No ||
336
319
| user_security_context |[userSecurityContext](#usersecuritycontext)| User security context contains several parameters that describe the AI application itself, and the end user that interacts with the AI application. These fields assist your security operations teams to investigate and mitigate security incidents by providing a comprehensive approach to protecting your AI applications. [Learn more](https://aka.ms/TP4AI/Documentation/EndUserContext) about protecting AI applications using Microsoft Defender for Cloud. | No ||
320
+
| modalities |[ChatCompletionModalities](#chatcompletionmodalities)| Output types that you would like the model to generate for this request.<br>Most models are capable of generating text, which is the default:<br><br>`["text"]`<br><br>The `gpt-4o-audio-preview` model can also be used to generate audio. To<br>request that this model generate both text and audio responses, you can<br>use:<br><br>`["text", "audio"]`<br> | No ||
321
+
| prediction |[PredictionContent](#predictioncontent)| Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. This is most common when you are regenerating a file with only minor changes to most of the content. | No ||
322
+
| audio | object | Parameters for audio output. Required when audio output is requested with<br>`modalities: ["audio"]`. | No ||
323
+
324
+
### Properties for audio
325
+
326
+
#### voice
327
+
328
+
| Name | Type | Description | Default |
329
+
|------|------|-------------|--------|
330
+
| voice | string | Specifies the voice type. Supported voices are `alloy`, `echo`, <br>`fable`, `onyx`, `nova`, and `shimmer`.<br> ||
331
+
332
+
#### format
333
+
334
+
| Name | Type | Description | Default |
335
+
|------|------|-------------|--------|
336
+
| format | string | Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,<br>`opus`, or `pcm16`. <br> ||
337
337
338
338
### Responses
339
339
@@ -4597,9 +4597,6 @@ Information about the content filtering category (hate, sexual, violence, self_h
4597
4597
| logprobs | integer | Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.<br><br>The maximum value for `logprobs` is 5.<br> | No | None |
4598
4598
| max_tokens | integer | The maximum number of tokens that can be generated in the completion.<br><br>The token count of your prompt plus `max_tokens` can't exceed the model's context length. | No | 16 |
4599
4599
| n | integer | How many completions to generate for each prompt.<br><br>**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.<br> | No | 1 |
4600
-
| modalities |[ChatCompletionModalities](#chatcompletionmodalities)| Output types that you would like the model to generate for this request.<br>Most models are capable of generating text, which is the default:<br><br>`["text"]`<br><br>The `gpt-4o-audio-preview` model can also be used to generate audio. To<br>request that this model generate both text and audio responses, you can<br>use:<br><br>`["text", "audio"]`<br> | No ||
4601
-
| prediction |[PredictionContent](#predictioncontent)| Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. This is most common when you are regenerating a file with only minor changes to most of the content. | No ||
4602
-
| audio | object | Parameters for audio output. Required when audio output is requested with<br>`modalities: ["audio"]`. | No ||
4603
4600
| presence_penalty | number | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.<br> | No | 0 |
4604
4601
| seed | integer | If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.<br><br>Determinism isn't guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.<br> | No ||
4605
4602
| stop | string or array | Up to four sequences where the API will stop generating further tokens. The returned text won't contain the stop sequence.<br> | No ||
@@ -4610,21 +4607,6 @@ Information about the content filtering category (hate, sexual, violence, self_h
4610
4607
| user | string | A unique identifier representing your end-user, which can help to monitor and detect abuse.<br> | No ||
4611
4608
4612
4609
4613
-
### Properties for audio
4614
-
4615
-
#### voice
4616
-
4617
-
| Name | Type | Description | Default |
4618
-
|------|------|-------------|--------|
4619
-
| voice | string | Specifies the voice type. Supported voices are `alloy`, `echo`, <br>`fable`, `onyx`, `nova`, and `shimmer`.<br> ||
4620
-
4621
-
#### format
4622
-
4623
-
| Name | Type | Description | Default |
4624
-
|------|------|-------------|--------|
4625
-
| format | string | Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,<br>`opus`, or `pcm16`. <br> ||
4626
-
4627
-
4628
4610
### createCompletionResponse
4629
4611
4630
4612
Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).
@@ -4674,8 +4656,24 @@ Represents a completion response from the API. Note: both the streamed and non-s
4674
4656
| tool_choice |[chatCompletionToolChoiceOption](#chatcompletiontoolchoiceoption)| Controls which (if any) tool is called by the model. `none` means the model won't call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. `none` is the default when no tools are present. `auto` is the default if tools are present. | No ||
4675
4657
| function_call | string or [chatCompletionFunctionCallOption](#chatcompletionfunctioncalloption)| Deprecated in favor of `tool_choice`.<br><br>Controls which (if any) function is called by the model.<br>`none` means the model won't call a function and instead generates a message.<br>`auto` means the model can pick between generating a message or calling a function.<br>Specifying a particular function via `{"name": "my_function"}` forces the model to call that function.<br><br>`none` is the default when no functions are present. `auto` is the default if functions are present.<br> | No ||
4676
4658
| functions | array | Deprecated in favor of `tools`.<br><br>A list of functions the model may generate JSON inputs for.<br> | No ||
4677
-
| user_security_context |[userSecurityContext](#usersecuritycontext)| User security context contains several parameters that describe the AI application itself, and the end user that interacts with the AI application. These fields assist your security operations teams to investigate and mitigate security incidents by providing a comprehensive approach to protecting your AI applications. [Learn more](https://aka.ms/TP4AI/Documentation/EndUserContext) about protecting AI applications using Microsoft Defender for Cloud. | No ||
4659
+
| user_security_context |[userSecurityContext](#usersecuritycontext)| User security context contains several parameters that describe the AI application itself, and the end user that interacts with the AI application. These fields assist your security operations teams to investigate and mitigate security incidents by providing a comprehensive approach to protecting your AI applications. [Learn more](https://aka.ms/TP4AI/Documentation/EndUserContext) about protecting AI applications using Microsoft Defender for Cloud. | No || and detect abuse.<br> | No ||
4660
+
| modalities |[ChatCompletionModalities](#chatcompletionmodalities)| Output types that you would like the model to generate for this request.<br>Most models are capable of generating text, which is the default:<br><br>`["text"]`<br><br>The `gpt-4o-audio-preview` model can also be used to [generate audio](/docs/guides/audio). To<br>request that this model generate both text and audio responses, you can<br>use:<br><br>`["text", "audio"]`<br> | No ||
4661
+
| prediction |[PredictionContent](#predictioncontent)| Configuration for a [Predicted Output](/docs/guides/predicted-outputs), which can greatly improve response times when large parts of the model response are known ahead of time. This is most common when you are regenerating a file with only minor changes to most of the content. | No ||
4662
+
| audio | object | Parameters for audio output. Required when audio output is requested with<br>`modalities: ["audio"]`. [Learn more](/docs/guides/audio).<br> | No ||
4663
+
4664
+
### Properties for audio
4665
+
4666
+
#### voice
4667
+
4668
+
| Name | Type | Description | Default |
4669
+
|------|------|-------------|--------|
4670
+
| voice | string | Specifies the voice type. Supported voices are `alloy`, `echo`, <br>`fable`, `onyx`, `nova`, and `shimmer`.<br> ||
4671
+
4672
+
#### format
4678
4673
4674
+
| Name | Type | Description | Default |
4675
+
|------|------|-------------|--------|
4676
+
| format | string | Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,<br>`opus`, or `pcm16`. <br> ||
0 commit comments