@@ -145,14 +145,15 @@ export interface ConversationItemContent {
145
145
text ?: string ;
146
146
147
147
/**
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 .
149
149
*/
150
150
transcript ?: string ;
151
151
152
152
/**
153
- * The content type (`input_text`, `input_audio`, `item_reference`, `text`).
153
+ * The content type (`input_text`, `input_audio`, `item_reference`, `text`,
154
+ * `audio`).
154
155
*/
155
- type ?: 'input_text' | 'input_audio' | 'item_reference' | 'text' ;
156
+ type ?: 'input_text' | 'input_audio' | 'item_reference' | 'text' | 'audio' ;
156
157
}
157
158
158
159
/**
@@ -659,7 +660,7 @@ export interface ConversationItemWithReference {
659
660
* - Message items of role `user` support `input_text` and `input_audio` content
660
661
* - Message items of role `assistant` support `text` content.
661
662
*/
662
- content ?: Array < ConversationItemContent > ;
663
+ content ?: Array < ConversationItemWithReference . Content > ;
663
664
664
665
/**
665
666
* The name of the function being called (for `function_call` items).
@@ -696,6 +697,37 @@ export interface ConversationItemWithReference {
696
697
type ?: 'message' | 'function_call' | 'function_call_output' | 'item_reference' ;
697
698
}
698
699
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
+
699
731
/**
700
732
* Returned when an error occurs, which could be a client problem or a server
701
733
* problem. Most errors are recoverable and the session will stay open, we
0 commit comments