Skip to content

Commit 24becba

Browse files
authored
Merge pull request #188 from serbanbjd/audio-transcription-null
Do not serialize any AudioTranscription property if its null.
2 parents 1013dc7 + 6d0bf87 commit 24becba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/realtime/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@ pub enum AudioFormat {
5151

5252
#[derive(Debug, Serialize, Deserialize, Clone)]
5353
pub struct AudioTranscription {
54+
#[serde(skip_serializing_if = "Option::is_none")]
5455
pub language: Option<String>,
56+
#[serde(skip_serializing_if = "Option::is_none")]
5557
pub model: Option<String>,
58+
#[serde(skip_serializing_if = "Option::is_none")]
5659
pub prompt: Option<String>,
5760
}
5861

0 commit comments

Comments
 (0)