Record Class RecordedCall

Object
Record
akka.javasdk.testkit.eval.RecordedCall

public record RecordedCall(String tool, Map<String,Object> arguments, String resultJson) extends Record
One tool call as recorded in production: the tool, the arguments the agent passed, and the result as recorded JSON. An EvalCase derived from a recording carries its calls, and ExperimentRunner loads each result into the stub bound to the tool before the turn.
  • Constructor Details

    • RecordedCall

      public RecordedCall(String tool, Map<String,Object> arguments, String resultJson)
      Creates an instance of a RecordedCall record class.
      Parameters:
      tool - the value for the tool record component
      arguments - the value for the arguments record component
      resultJson - the value for the resultJson record component
  • Method Details

    • argument

      public Object argument(String name)
      The recorded value of one argument, or null when the call did not carry it.
    • resultAs

      public <T> T resultAs(Class<T> type)
      The recorded result, read into the given type.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • tool

      public String tool()
      Returns the value of the tool record component.
      Returns:
      the value of the tool record component
    • arguments

      public Map<String,Object> arguments()
      Returns the value of the arguments record component.
      Returns:
      the value of the arguments record component
    • resultJson

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