1 2 3 4 5 6 7 8 9 10 11 12
use crate::protocol::openai; pub(in crate::transform::images) fn openai_model_string( model: Option<openai::OpenAiModelId>, ) -> Option<String> { model.and_then(|model| { serde_json::to_value(model) .ok()? .as_str() .map(str::to_owned) }) }