Skip to content

Commit 2c344ff

Browse files
chore(api): update realtime specs
1 parent ec4bb17 commit 2c344ff

File tree

2 files changed

+38
-6
lines changed

2 files changed

+38
-6
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-79dcb0ae501ac17004f50aecb112a798290ab3727fbe7c7d1b34299e38ed4f8e.yml
3-
openapi_spec_hash: c8d54bd1ae3d704f6b6f72ffd2f876d8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-c7dacca97e28bceff218684bb429481a70aa47aadad983ed9178bfda75ff4cd2.yml
3+
openapi_spec_hash: 28eb1bb901ca10d2e37db4606d2bcfa7
44
config_hash: 167ad0ca036d0f023c78e6496b4311e8

src/resources/beta/realtime/realtime.ts

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,15 @@ export interface ConversationItemContent {
145145
text?: string;
146146

147147
/**
148-
* The transcript of the audio, used for `input_audio` content type.
148+
* The transcript of the audio, used for `input_audio` and `audio` content types.
149149
*/
150150
transcript?: string;
151151

152152
/**
153-
* The content type (`input_text`, `input_audio`, `item_reference`, `text`).
153+
* The content type (`input_text`, `input_audio`, `item_reference`, `text`,
154+
* `audio`).
154155
*/
155-
type?: 'input_text' | 'input_audio' | 'item_reference' | 'text';
156+
type?: 'input_text' | 'input_audio' | 'item_reference' | 'text' | 'audio';
156157
}
157158

158159
/**
@@ -659,7 +660,7 @@ export interface ConversationItemWithReference {
659660
* - Message items of role `user` support `input_text` and `input_audio` content
660661
* - Message items of role `assistant` support `text` content.
661662
*/
662-
content?: Array<ConversationItemContent>;
663+
content?: Array<ConversationItemWithReference.Content>;
663664

664665
/**
665666
* The name of the function being called (for `function_call` items).
@@ -696,6 +697,37 @@ export interface ConversationItemWithReference {
696697
type?: 'message' | 'function_call' | 'function_call_output' | 'item_reference';
697698
}
698699

700+
export namespace ConversationItemWithReference {
701+
export interface Content {
702+
/**
703+
* ID of a previous conversation item to reference (for `item_reference` content
704+
* types in `response.create` events). These can reference both client and server
705+
* created items.
706+
*/
707+
id?: string;
708+
709+
/**
710+
* Base64-encoded audio bytes, used for `input_audio` content type.
711+
*/
712+
audio?: string;
713+
714+
/**
715+
* The text content, used for `input_text` and `text` content types.
716+
*/
717+
text?: string;
718+
719+
/**
720+
* The transcript of the audio, used for `input_audio` content type.
721+
*/
722+
transcript?: string;
723+
724+
/**
725+
* The content type (`input_text`, `input_audio`, `item_reference`, `text`).
726+
*/
727+
type?: 'input_text' | 'input_audio' | 'item_reference' | 'text';
728+
}
729+
}
730+
699731
/**
700732
* Returned when an error occurs, which could be a client problem or a server
701733
* problem. Most errors are recoverable and the session will stay open, we

0 commit comments

Comments
 (0)