Skip to content

Commit 8569953

Browse files
committed
out of band responses
1 parent e096047 commit 8569953

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

articles/ai-services/openai/how-to/realtime-audio.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ An example `session.update` that configures several aspects of the session, incl
145145

146146
The server responds with a [`session.updated`](../realtime-audio-reference.md#realtimeservereventsessionupdated) event to confirm the session configuration.
147147

148-
## Out of band responses
148+
## Out-of-band responses
149149

150150
By default, responses generated during a session are added to the default conversation state. In some cases, you might want to generate responses outside the default conversation. This can be useful for generating multiple responses concurrently or for generating responses that don't affect the default conversation state. For example, you can limit the number of turns considered by the model when generating a response.
151151

152-
You can create responses outside the default conversation by setting the [`response.conversation`](../realtime-audio-reference.md#realtimeresponseoptions) field to the string `none` when creating a response with the [`response.create`](../realtime-audio-reference.md#realtimeclienteventresponsecreate) client event.
152+
You can create out-of-band responses by setting the [`response.conversation`](../realtime-audio-reference.md#realtimeresponseoptions) field to the string `none` when creating a response with the [`response.create`](../realtime-audio-reference.md#realtimeclienteventresponsecreate) client event.
153153

154154
In the same [`response.create`](../realtime-audio-reference.md#realtimeclienteventresponsecreate) client event, you can also set the [`response.metadata`](../realtime-audio-reference.md#realtimeresponseoptions) field to help you identify which response is being generated for this client-sent event.
155155

articles/ai-services/openai/realtime-audio-reference.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ The server `session.updated` event is returned when a session is updated by the
10801080
| Field | Type | Description |
10811081
|-------|------|-------------|
10821082
| type | [RealtimeClientEventType](#realtimeclienteventtype) | The type of the client event. |
1083-
| event_id | string | The unique ID of the event. The ID can be specified by the client to help identify the event. |
1083+
| event_id | string | The unique ID of the event. The client can specify the ID to help identify the event. |
10841084

10851085
### RealtimeClientEventType
10861086

@@ -1119,16 +1119,16 @@ The server `session.updated` event is returned when a session is updated by the
11191119

11201120
The item to add to the conversation.
11211121

1122-
This table describes all `RealtimeConversationItem` propertiest. The properties that are applicable per event depend on the [RealtimeItemType](#realtimeitemtype).
1122+
This table describes all `RealtimeConversationItem` properties. The properties that are applicable per event depend on the [RealtimeItemType](#realtimeitemtype).
11231123

11241124
| Field | Type | Description |
11251125
|-------|------|-------------|
1126-
| id | string | The unique ID of the item. The ID can be specified by the client to help manage server-side context. If the client doesn't provide an ID, the server generates one. |
1126+
| id | string | The unique ID of the item. The client can specify the ID to help manage server-side context. If the client doesn't provide an ID, the server generates one. |
11271127
| type | [RealtimeItemType](#realtimeitemtype) | The type of the item.<br><br>Allowed values: `message`, `function_call`, `function_call_output` |
1128-
| object | string | Identifier for the API object being returned - always `realtime.item`. |
1129-
| status | [RealtimeItemStatus](#realtimeitemstatus) | The status of the item (`completed`, `incomplete`). These have no effect on the conversation, but are accepted for consistency with the `conversation.item.created` event. |
1130-
| role | [RealtimeMessageRole](#realtimemessagerole) | The role of the message sender (`user`, `assistant`, `system`), only applicable for `message` items. |
1131-
| content | array of [RealtimeContentPart](#realtimecontentpart) | The content of the message, applicable for `message` items.<br><br>- Message items of role `system` support only `input_text` content<br>- Message items of role `user` support `input_text` and `input_audio` content<br>- Message items of role `assistant` support `text` content. |
1128+
| object | string | The identifier for the API object being returned. The value will always be `realtime.item`. |
1129+
| status | [RealtimeItemStatus](#realtimeitemstatus) | The status of the item. This field doesn't affect the conversation, but it's accepted for consistency with the `conversation.item.created` event.<br><br>Allowed values: `completed`, `incomplete` |
1130+
| role | [RealtimeMessageRole](#realtimemessagerole) | The role of the message sender. This property is only applicable for `message` items. <br><br>Allowed values: `system`, `user`, `assistant` |
1131+
| content | array of [RealtimeContentPart](#realtimecontentpart) | The content of the message. This property is only applicable for `message` items.<br><br>- Message items of role `system` support only `input_text` content.<br>- Message items of role `user` support `input_text` and `input_audio` content.<br>- Message items of role `assistant` support `text` content. |
11321132
| call_id | string | The ID of the function call (for `function_call` and `function_call_output` items). If passed on a `function_call_output` item, the server will check that a `function_call` item with the same ID exists in the conversation history. |
11331133
| name | string | The name of the function being called (for `function_call` items). |
11341134
| arguments | string | The arguments of the function call (for `function_call` items). |
@@ -1141,7 +1141,7 @@ You use the `RealtimeConversationRequestItem` object to create a new item in the
11411141
| Field | Type | Description |
11421142
|-------|------|-------------|
11431143
| type | [RealtimeItemType](#realtimeitemtype) | The type of the item. |
1144-
| id | string | The unique ID of the item. The ID can be specified by the client to help manage server-side context. If the client doesn't provide an ID, the server generates one. |
1144+
| id | string | The unique ID of the item. The client can specify the ID to help manage server-side context. If the client doesn't provide an ID, the server generates one. |
11451145

11461146
### RealtimeConversationResponseItem
11471147

@@ -1157,7 +1157,7 @@ The `RealtimeConversationResponseItem` object represents an item in the conversa
11571157
|-------|------|-------------|
11581158
| object | string | The identifier for the returned API object.<br><br>Allowed values: `realtime.item` |
11591159
| type | [RealtimeItemType](#realtimeitemtype) | The type of the item.<br><br>Allowed values: `message`, `function_call`, `function_call_output` |
1160-
| id | string | The unique ID of the item. The ID can be specified by the client to help manage server-side context. If the client doesn't provide an ID, the server generates one.<br><br>This property is nullable. |
1160+
| id | string | The unique ID of the item. The client can specify the ID to help manage server-side context. If the client doesn't provide an ID, the server generates one.<br><br>This property is nullable. |
11611161

11621162
### RealtimeFunctionTool
11631163

@@ -1352,7 +1352,7 @@ The response resource.
13521352
| tool_choice | [RealtimeToolChoice](#realtimetoolchoice) | The tool choice for the session. |
13531353
| temperature | number | The sampling temperature for the model. The allowed temperature values are limited to [0.6, 1.2]. Defaults to 0.8. |
13541354
| max__output_tokens | integer or "inf" | The maximum number of output tokens per assistant response, inclusive of tool calls.<br><br>Specify an integer between 1 and 4096 to limit the output tokens. Otherwise, set the value to "inf" to allow the maximum number of tokens.<br><br>For example, to limit the output tokens to 1000, set `"max_response_output_tokens": 1000`. To allow the maximum number of tokens, set `"max_response_output_tokens": "inf"`.<br><br>Defaults to `"inf"`. |
1355-
| conversation | string | Controls which conversation the response is added to. Currently supports auto and none, with auto as the default value. The auto value means that the contents of the response will be added to the default conversation. Set this to none to create an out-of-band response which will not add items to the default conversation. |
1355+
| conversation | string | Controls which conversation the response is added to. The supported values are `auto` and `none`.<br><br>The `auto` value (or not setting this property) ensures that the contents of the response are added to the session's default conversation.<br><br>Set this property to `none` to create an out-of-band response where items won't be added to the default conversation. For more information, see the [how-to guide](./how-to/realtime-audio.md#out-of-band-responses).<br><br>Defaults to `"auto"` |
13561356
| metadata | map | Set of up to 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.<br/><br/>For example: `metadata: { topic: "classification" }` |
13571357
| input | array | Input items to include in the prompt for the model. Creates a new context for this response, without including the default conversation. Can include references to items from the default conversation.<br><br>Array items: [RealtimeConversationItemBase](#realtimeconversationitembase) |
13581358

0 commit comments

Comments
 (0)