Class AiKnowledgeBase


@Entity public class AiKnowledgeBase extends AuditableModel
  • Constructor Details

    • AiKnowledgeBase

      public AiKnowledgeBase()
    • AiKnowledgeBase

      public AiKnowledgeBase(String code, String name)
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in class Model
    • setId

      public void setId(Long id)
      Specified by:
      setId in class Model
    • getCode

      public String getCode()
    • setCode

      public void setCode(String code)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getEmbeddingModel

      public AiModel getEmbeddingModel()
    • setEmbeddingModel

      public void setEmbeddingModel(AiModel embeddingModel)
    • getChunkSize

      public Integer getChunkSize()
    • setChunkSize

      public void setChunkSize(Integer chunkSize)
    • getChunkOverlap

      public Integer getChunkOverlap()
    • setChunkOverlap

      public void setChunkOverlap(Integer chunkOverlap)
    • getMaxResults

      public Integer getMaxResults()
    • setMaxResults

      public void setMaxResults(Integer maxResults)
    • getMinScore

      public BigDecimal getMinScore()
    • setMinScore

      public void setMinScore(BigDecimal minScore)
    • getIsGlobal

      public Boolean getIsGlobal()
    • setIsGlobal

      public void setIsGlobal(Boolean isGlobal)
    • getIsEnabled

      public Boolean getIsEnabled()
    • setIsEnabled

      public void setIsEnabled(Boolean isEnabled)
    • getSources

      public List<AiKnowledgeSource> getSources()
    • setSources

      public void setSources(List<AiKnowledgeSource> sources)
    • addSource

      public void addSource(AiKnowledgeSource item)
      Add the given AiKnowledgeSource item to the sources collection.

      It sets item.knowledgeBase = this to ensure the proper relationship.

      Parameters:
      item - the item to add
    • removeSource

      public void removeSource(AiKnowledgeSource item)
      Remove the given AiKnowledgeSource item from the sources collection.
      Parameters:
      item - the item to remove
    • clearSources

      public void clearSources()
      Clear the sources collection.
    • getAttrs

      public String getAttrs()
    • setAttrs

      public void setAttrs(String attrs)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object