Package com.google.genai.types
Class LogprobsResultTopCandidates
-
- All Implemented Interfaces:
public abstract class LogprobsResultTopCandidates extends JsonSerializable
A list of the top candidate tokens and their log probabilities at each decoding step. This can be used to see what other tokens the model considered.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classLogprobsResultTopCandidates.BuilderBuilder for LogprobsResultTopCandidates.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description LogprobsResultTopCandidates()
-
Method Summary
Modifier and Type Method Description abstract Optional<List<LogprobsResultCandidate>>candidates()The list of candidate tokens, sorted by log probability in descending order. static LogprobsResultTopCandidates.Builderbuilder()Instantiates a builder for LogprobsResultTopCandidates. abstract LogprobsResultTopCandidates.BuildertoBuilder()Creates a builder with the same values as this instance. static LogprobsResultTopCandidatesfromJson(String jsonString)Deserializes a JSON string to a LogprobsResultTopCandidates object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
candidates
abstract Optional<List<LogprobsResultCandidate>> candidates()
The list of candidate tokens, sorted by log probability in descending order.
-
builder
static LogprobsResultTopCandidates.Builder builder()
Instantiates a builder for LogprobsResultTopCandidates.
-
toBuilder
abstract LogprobsResultTopCandidates.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static LogprobsResultTopCandidates fromJson(String jsonString)
Deserializes a JSON string to a LogprobsResultTopCandidates object.
-
-
-
-