Class AiConfig

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class AiConfig
    extends java.lang.Object
    implements java.lang.Cloneable
    Class that holds the AI configuration properties.
    Since:
    16.1.0
    Version:
    $Revision: 26587 $ $Date: 2024-08-26 21:09:17 -0300 (Mon, 26 Aug 2024) $
    • Constructor Detail

      • AiConfig

        public AiConfig()
    • Method Detail

      • getCurrentConfiguration

        public static AiConfig getCurrentConfiguration()
        Returns the current AI configuration.
        Returns:
        Since:
        16.1.0
      • update

        public static void update​(AiConfig newConfig)
        Updates the AI configuration and applies it to all cluster servers.
        Parameters:
        newConfig - the new configuration to apply.
        Since:
        16.1.0
      • clone

        protected AiConfig clone()
        Overrides:
        clone in class java.lang.Object
      • getEncryptedApiKey

        public java.lang.String getEncryptedApiKey()
        Encrypted key used to connect to the OpenAI API.
        Returns:
        the API key
        Since:
        16.1.0
      • setApiKey

        public void setApiKey​(java.lang.String apiKey)
        Define the key used to connect to the OpenAI API.
        Parameters:
        apiKey - String the API key.
        Since:
        16.1.0
      • getEmbeddingsModel

        public java.lang.String getEmbeddingsModel()
        The model of embeddings used on requests.
        Returns:
        the embeddings model.
        Since:
        16.1.0
      • setEmbeddingsModel

        public void setEmbeddingsModel​(java.lang.String embeddingsModel)
        Define the model of embeddings used for the request.
        Parameters:
        embeddingsModel - String the embedding model.
        Since:
        16.1.0
      • getEmbeddingsChunkSize

        public int getEmbeddingsChunkSize()
        Maximum size of generated fragments, when calculating embeddings of a text.
        Returns:
        the number of characters.
        Since:
        16.1.0
      • setEmbeddingsChunkSize

        public void setEmbeddingsChunkSize​(int embeddingsChunkSize)
        Define maximum size of generated fragments, when calculating embeddings of a text.
        Parameters:
        embeddingsChunkSize - int the number of characters.
        Since:
        16.1.0
      • isEnableSearchEmbeddings

        public boolean isEnableSearchEmbeddings()
        Indicates whether the default indexing for search should calculate embeddings of indexed texts.
        Returns:
        if the search embeddings is enabled or not.
        Since:
        16.1.0
      • setEnableSearchEmbeddings

        public void setEnableSearchEmbeddings​(boolean enableSearchEmbeddings)
        Define if the default indexing for search should calculate embeddings of indexed texts.
        Parameters:
        enableSearchEmbeddings - boolean if is going to be enabled or not.
        Since:
        16.1.0
      • isEnablePrivateSearchEmbeddings

        public boolean isEnablePrivateSearchEmbeddings()
        If disabled, only indexing of contents with permission to be viewed by all users will have their embeddings calculated. If enabled, indexing of any content will have their embeddings calculated.
        Returns:
        Wether is enabled or not.
        Since:
        16.1.0
      • setEnablePrivateSearchEmbeddings

        public void setEnablePrivateSearchEmbeddings​(boolean enablePrivateSearchEmbeddings)
        Defines if private contents will also have embeddings calculated or just public contents.
        Parameters:
        enablePrivateSearchEmbeddings - boolean if false, it will calculate only for contents with permission to be viewed for all users. if sets as true, any content will have their embeddings calculated.
        Since:
        16.1.0
      • isEnableContentAssistant

        public boolean isEnableContentAssistant()
        Returns if whether the OpenAI content assistant API will be enabled or not.
        Returns:
        if content assistant API is enabled or not.
        Since:
        16.1.0
      • setEnableContentAssistant

        public void setEnableContentAssistant​(boolean enableContentAssistant)
        Defines whether the OpenAI content assistant API will be enabled or not.
        Parameters:
        enableContentAssistant - Boolean true if it will be enabled, false if it will be disabled.
        Since:
        16.1.0
      • getContentAssistantModel

        public java.lang.String getContentAssistantModel()
        Artificial intelligence model that will be used by the content assistant.
        Returns:
        the model
        Since:
        16.1.0
      • setContentAssistantModel

        public void setContentAssistantModel​(java.lang.String contentAssistantModel)
        Define the AI model that will be used by the content assistant.
        Parameters:
        contentAssistantModel - String the AI Model.
        Since:
        16.1.0
      • getVirtualAssistantMaxFragmentSize

        public int getVirtualAssistantMaxFragmentSize()
        Returns the maximum size, in characters, of the knowledge fragments generated for use by the virtual assistant.
        Returns:
        the size in number of characters.
        Since:
        16.1.0
      • setVirtualAssistantMaxFragmentSize

        public void setVirtualAssistantMaxFragmentSize​(int vaMaxFragmentSize)
        Sets the max size, in characters, of the knowledge fragments generated for use by the virtual assistant.
        Parameters:
        vaMaxFragmentSize - the size in number of characters.
        Since:
        16.1.0
      • getVirtualAssistantCompletionModel

        public java.lang.String getVirtualAssistantCompletionModel()
        Returns the AI model to be used by the virtual assistant for chat completion.
        Returns:
        the model.
        Since:
        16.1.0
      • getVirtualAssistantTextAnalysisModel

        public java.lang.String getVirtualAssistantTextAnalysisModel()
        Returns the AI model to be used by the virtual assistant for text analysis.
        Returns:
        the model.
        Since:
        LUM_NEXT_VERSION
      • setVirtualAssistantCompletionModel

        public void setVirtualAssistantCompletionModel​(java.lang.String vaCompletionModel)
        Sets the AI model to be used by the virtual assistant for chat completion.
        Parameters:
        vaCompletionModel - the model.
        Since:
        16.1.0
      • setVirtualAssistantTextAnalysisModel

        public void setVirtualAssistantTextAnalysisModel​(java.lang.String vaTextAnalysisModel)
        Sets the AI model to be used by the virtual assistant for text analysis.
        Parameters:
        vaTextAnalysisModel - the model.
        Since:
        LUM_NEXT_VERSION
      • getVirtualAssistantSearchNumItems

        public int getVirtualAssistantSearchNumItems()
        Returns the maximum number of items searched in each interaction with the virtual assistant.
        Returns:
        the number of items.
        Since:
        16.1.0
      • setVirtualAssistantSearchNumItems

        public void setVirtualAssistantSearchNumItems​(int vaSearchNumItems)
        Sets the maximum number of items searched in each interaction with the virtual assistant.
        Parameters:
        vaSearchNumItems - the number of items.
        Since:
        16.1.0
      • getVirtualAssistantMaxNumInteractions

        public int getVirtualAssistantMaxNumInteractions()
        Returns the maximum number of interactions allowed in the context of the virtual assistant.
        Returns:
        the number of interactions.
        Since:
        16.1.0
      • setVirtualAssistantMaxNumInteractions

        public void setVirtualAssistantMaxNumInteractions​(int vaMaxNumInteractions)
        Sets the maximum number of interactions allowed in the context of the virtual assistant.
        Since:
        16.1.0
      • isCxAssistantEnabled

        public boolean isCxAssistantEnabled()
        Returns whether or not the CX assistant is enabled.
        Returns:
        if it is enabled or not.
        Since:
        17.0.0
      • setCxAssistantEnabled

        public void setCxAssistantEnabled​(boolean cxAssistantEnabled)
        Sets whether the CX is going to be enabled or not.
        Parameters:
        cxAssistantEnabled - boolean enable or disable CX assistant.
        Since:
        17.0.0
      • getCxAssistantCompletionModel

        public java.lang.String getCxAssistantCompletionModel()
        Returns the completion model that is beeing used by the CX assistant.
        Returns:
        the completion model.
        Since:
        17.0.0
      • setCxAssistantCompletionModel

        public void setCxAssistantCompletionModel​(java.lang.String cxAssistantCompletionModel)
        Defines the completion model to be used by the CX assistant.
        Parameters:
        cxAssistantCompletionModel - String the completion model.
        Since:
        17.0.0
      • getCxAssistantMaxNumInteractions

        public int getCxAssistantMaxNumInteractions()
        Returns the max number of interactions that the CX assistant is going to make.
        Returns:
        the number of interactions.
        Since:
        17.0.0
      • setCxAssistantMaxNumInteractions

        public void setCxAssistantMaxNumInteractions​(java.lang.Integer cxAssistantMaxNumInteractions)
        Defines the max number of interactions that the CX assistant is going to make. The minimum value is 1.
        Parameters:
        cxAssistantMaxNumInteractions - int the number of interactions.
        Since:
        17.0.0
      • getCxAssistantVariationIntensity

        public int getCxAssistantVariationIntensity()
        Returns the intensity used by the CX assistant.
        Returns:
        the intensity.
        Since:
        17.0.0
      • setCxAssistantVariationIntensity

        public void setCxAssistantVariationIntensity​(java.lang.Integer cxAssistantVariationIntensity)
        Defines the intensity variation that is going be used by the CX assistant.
        Parameters:
        cxAssistantVariationIntensity - int the intensity.
        Since:
        17.0.0
      • getCxAssistantInstructions

        public java.lang.String getCxAssistantInstructions()
        Returns the instructions used by the CX assistant.
        Returns:
        the instructions used.
        Since:
        17.0.0
      • setCxAssistantInstructions

        public void setCxAssistantInstructions​(java.lang.String cxAssistantInstructions)
        Defines the instructions that is going to be used by the CX assistant.
        Parameters:
        cxAssistantInstructions - String the instructions.
        Since:
        17.0.0