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

Source
JCompletionOptions.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

The options set so far.

The options set so far.

Attributes

Source
JCompletionOptions.scala

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

Source
JCompletionOptions.scala
def maxTokens(value: Int): Builder

Limits the completion to value tokens; at least 1.

Limits the completion to value tokens; at least 1.

Attributes

Source
JCompletionOptions.scala

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

Source
JCompletionOptions.scala

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

Source
JCompletionOptions.scala
def reasoning(effort: JReasoningEffort): Builder

Asks for this level of reasoning.

Asks for this level of reasoning.

Attributes

Source
JCompletionOptions.scala
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

Source
JCompletionOptions.scala
def serviceTier(tier: JServiceTier): Builder

Asks the provider to serve the request at this tier: JServiceTier.FLEX for a cheaper, slower answer, JServiceTier.PRIORITY for a faster one. A provider that cannot send it as asked reports what it did.

Asks the provider to serve the request at this tier: JServiceTier.FLEX for a cheaper, slower answer, JServiceTier.PRIORITY for a faster one. A provider that cannot send it as asked reports what it did.

Attributes

Source
JCompletionOptions.scala
def serviceTier(tier: Optional[JServiceTier]): Builder

Asks for the value's service tier, or for none when it is empty.

Asks for the value's service tier, or for none when it is empty.

Attributes

Source
JCompletionOptions.scala
def temperature(value: Double): Builder

Sets the sampling temperature; at least 0.

Sets the sampling temperature; at least 0.

Attributes

Source
JCompletionOptions.scala
def thinking(value: JThinking): Builder

Sets how the model thinks: JThinking.off, JThinking.adaptive or a JThinking.budget. An explicit thinking mode wins over reasoning; a provider that cannot send it as asked reports what it sent instead.

Sets how the model thinks: JThinking.off, JThinking.adaptive or a JThinking.budget. An explicit thinking mode wins over reasoning; a provider that cannot send it as asked reports what it sent instead.

Attributes

Source
JCompletionOptions.scala

Sets the value's thinking mode, or clears it when it is empty.

Sets the value's thinking mode, or clears it when it is empty.

Attributes

Source
JCompletionOptions.scala
def topP(value: Double): Builder

Sets nucleus sampling; from 0 to 1.

Sets nucleus sampling; from 0 to 1.

Attributes

Source
JCompletionOptions.scala