openai_realtime/api/model.rs
1use serde::{Deserialize, Serialize};
2use std::fmt::Display;
3
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct Model(pub String);
6
7impl Display for Model {
8 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9 write!(f, "{}", self.0)
10 }
11}
12
13impl Default for Model {
14 fn default() -> Self {
15 Model("gpt-4o-realtime-preview-2024-12-17".to_string())
16 }
17}