Skip to main content

build_request

Function build_request 

Source
pub fn build_request(
    req: &Request,
    token: Option<&str>,
) -> (Vec<u8>, Vec<(String, String)>)
Expand description

Build the request body (JSON bytes) and the HTTP headers for a chat completion. token, if present, becomes Authorization: Bearer ….