Uses of Interface
dev.langchain4j.observability.api.listener.AiServiceListener
Packages that use AiServiceListener
Package
Description
-
Uses of AiServiceListener in dev.langchain4j.observability.api
Methods in dev.langchain4j.observability.api with parameters of type AiServiceListenerModifier and TypeMethodDescriptiondefault void
AiServiceListenerRegistrar.register
(AiServiceListener<?>... listeners) Registers one or moreAiServiceListener
instances to receiveAiServiceEvent
notifications.<T extends AiServiceEvent>
voidAiServiceListenerRegistrar.register
(AiServiceListener<T> listener) Registers a listener to receiveAiServiceEvent
notifications.<T extends AiServiceEvent>
voidDefaultAiServiceListenerRegistrar.register
(AiServiceListener<T> listener) Registers a listener to receiveAiServiceEvent
notifications.default void
AiServiceListenerRegistrar.unregister
(AiServiceListener<?>... listeners) Unregisters one or moreAiServiceListener
instances to receiveAiServiceEvent
notifications.<T extends AiServiceEvent>
voidAiServiceListenerRegistrar.unregister
(AiServiceListener<T> listener) Unregisters a previously registeredAiServiceListener
, stopping it from receiving furtherAiServiceEvent
notifications.<T extends AiServiceEvent>
voidDefaultAiServiceListenerRegistrar.unregister
(AiServiceListener<T> listener) Unregisters a previously registeredAiServiceListener
, stopping it from receiving furtherAiServiceEvent
notifications.Method parameters in dev.langchain4j.observability.api with type arguments of type AiServiceListenerModifier and TypeMethodDescriptiondefault void
AiServiceListenerRegistrar.register
(Iterable<? extends AiServiceListener<?>> listeners) Registers a collection ofAiServiceListener
instances to receiveAiServiceEvent
notifications.default void
AiServiceListenerRegistrar.unregister
(Iterable<? extends AiServiceListener<?>> listeners) Unregisters a collection ofAiServiceListener
instances to receiveAiServiceEvent
notifications. -
Uses of AiServiceListener in dev.langchain4j.observability.api.listener
Subinterfaces of AiServiceListener in dev.langchain4j.observability.api.listenerModifier and TypeInterfaceDescriptioninterface
A listener forAiServiceCompletedEvent
, which represents an event that occurs upon the completion of an AI Service invocation.interface
A listener forAiServiceErrorEvent
, which represents an event that occurs when an AI Service invocation fails.interface
A listener forAiServiceResponseReceivedEvent
, which represents an event that occurs when a response from a large language model (LLM) is received.interface
A listener forAiServiceStartedEvent
, which represents an event that occurs when an AI Service invocation starts.interface
GuardrailExecutedListener<E extends GuardrailExecutedEvent<P,
R, G>, P extends GuardrailRequest<P>, R extends GuardrailResult<R>, G extends Guardrail<P, R>> Represents a listener for events of typeGuardrailExecutedEvent
, which are triggered when a guardrail validation is executed.interface
A specialized listener interface for handling events of typeInputGuardrailExecutedEvent
, which are triggered upon the execution of input guardrail validations.interface
An event listener specifically designed to handleOutputGuardrailExecutedEvent
.interface
A listener forToolExecutedEvent
, which represents an event that occurs after a tool is executed within an AI Service invocation. -
Uses of AiServiceListener in dev.langchain4j.service
Methods in dev.langchain4j.service with parameters of type AiServiceListenerModifier and TypeMethodDescription<I extends AiServiceEvent>
AiServices<T> AiServices.registerListener
(AiServiceListener<I> listener) Registers anAiServiceListener
listener for AI service events for this AI Service.AiServices.registerListeners
(AiServiceListener<?>... listeners) Registers one or more invocation event listeners to the AI service.<I extends AiServiceEvent>
AiServices<T> AiServices.unregisterListener
(AiServiceListener<I> listener) Unregisters anAiServiceListener
listener for AI service events for this AI Service.AiServices.unregisterListeners
(AiServiceListener<?>... listeners) Unregisters one or more invocation event listeners from the AI service.Method parameters in dev.langchain4j.service with type arguments of type AiServiceListenerModifier and TypeMethodDescriptionAiServices.registerListeners
(Collection<? extends AiServiceListener<?>> listeners) Registers one or more invocation event listeners to the AI service.AiServices.unregisterListeners
(Collection<? extends AiServiceListener<?>> listeners) Unregisters one or more invocation event listeners to the AI service.