Class AiKnowledgeService

java.lang.Object
com.axelor.ai.knowledge.AiKnowledgeService

@Singleton public class AiKnowledgeService extends Object
  • Method Details

    • indexSource

      public void indexSource(AiKnowledgeSource source)
      Index a single source.
    • reindexAll

      public void reindexAll(AiKnowledgeBase kb)
      Re-index all sources in a knowledge base.
    • hasIndexedRecordSources

      public boolean hasIndexedRecordSources(String modelName)
      Whether a save or delete of this model has indexed RECORD sources to keep in sync.
    • indexRecord

      public void indexRecord(String modelName, Model record)
      Auto-sync: re-index a single record across all matching RECORD sources.
    • removeRecord

      public void removeRecord(String modelName, Long recordId)
      Auto-sync: remove a single record embedding across all matching RECORD sources.
    • purge

      public void purge(AiKnowledgeBase kb)
      Removes all embeddings for a knowledge base (by KB id), e.g. before re-seeding its sources.