Skip to content

Commit 0b94f8b

Browse files
committed
Add clarification about WebSearchRetrievalAugmentor
1 parent e812cb3 commit 0b94f8b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

samples/chatbot-web-search/src/main/java/io/quarkiverse/langchain4j/sample/chatbot/WebSearchRetrievalAugmentor.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
import java.util.Collections;
1313
import java.util.function.Supplier;
1414

15+
/**
16+
* IMPORTANT: Note that this retrieval augmentor isn't used by the sample out of the box.
17+
* It shows an alternative approach to using a web search engine - by default,
18+
* the bot uses the tools from dev.langchain4j.web.search.WebSearchTool.
19+
* If you want to switch it to this retrieval augmentor, modify the Bot interface and
20+
* add a "retrievalAugmentor = WebSearchRetrievalAugmentor.class" parameter to
21+
* the @RegisterAiService annotation. However, this will prevent the bot from using
22+
* the AdditionalTools.getTodaysDate() method before calling Tavily.
23+
*/
1524
@ApplicationScoped
1625
public class WebSearchRetrievalAugmentor implements Supplier<RetrievalAugmentor> {
1726

0 commit comments

Comments
 (0)