Package akka.javasdk.testkit
Record Class ModelCall
- Record Components:
model- the model name, as sent in the requestprovider- the provider namefinishReasons- why the model stopped, as the provider reports itinputTokens- tokens sent, as the provider reports them; zero when it reports noneoutputTokens- tokens received; zero when the provider reports noneduration- the duration of the callinputMessages- the messages sent, as the runtime renders them; empty when not recordedoutputMessages- the messages received; empty when not recorded
public record ModelCall(String model, String provider, List<String> finishReasons, long inputTokens, long outputTokens, Duration duration, String inputMessages, String outputMessages)
extends Record
One model call made while answering a turn.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefinishReasonsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinputMessagesrecord component.longReturns the value of theinputTokensrecord component.model()Returns the value of themodelrecord component.Returns the value of theoutputMessagesrecord component.longReturns the value of theoutputTokensrecord component.provider()Returns the value of theproviderrecord component.final StringtoString()Returns a string representation of this record class.long
-
Constructor Details
-
ModelCall
public ModelCall(String model, String provider, List<String> finishReasons, long inputTokens, long outputTokens, Duration duration, String inputMessages, String outputMessages) Creates an instance of aModelCallrecord class.- Parameters:
model- the value for themodelrecord componentprovider- the value for theproviderrecord componentfinishReasons- the value for thefinishReasonsrecord componentinputTokens- the value for theinputTokensrecord componentoutputTokens- the value for theoutputTokensrecord componentduration- the value for thedurationrecord componentinputMessages- the value for theinputMessagesrecord componentoutputMessages- the value for theoutputMessagesrecord component
-
-
Method Details
-
totalTokens
public long totalTokens() -
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 '=='. -
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-
finishReasons
Returns the value of thefinishReasonsrecord component.- Returns:
- the value of the
finishReasonsrecord component
-
inputTokens
public long inputTokens()Returns the value of theinputTokensrecord component.- Returns:
- the value of the
inputTokensrecord component
-
outputTokens
public long outputTokens()Returns the value of theoutputTokensrecord component.- Returns:
- the value of the
outputTokensrecord component
-
duration
Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
inputMessages
Returns the value of theinputMessagesrecord component.- Returns:
- the value of the
inputMessagesrecord component
-
outputMessages
Returns the value of theoutputMessagesrecord component.- Returns:
- the value of the
outputMessagesrecord component
-