Interface AiServiceCancelledEvent
- All Superinterfaces:
AiServiceEvent
- All Known Implementing Classes:
DefaultAiServiceCancelledEvent
Invoked when an AI Service invocation is cancelled before it completes, for example when the
Flow.Publisher
subscription is cancelled, the returned CompletableFuture is cancelled, or
StreamingHandle.cancel() is called from a TokenStream callback
that receives a context, such as onPartialResponseWithContext. It means that cancellation was requested: the
model provider or a tool may still finish work that was already running. A cancelled invocation fires neither
AiServiceCompletedEvent nor AiServiceErrorEvent. Events of work that was already running when the
invocation was cancelled (for example a ToolExecutedEvent) can still arrive after this event.- Since:
- 1.23.0
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface AiServiceEvent
AiServiceEvent.Builder<T> -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default Class<AiServiceCancelledEvent> Retrieves the class type of the event, representing the specific category of the AI Service invocation event.Creates a new builder instance initialized with the properties of thisAiServiceEvent.Methods inherited from interface AiServiceEvent
invocationContext
-
Method Details
-
eventClass
Description copied from interface:AiServiceEventRetrieves the class type of the event, representing the specific category of the AI Service invocation event.- Specified by:
eventClassin interfaceAiServiceEvent
-
toBuilder
Description copied from interface:AiServiceEventCreates a new builder instance initialized with the properties of thisAiServiceEvent. This allows modification of the existing properties and reconstruction of the event.- Specified by:
toBuilderin interfaceAiServiceEvent
-
builder
-