Skip to main content

build_request

Function build_request 

Source
pub fn build_request(
    messages: &[Message],
    options: &ChatOptions,
    model: &str,
    stream: bool,
) -> Value
Expand description

Build the /v1/chat/completions request body.

model is the effective model id (already resolved from options.model or the client default). Message/tool/option conversion is delegated to [agent_framework_openai::convert] since Foundry Local’s OpenAI compatibility layer accepts the identical shapes.