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
-
Nested Class Summary
Nested classes/interfaces inherited from interface AiServiceStreamingEvent
AiServiceStreamingEvent.AbstractEvent, AiServiceStreamingEvent.AfterToolExecutionEvent, AiServiceStreamingEvent.BeforeToolExecutionEvent, AiServiceStreamingEvent.CompleteToolCallEvent, AiServiceStreamingEvent.FinalResponseEvent, AiServiceStreamingEvent.IntermediateResponseEvent, AiServiceStreamingEvent.PartialResponseEvent, AiServiceStreamingEvent.PartialThinkingEvent, AiServiceStreamingEvent.PartialToolCallEvent, AiServiceStreamingEvent.RawEvent, AiServiceStreamingEvent.RetrievedContentsEvent, AiServiceStreamingEvent.ToolCompensatedEvent -
Constructor Summary
ConstructorsConstructorDescriptionToolCompensatedEvent(ToolExecution toolExecution, CompensationReason reason, InvocationContext invocationContext) -
Method Summary
Methods inherited from class AiServiceStreamingEvent.AbstractEvent
invocationContext
-
Constructor Details
-
ToolCompensatedEvent
public ToolCompensatedEvent(ToolExecution toolExecution, CompensationReason reason, InvocationContext invocationContext)
-
-
Method Details
-
toolExecution
-
reason
-