Package dev.langchain4j.chain
Class ConversationalRetrievalChain.Builder
java.lang.Object
dev.langchain4j.chain.ConversationalRetrievalChain.Builder
- Enclosing class:
ConversationalRetrievalChain
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
chatLanguageModel
(ChatLanguageModel chatLanguageModel) chatMemory
(ChatMemory chatMemory) contentRetriever
(ContentRetriever contentRetriever) promptTemplate
(PromptTemplate promptTemplate) Deprecated, for removal: This API element is subject to removal in a future version.Use this instead:retrievalAugmentor
(RetrievalAugmentor retrievalAugmentor) retriever
(Retriever<TextSegment> retriever) Deprecated, for removal: This API element is subject to removal in a future version.UsecontentRetriever(ContentRetriever)
instead.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
chatLanguageModel
-
chatMemory
-
contentRetriever
-
retrievalAugmentor
public ConversationalRetrievalChain.Builder retrievalAugmentor(RetrievalAugmentor retrievalAugmentor) -
retriever
@Deprecated(forRemoval=true) public ConversationalRetrievalChain.Builder retriever(Retriever<TextSegment> retriever) Deprecated, for removal: This API element is subject to removal in a future version.UsecontentRetriever(ContentRetriever)
instead. -
promptTemplate
@Deprecated(forRemoval=true) public ConversationalRetrievalChain.Builder promptTemplate(PromptTemplate promptTemplate) Deprecated, for removal: This API element is subject to removal in a future version.Use this instead:.retrievalAugmentor(DefaultRetrievalAugmentor.builder() .contentInjector(DefaultContentInjector.builder() .promptTemplate(promptTemplate) .build()) .build());
-
build
-