koryChatRequest

Creates a ChatRequest using the DSL builder.

Return

A new ChatRequest instance.

Parameters

blocks

A ChatRequestBuilder lambda for configuring the request.

Throws

if chat {} was not called inside the builder.

Samples

// For create a chat request using koryChatRequest dsl function.
val chatRequest = koryChatRequest {
    temperature = 0.7
    maxTokens = 4096
    topK = 40
    reasoning = ReasoningConfig.Enabled(ReasoningConfig.Level.LOW)
    // The “chat” function refers to the chat that will be used in the request.
    chat(
        model = "gpt-5.6-sol",
    ) {
        // Body for messages.
        user("Ping!")
    }
}