Class StuffDocumentsChain
java.lang.Object
com.hw.langchain.chains.base.Chain
com.hw.langchain.chains.combine.documents.base.BaseCombineDocumentsChain
com.hw.langchain.chains.combine.documents.stuff.StuffDocumentsChain
Chain that combines documents by stuffing into context.
- Author:
- HamaWhite
-
Field Summary
Fields inherited from class com.hw.langchain.chains.combine.documents.base.BaseCombineDocumentsChain
inputKey, outputKey
-
Constructor Summary
ConstructorDescriptionStuffDocumentsChain
(LLMChain llmChain, BasePromptTemplate documentPrompt, String documentVariableName, String documentSeparator) StuffDocumentsChain
(LLMChain llmChain, String documentVariableName) -
Method Summary
Modifier and TypeMethodDescriptionCombine documents into a single string async.Stuff all documents into one prompt and pass to LLM.Methods inherited from class com.hw.langchain.chains.combine.documents.base.BaseCombineDocumentsChain
asyncInnerCall, innerCall, inputKeys, outputKeys, promptLength
-
Constructor Details
-
StuffDocumentsChain
-
StuffDocumentsChain
public StuffDocumentsChain(LLMChain llmChain, BasePromptTemplate documentPrompt, String documentVariableName, String documentSeparator)
-
-
Method Details
-
combineDocs
public org.apache.commons.lang3.tuple.Pair<String,Map<String, combineDocsString>> (List<Document> docs, Map<String, Object> kwargs) Stuff all documents into one prompt and pass to LLM.- Specified by:
combineDocs
in classBaseCombineDocumentsChain
-
asyncCombineDocs
public reactor.core.publisher.Flux<org.apache.commons.lang3.tuple.Pair<String,Map<String, asyncCombineDocsString>>> (List<Document> docs, Map<String, Object> kwargs) Description copied from class:BaseCombineDocumentsChain
Combine documents into a single string async.- Specified by:
asyncCombineDocs
in classBaseCombineDocumentsChain
-
chainType
-