Package akka.javasdk.ledger
Record Class ModelResponse
- Record Components:
id- the id of this model response, a seam for correlating finer-grained recordscontent- the text content the model producedinputTokenCount- the number of tokens in the input to this model calloutputTokenCount- the number of tokens the model producedthinking- the model's reasoning/thinking output, or empty if none was recordedtoolCalls- the tool calls the model requested within this response, in order
public record ModelResponse(String id, String content, int inputTokenCount, int outputTokenCount, String thinking, List<ToolCall> toolCalls)
extends Record
A single model call within an interaction.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.intReturns the value of theinputTokenCountrecord component.intReturns the value of theoutputTokenCountrecord component.thinking()Returns the value of thethinkingrecord component.Returns the value of thetoolCallsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModelResponse
public ModelResponse(String id, String content, int inputTokenCount, int outputTokenCount, String thinking, List<ToolCall> toolCalls) Creates an instance of aModelResponserecord class.- Parameters:
id- the value for theidrecord componentcontent- the value for thecontentrecord componentinputTokenCount- the value for theinputTokenCountrecord componentoutputTokenCount- the value for theoutputTokenCountrecord componentthinking- the value for thethinkingrecord componenttoolCalls- the value for thetoolCallsrecord component
-
-
Method Details
-
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
inputTokenCount
public int inputTokenCount()Returns the value of theinputTokenCountrecord component.- Returns:
- the value of the
inputTokenCountrecord component
-
outputTokenCount
public int outputTokenCount()Returns the value of theoutputTokenCountrecord component.- Returns:
- the value of the
outputTokenCountrecord component
-
thinking
Returns the value of thethinkingrecord component.- Returns:
- the value of the
thinkingrecord component
-
toolCalls
Returns the value of thetoolCallsrecord component.- Returns:
- the value of the
toolCallsrecord component
-