Builder

org.llm4s.javaapi.JCompletionOptions.Builder
final class Builder

Builds a JCompletionOptions. Immutable: every setter returns a new builder, so one may be shared and extended in two ways. A value no provider accepts - a negative or non-finite temperature, a top-p outside 0..1, a non-finite penalty, a token count below 1 - throws IllegalArgumentException at once, and a null throws NullPointerException; a range only some models accept is left to the provider.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def budgetTokens(value: Int): Builder

Sets an explicit thinking-token budget (Anthropic), overriding the one reasoning implies; at least 1.

Sets an explicit thinking-token budget (Anthropic), overriding the one reasoning implies; at least 1.

Attributes

def budgetTokens(value: OptionalInt): Builder

Sets the value as the thinking-token budget, or clears it when it is empty.

Sets the value as the thinking-token budget, or clears it when it is empty.

Attributes

The options set so far.

The options set so far.

Attributes

def frequencyPenalty(value: Double): Builder

Sets the frequency penalty; any finite value, the range being the provider's.

Sets the frequency penalty; any finite value, the range being the provider's.

Attributes

def maxTokens(value: Int): Builder

Limits the completion to value tokens; at least 1.

Limits the completion to value tokens; at least 1.

Attributes

def maxTokens(value: OptionalInt): Builder

Limits the completion to the value's tokens, or clears the limit when it is empty.

Limits the completion to the value's tokens, or clears the limit when it is empty.

Attributes

def presencePenalty(value: Double): Builder

Sets the presence penalty; any finite value, the range being the provider's.

Sets the presence penalty; any finite value, the range being the provider's.

Attributes

def reasoning(effort: JReasoningEffort): Builder

Asks for this level of reasoning.

Asks for this level of reasoning.

Attributes

def reasoning(effort: Optional[JReasoningEffort]): Builder

Asks for the value's level of reasoning, or for none when it is empty.

Asks for the value's level of reasoning, or for none when it is empty.

Attributes

def temperature(value: Double): Builder

Sets the sampling temperature; at least 0.

Sets the sampling temperature; at least 0.

Attributes

def topP(value: Double): Builder

Sets nucleus sampling; from 0 to 1.

Sets nucleus sampling; from 0 to 1.

Attributes