Package dev.langchain4j.chain
Class ConversationalRetrievalChain
java.lang.Object
dev.langchain4j.chain.ConversationalRetrievalChain
A chain for conversing with a specified
Chains are not going to be developed further, it is recommended to use
ChatLanguageModel
based on the information retrieved by a specified ContentRetriever
.
Includes a default ChatMemory
(a message window with maximum 10 messages), which can be overridden.
You can fully customize RAG behavior by providing an instance of a RetrievalAugmentor
,
such as DefaultRetrievalAugmentor
, or your own custom implementation.
Chains are not going to be developed further, it is recommended to use
AiServices
instead.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConversationalRetrievalChain
(ChatLanguageModel chatLanguageModel, ChatMemory chatMemory, ContentRetriever contentRetriever) ConversationalRetrievalChain
(ChatLanguageModel chatLanguageModel, ChatMemory chatMemory, RetrievalAugmentor retrievalAugmentor) -
Method Summary
-
Constructor Details
-
ConversationalRetrievalChain
public ConversationalRetrievalChain(ChatLanguageModel chatLanguageModel, ChatMemory chatMemory, ContentRetriever contentRetriever) -
ConversationalRetrievalChain
public ConversationalRetrievalChain(ChatLanguageModel chatLanguageModel, ChatMemory chatMemory, RetrievalAugmentor retrievalAugmentor)
-
-
Method Details