Class LogprobsResult.Builder

java.lang.Object
com.google.genai.types.LogprobsResult.Builder
Enclosing class:
LogprobsResult

public abstract static class LogprobsResult.Builder extends Object
Builder for LogprobsResult.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • chosenCandidates

      public abstract LogprobsResult.Builder chosenCandidates(List<LogprobsResultCandidate> chosenCandidates)
      Setter for chosenCandidates.

      chosenCandidates: A list of the chosen candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps. Note that the chosen candidate might not be in `top_candidates`.

    • chosenCandidates

      @CanIgnoreReturnValue public LogprobsResult.Builder chosenCandidates(LogprobsResultCandidate... chosenCandidates)
      Setter for chosenCandidates.

      chosenCandidates: A list of the chosen candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps. Note that the chosen candidate might not be in `top_candidates`.

    • chosenCandidates

      @CanIgnoreReturnValue public LogprobsResult.Builder chosenCandidates(LogprobsResultCandidate.Builder... chosenCandidatesBuilders)
      Setter for chosenCandidates builder.

      chosenCandidates: A list of the chosen candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps. Note that the chosen candidate might not be in `top_candidates`.

    • clearChosenCandidates

      @CanIgnoreReturnValue public LogprobsResult.Builder clearChosenCandidates()
      Clears the value of chosenCandidates field.
    • topCandidates

      public abstract LogprobsResult.Builder topCandidates(List<LogprobsResultTopCandidates> topCandidates)
      Setter for topCandidates.

      topCandidates: A list of the top candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps.

    • topCandidates

      @CanIgnoreReturnValue public LogprobsResult.Builder topCandidates(LogprobsResultTopCandidates... topCandidates)
      Setter for topCandidates.

      topCandidates: A list of the top candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps.

    • topCandidates

      @CanIgnoreReturnValue public LogprobsResult.Builder topCandidates(LogprobsResultTopCandidates.Builder... topCandidatesBuilders)
      Setter for topCandidates builder.

      topCandidates: A list of the top candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps.

    • clearTopCandidates

      @CanIgnoreReturnValue public LogprobsResult.Builder clearTopCandidates()
      Clears the value of topCandidates field.
    • build

      public abstract LogprobsResult build()