Class AiServiceStreamingEvent.ToolCompensatedEvent

java.lang.Object
dev.langchain4j.service.AiServiceStreamingEvent.AbstractEvent
dev.langchain4j.service.AiServiceStreamingEvent.ToolCompensatedEvent
All Implemented Interfaces:
AiServiceStreamingEvent
Enclosing interface:
AiServiceStreamingEvent

public static final class AiServiceStreamingEvent.ToolCompensatedEvent extends AiServiceStreamingEvent.AbstractEvent
Signals that a successfully-executed tool was compensated (rolled back) — for example because another tool in the same round failed. It carries the ToolExecution that was rolled back (its request and original successful result) and the CompensationReason.

Note: this event is not emitted on cancellation. Cancelling the subscription also cancels the stream, and the Reactive Streams contract forbids delivering further events after a cancel; a rollback triggered by cancellation is instead observable through the ToolCompensatedEvent observability listener.

Since:
1.20.0