Record Class Logprobs.Content
java.lang.Object
java.lang.Record
io.github.stefanbratanov.jvm.openai.Logprobs.Content
- Enclosing class:
- Logprobs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbytes()
Returns the value of thebytes
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.double
logprob()
Returns the value of thelogprob
record component.token()
Returns the value of thetoken
record component.Returns the value of thetopLogprobs
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Content
public Content(String token, double logprob, List<Byte> bytes, List<Logprobs.TopLogprob> topLogprobs) Creates an instance of aContent
record class.- Parameters:
token
- the value for thetoken
record componentlogprob
- the value for thelogprob
record componentbytes
- the value for thebytes
record componenttopLogprobs
- the value for thetopLogprobs
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
token
Returns the value of thetoken
record component.- Returns:
- the value of the
token
record component
-
logprob
public double logprob()Returns the value of thelogprob
record component.- Returns:
- the value of the
logprob
record component
-
bytes
Returns the value of thebytes
record component.- Returns:
- the value of the
bytes
record component
-
topLogprobs
Returns the value of thetopLogprobs
record component.- Returns:
- the value of the
topLogprobs
record component
-