Package dev.langchain4j.observability.api.event
@Experimental
@NullMarked
package dev.langchain4j.observability.api.event
-
ClassDescriptionInvoked when an AI Service invocation is cancelled before it completes, for example when the
Flow.Publishersubscription is cancelled, the returnedCompletableFutureis cancelled, orStreamingHandle.cancel()is called from aTokenStreamcallback that receives a context, such asonPartialResponseWithContext.Builder forAiServiceCancelledEventinstances.Represents an event that occurs upon the completion of an invocation.Builder forDefaultAiServiceCompletedEventinstances.Represents an event that occurs when an AI Service invocation fails.Builder forDefaultAiServiceErrorEventinstances.AiServiceEvent.Builder<T extends AiServiceEvent>An abstract base class for building instances of types that extendAiServiceEvent.A composite event summarizing a single AI Service invocation: all the events fired for it.Builder forAiServiceInvocationSummaryEventinstances.Invoked just before aChatRequestis sent.Builder forDefaultAiServiceResponseReceivedEventinstances.Invoked when response from aChatModelis received.Builder forDefaultAiServiceResponseReceivedEventinstances.Called when an LLM invocation has started.Builder forDefaultAiServiceStartedEventinstances.Why a successfully-executed tool was compensated (rolled back).GuardrailExecutedEvent<P extends GuardrailRequest<P>, R extends GuardrailResult<R>, G extends Guardrail<P,R>> Represents an event that is executed when a guardrail validation occurs.GuardrailExecutedEvent.GuardrailExecutedEventBuilder<P extends GuardrailRequest<P>, R extends GuardrailResult<R>, G extends Guardrail<P,R>, T extends GuardrailExecutedEvent<P, R, G>> Represents an event that is triggered upon the execution of an input guardrail validation.Builder forInputGuardrailExecutedEventinstances.Represents an event executed during the output guardrail validation process.Builder forOutputGuardrailExecutedEventinstances.Invoked once per invocation of an AI Service that uses retrieval-augmented generation (RAG), configured withcontentRetriever(...)orretrievalAugmentor(...), after the contents to add to the user message were retrieved, also when nothing was retrieved.Builder forRetrievalAugmentedEventinstances.Invoked after a successfully-executed tool is compensated (rolled back) - for example when another tool in the same round failed, or when the invocation was cancelled.Invoked after the tool is executed.