error_body

Function error_body 

Source
pub fn error_body(
    message: &str,
    error_type: &str,
    code: Option<&str>,
    request_id: &str,
) -> Value
Expand description

Build the OpenAI-shaped error body every AI-route failure answers with. error_type follows the OpenAI taxonomy (invalid_request_error, model_error, api_error, …).