ChatCompletionRequestBuilder
Builder class for creating ChatCompletionRequest instances.
This builder provides a fluent API for creating chat completion requests, making it easier to construct complex requests with many parameters.
Example usage:
val request = ChatCompletionRequestBuilder()
.model("gpt-4")
.addSystemMessage("You are a helpful assistant.")
.addUserMessage("Tell me about Kotlin.")
.temperature(0.7)
.build()Author
Konstantin Pavlov
Functions
Adds an assistant message to the conversation.
Adds a message with structured content parts to the conversation.
Adds a message to the conversation.
Adds a system message to the conversation.
Adds a user message to the conversation.
Builds a ChatCompletionRequest instance with the configured parameters.
Sets the penalty value for repetitive token usage.
Sets the maximum number of tokens allowed in the generated completions.
Sets the model to use for the completion.
Sets the reasoning effort to apply during reasoning.
Sets the response format.
Sets the seed for deterministic responses.
Sets whether to store the conversation context.
Sets whether to stream the response.
Sets the stream options.
Sets the temperature for controlling randomness.
Sets the tools available to the model.