Package akka.javasdk.testkit
Record Class TestModelProvider.AiResponse
- Enclosing class:
TestModelProvider
public static record TestModelProvider.AiResponse(String message, List<TestModelProvider.ToolInvocationRequest> toolRequests)
extends Record
Represents an AI response, which can include a message and/or list of tool invocation requests.
-
Constructor Summary
ConstructorsConstructorDescriptionAiResponse(TestModelProvider.ToolInvocationRequest toolRequest) Constructs an AI response with only a tool request.AiResponse(String message) Constructs an AI response with only a message.AiResponse(String message, TestModelProvider.ToolInvocationRequest toolRequest) Constructs an AI response with a message and a single tool request.AiResponse(String message, List<TestModelProvider.ToolInvocationRequest> toolRequests) Creates an instance of aAiResponserecord class.AiResponse(List<TestModelProvider.ToolInvocationRequest> toolRequests) Constructs an AI response with a list of tool invocation requests. -
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.message()Returns the value of themessagerecord component.Returns the value of thetoolRequestsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AiResponse
Constructs an AI response with only a message. -
AiResponse
Constructs an AI response with a message and a single tool request. -
AiResponse
Constructs an AI response with only a tool request. -
AiResponse
Constructs an AI response with a list of tool invocation requests. -
AiResponse
Creates an instance of aAiResponserecord class.- Parameters:
message- the value for themessagerecord componenttoolRequests- the value for thetoolRequestsrecord 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). -
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
toolRequests
Returns the value of thetoolRequestsrecord component.- Returns:
- the value of the
toolRequestsrecord component
-