Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions specification/ai/ModelClient/models/chat_completions.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -610,3 +610,33 @@ union ChatMessageImageDetailLevel {
""")
high: "high",
}

@doc("A structured chat content item containing an audio content.")
model ChatMessageAudioContentItem extends ChatMessageContentItem {
@doc("The discriminated object type: always 'input_audio' for this type.")
type: "input_audio";

@doc("The details of the input audio.")
@encodedName("application/json", "input_audio")
inputAudio: ChatMessageInputAudio;
}

@doc("The details of an audio chat message content part.")
model ChatMessageInputAudio {
@doc("Base64 encoded audio data")
data: string;

@doc("The audio format of the audio content.")
format: AudioContentFormat;
}

@doc("A representation of the possible audio formats for audio.")
union AudioContentFormat {
string,

@doc("Specifies audio in WAV format.")
wav: "wav",

@doc("Specifies audio in MP3 format.")
mp3: "mp3",
}
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,30 @@
}
},
"definitions": {
"AudioContentFormat": {
"type": "string",
"description": "A representation of the possible audio formats for audio.",
"enum": [
"wav",
"mp3"
],
"x-ms-enum": {
"name": "AudioContentFormat",
"modelAsString": true,
"values": [
{
"name": "wav",
"value": "wav",
"description": "Specifies audio in WAV format."
},
{
"name": "mp3",
"value": "mp3",
"description": "Specifies audio in MP3 format."
}
]
}
},
"Azure.Core.Foundations.Error": {
"type": "object",
"description": "The error object.",
Expand Down Expand Up @@ -807,6 +831,26 @@
"function"
]
},
"ChatMessageAudioContentItem": {
"type": "object",
"description": "A structured chat content item containing an audio content.",
"properties": {
"input_audio": {
"$ref": "#/definitions/ChatMessageInputAudio",
"description": "The details of the input audio.",
"x-ms-client-name": "inputAudio"
}
},
"required": [
"input_audio"
],
"allOf": [
{
"$ref": "#/definitions/ChatMessageContentItem"
}
],
"x-ms-discriminator-value": "input_audio"
},
"ChatMessageContentItem": {
"type": "object",
"description": "An abstract representation of a structured content item within a chat message.",
Expand Down Expand Up @@ -888,6 +932,24 @@
"url"
]
},
"ChatMessageInputAudio": {
"type": "object",
"description": "The details of an audio chat message content part.",
"properties": {
"data": {
"type": "string",
"description": "Base64 encoded audio data"
},
"format": {
"$ref": "#/definitions/AudioContentFormat",
"description": "The audio format of the audio content."
}
},
"required": [
"data",
"format"
]
},
"ChatMessageTextContentItem": {
"type": "object",
"description": "A structured chat content item containing plain text.",
Expand Down
Loading