Package akka.javasdk.agent
Record Class Guardrail.Message.AiMessage
- Record Components:
thinking- the model's thinking, never null, but empty when the model returns noneattributes- values that the model provider sets, never null, but empty when the model provider sets none. The keys and the value types are provider-specific.
- All Implemented Interfaces:
Guardrail.Message
- Enclosing interface:
Guardrail.Message
public static record Guardrail.Message.AiMessage(String text, List<Guardrail.Message.AiMessage.ToolCallRequest> toolCallRequests, Optional<String> thinking, Map<String,Object> attributes)
extends Record
implements Guardrail.Message
A model reply with its text, requested tool calls, thinking, and provider attributes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA tool call the model requested: its id, tool name, and raw arguments.Nested classes/interfaces inherited from interface akka.javasdk.agent.Guardrail.Message
Guardrail.Message.AiMessage, Guardrail.Message.ToolCallResponse, Guardrail.Message.UserMessage -
Constructor Summary
ConstructorsConstructorDescriptionAiMessage(String text, List<Guardrail.Message.AiMessage.ToolCallRequest> toolCallRequests) AiMessage(String text, List<Guardrail.Message.AiMessage.ToolCallRequest> toolCallRequests, Optional<String> thinking, Map<String, Object> attributes) Creates an instance of aAiMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.text()Returns the value of thetextrecord component.thinking()Returns the value of thethinkingrecord component.Returns the value of thetoolCallRequestsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AiMessage
-
AiMessage
public AiMessage(String text, List<Guardrail.Message.AiMessage.ToolCallRequest> toolCallRequests, Optional<String> thinking, Map<String, Object> attributes) Creates an instance of aAiMessagerecord class.- Parameters:
text- the value for thetextrecord componenttoolCallRequests- the value for thetoolCallRequestsrecord componentthinking- the value for thethinkingrecord componentattributes- the value for theattributesrecord 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). -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
toolCallRequests
Returns the value of thetoolCallRequestsrecord component.- Returns:
- the value of the
toolCallRequestsrecord component
-
thinking
Returns the value of thethinkingrecord component.- Returns:
- the value of the
thinkingrecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-