Package com.axemble.vdoc.sdk.utils
Interface IAIRAGUtils
public interface IAIRAGUtils
Utility interface for AI RAG operations
-
Method Summary
Modifier and TypeMethodDescriptioncreateMultiModalContent(String mimeType, InputStream inputStream) Create a multimodal content bean from an input streamgetContentRetriever(IContext userContext, IRichAIConfiguration richAIConfiguration) Get the content retriever for the given rich AI configurationgetContentSource(IRichAIConfiguration richAIConfiguration, IReport report) Get the content source for the given rich AI configurationgetEmbeddingModel(IRichAIConfiguration richAIConfiguration) Get the embedding model for the given rich AI configurationGet a rich AI configuration by its referencevoidingest(IRichAIConfiguration richAIConfiguration, IReport report) Ingest RAG content from the content source of the given rich AI configuration<T> IDocument<T> wrapDocument(T rawDocument) Wrap a raw document into an IDocumentwrapDocuments(List<T> rawDocuments) Wrap a list of raw documents into a list of IDocuments
-
Method Details
-
getContentSource
Get the content source for the given rich AI configuration- Parameters:
richAIConfiguration- Rich AI configurationreport- Report to log errors- Returns:
- Content source
-
getEmbeddingModel
Get the embedding model for the given rich AI configuration- Parameters:
richAIConfiguration- Rich AI configuration- Returns:
- Embedding model wrapper
-
getContentRetriever
IContentRetrieverWrapper<?,?> getContentRetriever(IContext userContext, IRichAIConfiguration richAIConfiguration) Get the content retriever for the given rich AI configuration- Parameters:
userContext- User contextrichAIConfiguration- Rich AI configuration- Returns:
- Content retriever wrapper
-
ingest
Ingest RAG content from the content source of the given rich AI configuration- Parameters:
richAIConfiguration- Rich AI configurationreport- Report to log errors
-
getRichAI
Get a rich AI configuration by its reference- Parameters:
userContext- User contextreference- Reference of the rich AI configuration- Returns:
- Rich AI configuration or null if not found
-
wrapDocument
Wrap a raw document into an IDocument- Parameters:
rawDocument- Raw document- Returns:
- Wrapped document
-
wrapDocuments
Wrap a list of raw documents into a list of IDocuments- Parameters:
rawDocuments- List of raw documents- Returns:
- List of wrapped documents
-
createMultiModalContent
Create a multimodal content bean from an input stream- Parameters:
mimeType- Mime type of the contentinputStream- Input stream of the content- Returns:
- Multimodal content
-