Class DefaultRetrievalAugmentedEvent
java.lang.Object
dev.langchain4j.observability.event.AbstractAiServiceEvent
dev.langchain4j.observability.event.DefaultRetrievalAugmentedEvent
- All Implemented Interfaces:
AiServiceEvent, RetrievalAugmentedEvent
@Experimental
public class DefaultRetrievalAugmentedEvent
extends AbstractAiServiceEvent
implements RetrievalAugmentedEvent
Default implementation of
RetrievalAugmentedEvent.- Since:
- 1.23.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface AiServiceEvent
AiServiceEvent.Builder<T>Nested classes/interfaces inherited from interface RetrievalAugmentedEvent
RetrievalAugmentedEvent.RetrievalAugmentedEventBuilder -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionReturns the chat message given to theRetrievalAugmentor(seeAugmentationRequest.chatMessage()), before the retrieved contents were added to it.contents()Returns the retrieved contents: the same contents that an AI Service method returningResult<...>gives as its sources.Methods inherited from class AbstractAiServiceEvent
invocationContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AiServiceEvent
invocationContextMethods inherited from interface RetrievalAugmentedEvent
eventClass, toBuilder
-
Constructor Details
-
DefaultRetrievalAugmentedEvent
public DefaultRetrievalAugmentedEvent(RetrievalAugmentedEvent.RetrievalAugmentedEventBuilder builder)
-
-
Method Details
-
chatMessage
Description copied from interface:RetrievalAugmentedEventReturns the chat message given to theRetrievalAugmentor(seeAugmentationRequest.chatMessage()), before the retrieved contents were added to it. In AI Services this is the user message. It is the input of retrieval, not the queries sent to the content retrievers: the retrieval augmentor can transform it into one or more different queries first.- Specified by:
chatMessagein interfaceRetrievalAugmentedEvent- Returns:
- the chat message given to the retrieval augmentor, never
null
-
contents
Description copied from interface:RetrievalAugmentedEventReturns the retrieved contents: the same contents that an AI Service method returningResult<...>gives as its sources.- Specified by:
contentsin interfaceRetrievalAugmentedEvent- Returns:
- the retrieved contents, empty if nothing was retrieved, never
null
-