Package akka.javasdk.agent
Interface Agent.Effect.MappingResponseBuilder<Result>
- Enclosing interface:
Agent.Effect<T>
public static interface Agent.Effect.MappingResponseBuilder<Result>
-
Method Summary
Modifier and TypeMethodDescriptionMap the response from the model into a different response type.Handle failures that occur during model processing.Reply with the response from the model.Reply with the response from the model.
-
Method Details
-
thenReply
Agent.Effect<Result> thenReply()Reply with the response from the model.- Returns:
- A message reply.
-
thenReply
Reply with the response from the model.- Parameters:
metadata- The metadata for the message.- Returns:
- A message reply.
-
map
Map the response from the model into a different response type. -
onFailure
Handle failures that occur during model processing. This method allows recovery from various types of exceptions including:ModelException- General model processing failuresRateLimitException- API rate limiting exceededModelTimeoutException- Model request timeoutUnsupportedFeatureException- Unsupported model featuresInternalServerException- Internal service errorsJsonParsingException- Response parsing failuresToolCallLimitReachedException- Tool call limit exceededToolCallExecutionException- Function tool execution errorsMcpToolCallExecutionException- MCP tool execution errorsGuardrail.GuardrailException- Guardrail violations
-