Package org.codelibs.fess.chat
Interface ChatContentFetcher
- All Known Implementing Classes:
DefaultChatContentFetcher
public interface ChatContentFetcher
Resolves the content of relevant documents for the LLM answer context.
Implementations decide, per document, whether to use the full content or
query-relevant highlighted passages (e.g. based on document size), so that
large documents do not crowd out the answer context. The default
implementation is DefaultChatContentFetcher; replace the
chatContentFetcher DI component to override the behavior.
-
Method Summary
Modifier and TypeMethodDescriptionfetchContent(ChatContentRequest request) Resolves the LLM-context content for the given relevant documents.
-
Method Details
-
fetchContent
Resolves the LLM-context content for the given relevant documents.- Parameters:
request- the fetch request (doc ids, search results, query)- Returns:
- document maps in the same order as
request.getDocIds(), each with thecontentfield set to the text to send to the LLM
-