Builder

class Builder

Builder is a helper class to build a CompletionRequest instance with a stable API. It provides methods for setting the properties fo the CompletionRequest object. The build method returns a new CompletionRequest instance with the specified properties.

Usage:

val completionRequest = CompletionRequest.builder()
.model("davinci")
.prompt("The wheels on the bus go")
.build()

Functions

Link copied to clipboard

Sets the best_of option for the CompletionRequest.

Link copied to clipboard

Builds the CompletionRequest instance with the provided parameters.

Link copied to clipboard

Sets the echo option for the CompletionRequest.

Link copied to clipboard

Sets the frequency penalty for the CompletionRequest.

Link copied to clipboard

Sets the logit bias for the CompletionRequest.

Link copied to clipboard

Sets the logprobs for the CompletionRequest.

Link copied to clipboard

Sets the maximum number of tokens for the CompletionRequest.

Link copied to clipboard

Sets the model for the CompletionRequest.

Link copied to clipboard

Sets the number of completions for the CompletionRequest.

Link copied to clipboard

Sets the presence penalty for the CompletionRequest.

Link copied to clipboard

Sets the prompt for the CompletionRequest.

Link copied to clipboard

Sets the array of prompts for the CompletionRequest.

Sets the list of prompts for the CompletionRequest.

Link copied to clipboard

Sets the stop sequences for the CompletionRequest.

Link copied to clipboard

Sets the stream option for the CompletionRequest.

Link copied to clipboard

Sets the suffix for the CompletionRequest.

Link copied to clipboard

Sets the temperature for the CompletionRequest.

Link copied to clipboard

Sets the top_p for the CompletionRequest.

Link copied to clipboard

Sets the user identifier for the CompletionRequest.