Package ai.vespa.llm.completion
Record Class Completion
java.lang.Object
java.lang.Record
ai.vespa.llm.completion.Completion
A completion from a language model.
- Author:
- bratseth
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionCompletion
(String text, Completion.FinishReason finishReason) Creates an instance of aCompletion
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the reason this completion ended.static Completion
final int
hashCode()
Returns a hash code value for this object.text()
Returns the generated text completion.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Completion
Creates an instance of aCompletion
record class.- Parameters:
text
- the value for thetext
record componentfinishReason
- the value for thefinishReason
record component
-
-
Method Details
-
text
Returns the generated text completion. -
finishReason
Returns the reason this completion ended. -
from
-
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. All components in this record class are compared withObjects::equals(Object,Object)
.
-