Package akka.javasdk.testkit
Class TestModelProvider.WhenClause
Object
akka.javasdk.testkit.TestModelProvider.WhenClause
- Direct Known Subclasses:
TestModelProvider.WhenToolReplyClause
- Enclosing class:
TestModelProvider
public static sealed class TestModelProvider.WhenClause
extends Object
permits TestModelProvider.WhenToolReplyClause
Base class for building reply configurations for specific input predicates.
-
Constructor Summary
ConstructorsConstructorDescriptionWhenClause(TestModelProvider provider, Predicate<TestModelProvider.InputMessage> predicate) -
Method Summary
Modifier and TypeMethodDescriptionvoidfailWith(RuntimeException error) Reply with a runtime exception for matching requests.voidreply(TestModelProvider.AiResponse response) Reply with a custom AI response for matching requests.voidReply with a tool invocation request for matching requests.voidReply with a simple message for matching requests.voidreply(List<TestModelProvider.ToolInvocationRequest> requests) Reply with a list of tool invocation requests for matching requests.
-
Constructor Details
-
WhenClause
-
-
Method Details
-
reply
Reply with a simple message for matching requests. -
reply
Reply with a tool invocation request for matching requests. -
reply
Reply with a list of tool invocation requests for matching requests. -
reply
Reply with a custom AI response for matching requests. -
failWith
Reply with a runtime exception for matching requests.
-