Record Class TextGenerationResponse.Result
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.watsonx.bean.TextGenerationResponse.Result
- Enclosing class:
- TextGenerationResponse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thegeneratedTextrecord component.intReturns the value of thegeneratedTokenCountrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theinputTokenCountrecord component.Returns the value of thestopReasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Result
public Result(String generatedText, int generatedTokenCount, int inputTokenCount, String stopReason) Creates an instance of aResultrecord class.- Parameters:
generatedText- the value for thegeneratedTextrecord componentgeneratedTokenCount- the value for thegeneratedTokenCountrecord componentinputTokenCount- the value for theinputTokenCountrecord componentstopReason- the value for thestopReasonrecord 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 '=='. -
generatedText
Returns the value of thegeneratedTextrecord component.- Returns:
- the value of the
generatedTextrecord component
-
generatedTokenCount
public int generatedTokenCount()Returns the value of thegeneratedTokenCountrecord component.- Returns:
- the value of the
generatedTokenCountrecord component
-
inputTokenCount
public int inputTokenCount()Returns the value of theinputTokenCountrecord component.- Returns:
- the value of the
inputTokenCountrecord component
-
stopReason
Returns the value of thestopReasonrecord component.- Returns:
- the value of the
stopReasonrecord component
-