Interface IAIRAGUtils


public interface IAIRAGUtils
Utility interface for AI RAG operations
  • Method Details

    • getContentSource

      IContentSource<?> getContentSource(IRichAIConfiguration richAIConfiguration, IReport report)
      Get the content source for the given rich AI configuration
      Parameters:
      richAIConfiguration - Rich AI configuration
      report - Report to log errors
      Returns:
      Content source
    • getEmbeddingModel

      IContentModelWrapper<?> getEmbeddingModel(IRichAIConfiguration richAIConfiguration)
      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 context
      richAIConfiguration - Rich AI configuration
      Returns:
      Content retriever wrapper
    • ingest

      void ingest(IRichAIConfiguration richAIConfiguration, IReport report)
      Ingest RAG content from the content source of the given rich AI configuration
      Parameters:
      richAIConfiguration - Rich AI configuration
      report - Report to log errors
    • getRichAI

      IRichAIConfiguration getRichAI(IContext userContext, String reference)
      Get a rich AI configuration by its reference
      Parameters:
      userContext - User context
      reference - Reference of the rich AI configuration
      Returns:
      Rich AI configuration or null if not found
    • wrapDocument

      <T> IDocument<T> wrapDocument(T rawDocument)
      Wrap a raw document into an IDocument
      Parameters:
      rawDocument - Raw document
      Returns:
      Wrapped document
    • wrapDocuments

      <T> List<IDocument<T>> wrapDocuments(List<T> rawDocuments)
      Wrap a list of raw documents into a list of IDocuments
      Parameters:
      rawDocuments - List of raw documents
      Returns:
      List of wrapped documents
    • createMultiModalContent

      IMultimodalContent createMultiModalContent(String mimeType, InputStream inputStream)
      Create a multimodal content bean from an input stream
      Parameters:
      mimeType - Mime type of the content
      inputStream - Input stream of the content
      Returns:
      Multimodal content