Uses of Interface
dev.langchain4j.observability.api.event.AiServiceEvent
Packages that use AiServiceEvent
Package
Description
-
Uses of AiServiceEvent in dev.langchain4j.observability.api
Methods in dev.langchain4j.observability.api with type parameters of type AiServiceEventModifier and TypeMethodDescription<T extends AiServiceEvent>
voidAiServiceListenerRegistrar.fireEvent(T event) Fires the given event to all registeredAiServiceListeners.<T extends AiServiceEvent>
voidDefaultAiServiceListenerRegistrar.fireEvent(T event) Fires the given event to all registeredAiServiceListeners.<T extends AiServiceEvent>
voidAiServiceListenerRegistrar.register(AiServiceListener<T> listener) Registers a listener to receiveAiServiceEventnotifications.<T extends AiServiceEvent>
voidDefaultAiServiceListenerRegistrar.register(AiServiceListener<T> listener) Registers a listener to receiveAiServiceEventnotifications.<T extends AiServiceEvent>
voidAiServiceListenerRegistrar.unregister(AiServiceListener<T> listener) Unregisters a previously registeredAiServiceListener, stopping it from receiving furtherAiServiceEventnotifications.<T extends AiServiceEvent>
voidDefaultAiServiceListenerRegistrar.unregister(AiServiceListener<T> listener) Unregisters a previously registeredAiServiceListener, stopping it from receiving furtherAiServiceEventnotifications. -
Uses of AiServiceEvent in dev.langchain4j.observability.api.event
Classes in dev.langchain4j.observability.api.event with type parameters of type AiServiceEventModifier and TypeClassDescriptionstatic classAiServiceEvent.Builder<T extends AiServiceEvent>An abstract base class for building instances of types that extendAiServiceEvent.Subinterfaces of AiServiceEvent in dev.langchain4j.observability.api.eventModifier and TypeInterfaceDescriptioninterfaceInvoked when an AI Service invocation is cancelled before it completes, for example when theFlow.Publishersubscription is cancelled, the returnedCompletableFutureis cancelled, orStreamingHandle.cancel()is called from aTokenStreamcallback that receives a context, such asonPartialResponseWithContext.interfaceRepresents an event that occurs upon the completion of an invocation.interfaceRepresents an event that occurs when an AI Service invocation fails.interfaceA composite event summarizing a single AI Service invocation: all the events fired for it.interfaceInvoked just before aChatRequestis sent.interfaceInvoked when response from aChatModelis received.interfaceCalled when an LLM invocation has started.interfaceGuardrailExecutedEvent<P extends GuardrailRequest<P>, R extends GuardrailResult<R>, G extends Guardrail<P,R>> Represents an event that is executed when a guardrail validation occurs.interfaceRepresents an event that is triggered upon the execution of an input guardrail validation.interfaceRepresents an event executed during the output guardrail validation process.interfaceInvoked 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.interfaceInvoked 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.interfaceInvoked after the tool is executed.Methods in dev.langchain4j.observability.api.event with type parameters of type AiServiceEventModifier and TypeMethodDescription<T extends AiServiceEvent>
Class<T> AiServiceEvent.eventClass()Retrieves the class type of the event, representing the specific category of the AI Service invocation event.<T extends AiServiceEvent>
AiServiceEvent.Builder<T> AiServiceEvent.toBuilder()Creates a new builder instance initialized with the properties of thisAiServiceEvent.Methods in dev.langchain4j.observability.api.event that return types with arguments of type AiServiceEventModifier and TypeMethodDescriptionAiServiceInvocationSummaryEvent.AiServiceInvocationSummaryEventBuilder.events()Returns the events added to this builder.AiServiceInvocationSummaryEvent.events()Returns all the events fired for this AI Service invocation, in the order they were fired.Methods in dev.langchain4j.observability.api.event with parameters of type AiServiceEventModifier and TypeMethodDescriptionAiServiceInvocationSummaryEvent.AiServiceInvocationSummaryEventBuilder.event(AiServiceEvent event) Appends a single event to the events previously added to this builder.Method parameters in dev.langchain4j.observability.api.event with type arguments of type AiServiceEventModifier and TypeMethodDescriptionAiServiceInvocationSummaryEvent.AiServiceInvocationSummaryEventBuilder.events(List<AiServiceEvent> events) Sets the events, replacing any events previously added to this builder. -
Uses of AiServiceEvent in dev.langchain4j.observability.api.listener
Classes in dev.langchain4j.observability.api.listener with type parameters of type AiServiceEventModifier and TypeInterfaceDescriptioninterfaceAiServiceListener<T extends AiServiceEvent>AAiServiceEventlistener that listens for -
Uses of AiServiceEvent in dev.langchain4j.observability.event
Classes in dev.langchain4j.observability.event that implement AiServiceEventModifier and TypeClassDescriptionclassclassDefault implementation ofAiServiceCancelledEvent.classDefault implementation ofAiServiceCompletedEvent.classDefault implementation ofAiServiceErrorEvent.classDefault implementation ofAiServiceInvocationSummaryEvent.classDefault implementation ofAiServiceRequestIssuedEvent.classDefault implementation ofAiServiceResponseReceivedEvent.classDefault implementation ofAiServiceStartedEvent.classDefaultGuardrailExecutedEvent<P extends GuardrailRequest<P>, R extends GuardrailResult<R>, G extends Guardrail<P,R>, E extends GuardrailExecutedEvent<P, R, G>> Represents an event that is executed when a guardrail validation occurs.classDefault implementation ofInputGuardrailExecutedEvent.classDefault implementation ofOutputGuardrailExecutedEvent.classDefault implementation ofRetrievalAugmentedEvent.classDefault implementation ofToolCompensatedEvent.classDefault implementation ofToolExecutedEvent.Methods in dev.langchain4j.observability.event that return types with arguments of type AiServiceEvent -
Uses of AiServiceEvent in dev.langchain4j.service
Methods in dev.langchain4j.service with type parameters of type AiServiceEventModifier and TypeMethodDescription<I extends AiServiceEvent>
AiServices<T> AiServices.registerListener(AiServiceListener<I> listener) Registers anAiServiceListenerlistener for AI service events for this AI Service.<I extends AiServiceEvent>
AiServices<T> AiServices.unregisterListener(AiServiceListener<I> listener) Unregisters anAiServiceListenerlistener for AI service events for this AI Service.