use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct ChatSessionAutomaticThreadTitling {
#[serde(rename = "enabled")]
pub enabled: bool,
}
impl ChatSessionAutomaticThreadTitling {
pub fn new(enabled: bool) -> ChatSessionAutomaticThreadTitling {
ChatSessionAutomaticThreadTitling { enabled }
}
}
impl std::fmt::Display for ChatSessionAutomaticThreadTitling {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match serde_json::to_string(self) {
Ok(s) => write!(f, "{}", s),
Err(_) => Err(std::fmt::Error),
}
}
}