You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add documentFormatter parameter to ContextualQueryAugmenter
This enhancement adds a documentFormatter parameter to ContextualQueryAugmenter,
allowing users to customize how documents are formatted in the context.
If not specified, the original document formatting logic is preserved.
Signed-off-by: magicgone <[email protected]>
Copy file name to clipboardExpand all lines: spring-ai-core/src/main/java/org/springframework/ai/rag/generation/augmentation/ContextualQueryAugmenter.java
+22-5
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@
18
18
19
19
importjava.util.List;
20
20
importjava.util.Map;
21
+
importjava.util.function.Function;
21
22
importjava.util.stream.Collectors;
22
23
23
24
importorg.slf4j.Logger;
@@ -75,18 +76,29 @@ public final class ContextualQueryAugmenter implements QueryAugmenter {
0 commit comments