接口 RetrievalAugmentor
- 所有已知实现类:
DefaultRetrievalAugmentor
public interface RetrievalAugmentor
Augments the provided
This serves as an entry point into the RAG flow in LangChain4j.
You are free to use the default implementation (
ChatMessage with retrieved Contents.
This serves as an entry point into the RAG flow in LangChain4j.
You are free to use the default implementation (
DefaultRetrievalAugmentor) or to implement a custom one.-
方法概要
修饰符和类型方法说明augment(UserMessage userMessage, Metadata metadata) 已过时。default AugmentationResultaugment(AugmentationRequest augmentationRequest)
-
方法详细资料
-
augment
Augments theChatMessageprovided in theAugmentationRequestwith retrievedContents.
This method has a default implementation in order to temporarily support current custom implementations ofRetrievalAugmentor. The default implementation will be removed soon.- 参数:
augmentationRequest- TheAugmentationRequestcontaining theChatMessageto augment.- 返回:
- The
AugmentationResultcontaining the augmentedChatMessage.
-
augment
已过时。Use/implementaugment(AugmentationRequest)instead.Augments the providedUserMessagewith retrieved content.- 参数:
userMessage- TheUserMessageto be augmented.metadata- TheMetadatathat may be useful or necessary for retrieval and augmentation.- 返回:
- The augmented
UserMessage.
-
augment(AugmentationRequest)instead.