Skip to content

simplicitesoftware/SimAi

Repository files navigation


SimAI module definition

SimAI is an addon of AiBySimplicite containing a simplified business process for automatic module generation.

Installation

Classic

  1. Make sure you have the AiBySimplicite module installed
  2. Add this module in your Simplicite instance
  3. Create a user and configure SAI_CREATE_MODULE rights

Portainer

In docker compose add the environement parameter to:

{
     "completion_url": "",
     "bot_name": "",
     "code_max_token": "",
     "provider": "",
     "api_key": "",
     "default_max_token": "",
     "showDataDisclaimer": true,
     "data_number": "",
     "hist_depth": "",
     "model": "",
     "stt_url": "",
     "ping_url": ""
}
  • Define user information usrName and password.

Example:

environment:
      MODULES_IMPORT_SPEC: |
        title: "AI External"
        modules:
          - name: "SimThemes"
            version: "0.3"
            git:
              uri: "https://github.com/simplicitesoftware/module-theming"
          - name: "AIBySimplicite"
            version: "0.31"
            git:
              uri: "https://github.com/simplicitesoftware/module_ai.git"
              branch: "simplifiedProcess"
          - name: "SimAi"
            version: "0.4"
            datasets: true 
            unittests: true
            git:
              uri: "https://github.com/CBimont/SimAi.git"

        
      SIMPLICITE_SYSPARAM_AI_API_PARAM: |
        {
         "completion_url": "https://api.mistral.ai/v1/chat/completions",
         "bot_name": "George",
         "code_max_token": "2000",
         "provider": "Mistral AI",
         "api_key": "${mistral_api_key}",
         "default_max_token": "5000",
         "showDataDisclaimer": true,
         "data_number": "3",
         "hist_depth": "3",
         "model": "pixtral-12b-2409",
         "stt_url": "",
         "ping_url": "https://api.mistral.ai/v1/models"
        }
      usrName: "${user_name}"
      password: "${user_password}"

SaiContactWidget widget definition

Widget for home page (contact)

createAiUser unit test

Create a new user granted to process with usrName and password environment variable, dedicated for docker compose auto deployment.

SaiApplicationExample business object definition

Chat prompt examples

Fields

Name Type Required Updatable Personal Description
saiSaeTitle char(50) yes* yes -
saiSaeTitleEnglish char(100) yes* yes -
saiSaeSummary text(350) yes -
saiSaePrompt text(1500) yes -
saiSaeSummaryEnglish text(350) yes -
saiSaePromptEnglish text(1500) yes -

SaiContact business object definition

Management of commercial contact and module registration.

Fields

Name Type Required Updatable Personal Description
saiContactName char(100) yes -
saiContactEmail email(100) yes -
saiContactPhone phone(100) yes -
saiContactComment text(1000) yes -
saiCntModuleId link to Module id yes* yes -
Ref. saiCntModuleId.mdl_name regexp(100) Module name
Ref. saiCntModuleId.mdl_xml document Module file
saiCntSended boolean yes -
saiCntDeletion datetime -
saiCntViewhomeId link to ViewHome id -
Ref. saiCntViewhomeId.viw_name char(100) -

SaiContactDashboard external object definition

SaiCreateModuleApi external object definition

Custom endpoint, Interface with the AIBySimplicite process.

SaiErrorPage external object definition

External page, redirect page in case of technical error (such as inaccessible Mistral API or missing token).

SaiNewModuleFront external object definition

External page, module generation process.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published