Package akka.javasdk.ledger
Record Class GuardrailDecisionRecord.ToolCall
- Record Components:
toolCallId- the id the model gave the call, or empty when it gave nonetoolName- the name of the called toolorigin- where the tool runs
- Enclosing class:
GuardrailDecisionRecord
public static record GuardrailDecisionRecord.ToolCall(Optional<String> toolCallId, String toolName, GuardrailDecisionRecord.ToolOrigin origin)
extends Record
The tool call a guardrail decided on. Set for a before-tool-call guardrail, and for a
before-agent-response guardrail on the response a control tool carries.
-
Constructor Summary
ConstructorsConstructorDescriptionToolCall(Optional<String> toolCallId, String toolName, GuardrailDecisionRecord.ToolOrigin origin) Creates an instance of aToolCallrecord 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.origin()Returns the value of theoriginrecord component.Returns the value of thetoolCallIdrecord component.toolName()Returns the value of thetoolNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ToolCall
public ToolCall(Optional<String> toolCallId, String toolName, GuardrailDecisionRecord.ToolOrigin origin) Creates an instance of aToolCallrecord class.- Parameters:
toolCallId- the value for thetoolCallIdrecord componenttoolName- the value for thetoolNamerecord componentorigin- the value for theoriginrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
toolCallId
Returns the value of thetoolCallIdrecord component.- Returns:
- the value of the
toolCallIdrecord component
-
toolName
Returns the value of thetoolNamerecord component.- Returns:
- the value of the
toolNamerecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-