response_to_openai

Function response_to_openai 

Source
pub fn response_to_openai(
    resp: &ChatResponse,
    model_alias: &str,
    request_id: &str,
) -> Value
Expand description

Serialize a canonical ChatResponse into the OpenAI response shape. model_alias is echoed as the model (the provider’s internal identifier never leaks); request_id rides along for correlation.