Interface ObservabilityListenersProvider
- All Known Implementing Classes:
CaptureListenersProvider
public interface ObservabilityListenersProvider
Provides listeners that are added to every AI Service and to every model call, in addition to the listeners
configured by the user. Implementations are found with
ServiceLoader, once, in the class loader of
LangChain4j. Only implementations in dev.langchain4j packages are used; others are logged and skipped.
This is meant for LangChain4j's own modules (for example langchain4j-test), which need to observe every
AI Service and model without being configured on each one. It is internal and may change at any time. Listeners
provided this way receive the full content of every call (prompts, responses, tool arguments and results).
Model listeners are notified by the default implementations of the model interfaces (for example
ChatModel.chat(ChatRequest)), so models that notify their listeners themselves do not notify them.
-
Method Summary
Modifier and TypeMethodDescriptiondefault List<AiServiceListener<?>> default List<ChatModelListener> default List<DecisionModelListener> default List<EmbeddingModelListener> default List<ModerationModelListener> default List<ScoringModelListener>
-
Method Details
-
aiServiceListeners
-
chatModelListeners
-
embeddingModelListeners
-
moderationModelListeners
-
scoringModelListeners
-
decisionModelListeners
-