Class RealtimeContent
public sealed class RealtimeContent
- Inheritance
-
RealtimeContent
- Inherited Members
Constructors
RealtimeContent()
public RealtimeContent()
RealtimeContent(byte[], RealtimeContentType, string)
public RealtimeContent(byte[] audioData, RealtimeContentType type, string transcript = null)
Parameters
audioDatabyte[]typeRealtimeContentTypetranscriptstring
RealtimeContent(ReadOnlyMemory<byte>, RealtimeContentType, string)
public RealtimeContent(ReadOnlyMemory<byte> audioData, RealtimeContentType type, string transcript = null)
Parameters
audioDataReadOnlyMemory<byte>typeRealtimeContentTypetranscriptstring
RealtimeContent(ReadOnlySpan<byte>, RealtimeContentType, string)
public RealtimeContent(ReadOnlySpan<byte> audioData, RealtimeContentType type, string transcript = null)
Parameters
audioDataReadOnlySpan<byte>typeRealtimeContentTypetranscriptstring
RealtimeContent(string, RealtimeContentType)
public RealtimeContent(string text, RealtimeContentType type)
Parameters
textstringtypeRealtimeContentType
Properties
Audio
Base64-encoded audio bytes, used for input_audio content type.
[JsonInclude]
[JsonPropertyName("audio")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Audio { get; }
Property Value
Id
ID of a previous conversation item to reference (for item_reference content types in response.create events).
These can reference both client and server created items.
[JsonInclude]
[JsonPropertyName("id")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Id { get; }
Property Value
Text
The text content, used for input_text and text content types.
[JsonInclude]
[JsonPropertyName("text")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Text { get; }
Property Value
Transcript
The transcript of the audio, used for input_audio content type.
[JsonInclude]
[JsonPropertyName("transcript")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Transcript { get; }
Property Value
Type
The content type (input_text, input_audio, item_reference, text).
[JsonInclude]
[JsonPropertyName("type")]
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
[JsonConverter(typeof(JsonStringEnumConverter<RealtimeContentType>))]
public RealtimeContentType Type { get; }
Property Value
Operators
implicit operator RealtimeContent(byte[])
public static implicit operator RealtimeContent(byte[] audioData)
Parameters
audioDatabyte[]
Returns
implicit operator RealtimeContent(string)
public static implicit operator RealtimeContent(string text)
Parameters
textstring