Skip to content

Commit eb10297

Browse files
committed
realtime how-to updates
1 parent 0af62d6 commit eb10297

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

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

Lines changed: 17 additions & 11 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. |
1083+
| event_id | string | The unique ID of the event. The ID can be specified by the client to help identify the event. |
10841084

10851085
### RealtimeClientEventType
10861086

@@ -1148,8 +1148,8 @@ The definition of a function tool as used by the realtime endpoint.
11481148
|-------|------|-------------|
11491149
| type | string | The type of the tool.<br><br>Allowed values: `function` |
11501150
| name | string | The name of the function. |
1151-
| description | string | The description of the function. |
1152-
| parameters | object | The parameters of the function. |
1151+
| description | string | The description of the function, including usage guidelines. For example, "Use this function to get the current time." |
1152+
| parameters | object | The parameters of the function in the form of a JSON object. |
11531153

11541154
### RealtimeItemStatus
11551155

@@ -1224,6 +1224,8 @@ The definition of a function tool as used by the realtime endpoint.
12241224

12251225
### RealtimeRequestSession
12261226

1227+
You use the `RealtimeRequestSession` object when you want to update the session configuration via the [session.update](#realtimeclienteventsessionupdate) event.
1228+
12271229
| Field | Type | Description |
12281230
|-------|------|-------------|
12291231
| modalities | array | The modalities that the session supports.<br><br>Allowed values: `text`, `audio`<br/><br/>For example, `"modalities": ["text", "audio"]` is the default setting that enables both text and audio modalities. To enable only text, set `"modalities": ["text"]`. You can't enable only audio. |
@@ -1234,7 +1236,7 @@ The definition of a function tool as used by the realtime endpoint.
12341236
| input_audio_transcription | [RealtimeAudioInputTranscriptionSettings](#realtimeaudioinputtranscriptionsettings) | The settings for audio input transcription.<br><br>This property is nullable. |
12351237
| turn_detection | [RealtimeTurnDetection](#realtimeturndetection) | The turn detection settings for the session.<br><br>This property is nullable. |
12361238
| tools | array of [RealtimeTool](#realtimetool) | The tools available to the model for the session. |
1237-
| tool_choice | [RealtimeToolChoice](#realtimetoolchoice) | The tool choice for the session. |
1239+
| tool_choice | [RealtimeToolChoice](#realtimetoolchoice) | The tool choice for the session.<br><br>Allowed values: `auto`, `none`, and `required`. Otherwise, you can specify the name of the function to use. |
12381240
| temperature | number | The sampling temperature for the model. The allowed temperature values are limited to [0.6, 1.2]. Defaults to 0.8. |
12391241
| max_response_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"`. |
12401242

@@ -1334,6 +1336,10 @@ The response resource.
13341336

13351337
### RealtimeResponseSession
13361338

1339+
The `RealtimeResponseSession` object represents a session in the Realtime API. It's used in some of the server events, such as:
1340+
- [`session.created`](#realtimeservereventsessioncreated)
1341+
- [`session.updated`](#realtimeservereventsessionupdated)
1342+
13371343
| Field | Type | Description |
13381344
|-------|------|-------------|
13391345
| object | string | The session object.<br><br>Allowed values: `realtime.session` |
@@ -1379,7 +1385,7 @@ The response resource.
13791385
| Field | Type | Description |
13801386
|-------|------|-------------|
13811387
| type | [RealtimeServerEventType](#realtimeservereventtype) | The type of the server event. |
1382-
| event_id | string | The unique ID of the event. |
1388+
| event_id | string | The unique ID of the server event. |
13831389

13841390
### RealtimeServerEventRateLimitsUpdatedRateLimitsItem
13851391

@@ -1446,21 +1452,21 @@ The base representation of a realtime tool definition.
14461452

14471453
### RealtimeToolChoice
14481454

1449-
The combined set of available representations for a realtime tool_choice parameter, encompassing both string literal options like 'auto' and structured references to defined tools.
1455+
The combined set of available representations for a realtime `tool_choice` parameter, encompassing both string literal options like 'auto' and structured references to defined tools.
14501456

14511457
### RealtimeToolChoiceFunctionObject
14521458

1453-
The representation of a realtime tool_choice selecting a named function tool.
1459+
The representation of a realtime `tool_choice` selecting a named function tool.
14541460

14551461
| Field | Type | Description |
14561462
|-------|------|-------------|
1457-
| type | string | The type of the tool_choice.<br><br>Allowed values: `function` |
1463+
| type | string | The type of the `tool_choice`.<br><br>Allowed values: `function` |
14581464
| function | object | The function tool to select.<br><br>See nested properties next.|
14591465
| + name | string | The name of the function tool.<br><br>A property of the `function` object. |
14601466

14611467
### RealtimeToolChoiceLiteral
14621468

1463-
The available set of mode-level, string literal tool_choice options for the realtime endpoint.
1469+
The available set of mode-level, string literal `tool_choice` options for the realtime endpoint.
14641470

14651471
**Allowed Values:**
14661472

@@ -1470,11 +1476,11 @@ The available set of mode-level, string literal tool_choice options for the real
14701476

14711477
### RealtimeToolChoiceObject
14721478

1473-
A base representation for a realtime tool_choice selecting a named tool.
1479+
A base representation for a realtime `tool_choice` selecting a named tool.
14741480

14751481
| Field | Type | Description |
14761482
|-------|------|-------------|
1477-
| type | [RealtimeToolType](#realtimetooltype) | The type of the tool_choice. |
1483+
| type | [RealtimeToolType](#realtimetooltype) | The type of the `tool_choice`. |
14781484

14791485
### RealtimeToolType
14801486

0 commit comments

Comments
 (0)