Record Class PromptResponse
java.lang.Object
java.lang.Record
fr.tiogars.chat.domains.prompt.models.PromptResponse
-
Constructor Summary
ConstructorsConstructorDescriptionPromptResponse(String response, String model, int tokenCount, long processingTimeMs, String finishReason) Creates an instance of aPromptResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefinishReasonrecord component.final inthashCode()Returns a hash code value for this object.model()Returns the value of themodelrecord component.longReturns the value of theprocessingTimeMsrecord component.response()Returns the value of theresponserecord component.intReturns the value of thetokenCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PromptResponse
public PromptResponse(String response, String model, int tokenCount, long processingTimeMs, String finishReason) Creates an instance of aPromptResponserecord class.- Parameters:
response- the value for theresponserecord componentmodel- the value for themodelrecord componenttokenCount- the value for thetokenCountrecord componentprocessingTimeMs- the value for theprocessingTimeMsrecord componentfinishReason- the value for thefinishReasonrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
response
Returns the value of theresponserecord component.- Returns:
- the value of the
responserecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
tokenCount
public int tokenCount()Returns the value of thetokenCountrecord component.- Returns:
- the value of the
tokenCountrecord component
-
processingTimeMs
public long processingTimeMs()Returns the value of theprocessingTimeMsrecord component.- Returns:
- the value of the
processingTimeMsrecord component
-
finishReason
Returns the value of thefinishReasonrecord component.- Returns:
- the value of the
finishReasonrecord component
-