Package dev.dokimos.core
Record Class TaskResult
java.lang.Object
java.lang.Record
dev.dokimos.core.TaskResult
- Record Components:
outputs- the outputs the task produced, never null (empty map if absent)metrics- optional metrics for the underlying LLM call, or null if not measured
The outcome of executing a
MeasuredTask: the actual outputs and optional metrics
describing the underlying LLM call.-
Constructor Summary
ConstructorsConstructorDescriptionTaskResult(Map<String, Object> outputs, CallMetrics metrics) Creates an instance of aTaskResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metrics()Returns the value of themetricsrecord component.static TaskResultCreates a result without call metrics.outputs()Returns the value of theoutputsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
of
Creates a result without call metrics.- Parameters:
outputs- the outputs the task produced- Returns:
- a task result with null metrics
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
outputs
Returns the value of theoutputsrecord component.- Returns:
- the value of the
outputsrecord component
-
metrics
Returns the value of themetricsrecord component.- Returns:
- the value of the
metricsrecord component
-