#[derive(Debug, Clone, Default)]
pub(crate) struct ResponseEcho {
pub(crate) service_tier: Option<String>,
pub(crate) metadata: Option<std::collections::HashMap<String, String>>,
pub(crate) store: bool,
pub(crate) include_usage: bool,
}
impl<'a> From<&'a crate::openai::ChatCompletionRequest> for ResponseEcho {
fn from(req: &'a crate::openai::ChatCompletionRequest) -> Self {
ResponseEcho {
service_tier: req.service_tier.clone(),
metadata: req.metadata.clone(),
store: req.store.unwrap_or(false),
include_usage: req.stream_options.map(|o| o.include_usage).unwrap_or(false),
}
}
}