parse_chat_request

Function parse_chat_request 

Source
pub fn parse_chat_request(body: &Value) -> Result<ChatRequest, AiError>
Expand description

Parse an OpenAI chat-completions request body into the canonical ChatRequest. Unknown top-level parameters are preserved in other (the OpenAI provider adapter re-emits them; other dialects drop them — see the types docs).