Record Class ModelCall

Object
Record
akka.javasdk.testkit.ModelCall
Record Components:
model - the model name, as sent in the request
provider - the provider name
finishReasons - why the model stopped, as the provider reports it
inputTokens - tokens sent, as the provider reports them; zero when it reports none
outputTokens - tokens received; zero when the provider reports none
duration - the duration of the call
inputMessages - the messages sent, as the runtime renders them; empty when not recorded
outputMessages - 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 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 a ModelCall record class.
      Parameters:
      model - the value for the model record component
      provider - the value for the provider record component
      finishReasons - the value for the finishReasons record component
      inputTokens - the value for the inputTokens record component
      outputTokens - the value for the outputTokens record component
      duration - the value for the duration record component
      inputMessages - the value for the inputMessages record component
      outputMessages - the value for the outputMessages record component
  • Method Details

    • totalTokens

      public long totalTokens()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • model

      public String model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • provider

      public String provider()
      Returns the value of the provider record component.
      Returns:
      the value of the provider record component
    • finishReasons

      public List<String> finishReasons()
      Returns the value of the finishReasons record component.
      Returns:
      the value of the finishReasons record component
    • inputTokens

      public long inputTokens()
      Returns the value of the inputTokens record component.
      Returns:
      the value of the inputTokens record component
    • outputTokens

      public long outputTokens()
      Returns the value of the outputTokens record component.
      Returns:
      the value of the outputTokens record component
    • duration

      public Duration duration()
      Returns the value of the duration record component.
      Returns:
      the value of the duration record component
    • inputMessages

      public String inputMessages()
      Returns the value of the inputMessages record component.
      Returns:
      the value of the inputMessages record component
    • outputMessages

      public String outputMessages()
      Returns the value of the outputMessages record component.
      Returns:
      the value of the outputMessages record component