From 99f2acc46ebeda87991e1d46464d90dafe406792 Mon Sep 17 00:00:00 2001 From: Florian Klinger Date: Mon, 8 Apr 2024 12:25:59 +0200 Subject: [PATCH 1/4] Added summarai to documentation Signed-off-by: Florian Klinger --- admin_manual/ai/app_summarai.rst | 133 +++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 admin_manual/ai/app_summarai.rst diff --git a/admin_manual/ai/app_summarai.rst b/admin_manual/ai/app_summarai.rst new file mode 100644 index 00000000000..5c3f9cd062b --- /dev/null +++ b/admin_manual/ai/app_summarai.rst @@ -0,0 +1,133 @@ +========================================== +App: SummarAI (Talk chat summarize bot) +========================================== + +.. _ai-app-sumarai: + +The *SummarAI* app is one of the apps that utilize the llm or any other configured llm provider in Nextcloud and act as a configurable bot for `Nextcloud Talk`. +The *SummarAI* app can be running on only open source models, on-premise or any configured llm provider and does so entirely on-premises. +Nextcloud can provide customer support upon request, please talk to your account manager for the possibilities. + +The app currently supports the following languages: + +* English (en) + +As the models are entirely open source, the quality of translations may not be comparable to commercially available services. + +Requirements +------------ + +* Minimal Nextcloud version: 27 +* x86 CPU +* Docker +* AppAPI >= 2.3.2 +* Talk +* Assistant +* Local large language model + +Space usage +~~~~~~~~~~~ + + * ~100MB + +Installation +------------ + +0. Make sure the following apps are installed: + + `Nextcloud AppAPI app `_ + + `Nextcloud Talk app (Spreed) `_ + + :ref:`Nextcloud Assistant app` + + One of the following AI model providers: + + `Nextcloud Local large language model app `_ + + `Nextcloud OpenAI and LocalAI integration app `_ + + +Setup (via App Store) +~~~~~~~~~~~~~~ + +1. Install the *SummarAI* app via the "Apps" page in Nextcloud + +2. Enable the *SummarAI* Bot for the selected Chatroom via the three dots menue of the Chatroom (The Bots settings are located inside the *Bot Section*) + +Setup (Manual) +~~~~~~~~~~~~~~ + +After cloning this app *manually* (cloned via git to your apps directory) you will need to execute the following steps: + +1. Change to the folder you have cloned the source to: +.. code-block:: + + cd /path/to/your/nextcloud/webroot/apps/summarai/ + + +2. Build the docker image: +.. code-block:: + + docker build --no-cache -f Dockerfile -t ghcr.io/nextcloud/summarai:latest . + +3. Run the docker image: + +*Info:* + +- APP_VERSION environmet variable should be equal to the version of the *SummarAI Bot* you are using + +- NEXTCLOUD_URL environment variable must be set to your Nextcloud instance's URL, ensuring it's reachable by the docker image. + +.. code-block:: + + sudo docker run -ti -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -e APP_ID=summarai -e APP_HOST=0.0.0.0 -e APP_PORT=9031 -e APP_SECRET=12345 -e APP_VERSION=1.0.0 -e NEXTCLOUD_URL='' -p 9031:9031 ghcr.io/nextcloud/summarai:latest + + +4. Un-register the SummarAI Bot if its already installed + +.. code-block:: + + sudo -u php /path/to/your/nextcloud/webroot/occ app_api:app:unregister summarai + + +5. Register the SummarAI Bot so that your Nextcloud instance is aware of it + +*Info:* Adjust the host value in the following example to the IP the docker image can reache your nextcloud instance on + +.. code-block:: + + sudo -u php ./occ app_api:app:register summarai manual_install --json-info '{ "id": "summarai", "name": "SummarAI", "daemon_config_name": "manual_install", "version": "1.0.0", "secret": "12345", "host": "192.168.0.199", "port": 9031, "scopes": ["AI_PROVIDERS", "NOTIFICATIONS", "TALK", "TALK_BOT", "TEXT_PROCESSING"], "protocol": "http", "system": 1}' --force-scopes --wait-finish + + +6. Enable the *SummarAI* Bot for the selected Chatroom via the three dots menue of the Chatroom (The Bots settings are located inside the *Bot Section*) + +App store +--------- + +You can also find the app in our app store, where you can write a review: ``_ + +Repository +---------- + +You can find the app's code repository on GitHub where you can report bugs and contribute fixes and features: ``_ + +Nextcloud customers should file bugs directly with our Customer Support. + +Ethical AI Rating +----------------- + +The ethical rating of the *SummarAI Bot*, which utilizes a model for text processing through the Nextcloud Assistant app, is significantly influenced by the choice and implementation of the underlying model. + +Learn more about the Nextcloud Ethical AI Rating `in our blog`. + +Known Limitations +----------------- + +* The SummarAI Bot cannot access previous conversations, it only recognizes messages from the moment it was enabled in the chatroom. +* Restarting the server or the SummarAI Docker image will erase any knowledge of messages, as they are not persistently stored. +* Instructional models may occasionally produce inaccurate information. Therefore, they should be employed with caution in non-critical scenarios. It's essential to verify the accuracy of the bot's output before application. +* Make sure to test the instruction model you are using for whether it meets the use-case's quality requirements +* Be aware that AI models can consume a significant amount of energy. It's advisable to consider this factor in the planning and operation of AI systems. +* AI models can exhibit extended processing times when run on CPUs. For enhanced efficiency, utilizing GPU support is recommended to expedite request handling. +* Customer support is available upon request, however we can't solve false or problematic output, most performance issues, or other problems caused by the underlying models. Support is thus limited only to bugs directly caused by the implementation of the app (connectors, API, front-end, AppAPI) From 032d9a0887521ac0855a086f2ef5d26a9ab94f21 Mon Sep 17 00:00:00 2001 From: Florian Klinger Date: Mon, 8 Apr 2024 12:42:50 +0200 Subject: [PATCH 2/4] Extended documentation for summarai Signed-off-by: Florian Klinger --- admin_manual/ai/app_summarai.rst | 36 +++++++++++++++++++++++++++++--- admin_manual/ai/index.rst | 1 + 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/admin_manual/ai/app_summarai.rst b/admin_manual/ai/app_summarai.rst index 5c3f9cd062b..3135e171f90 100644 --- a/admin_manual/ai/app_summarai.rst +++ b/admin_manual/ai/app_summarai.rst @@ -2,7 +2,7 @@ App: SummarAI (Talk chat summarize bot) ========================================== -.. _ai-app-sumarai: +.. _ai-app-summarai: The *SummarAI* app is one of the apps that utilize the llm or any other configured llm provider in Nextcloud and act as a configurable bot for `Nextcloud Talk`. The *SummarAI* app can be running on only open source models, on-premise or any configured llm provider and does so entirely on-premises. @@ -49,7 +49,7 @@ Installation Setup (via App Store) -~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~ 1. Install the *SummarAI* app via the "Apps" page in Nextcloud @@ -102,6 +102,36 @@ After cloning this app *manually* (cloned via git to your apps directory) you wi 6. Enable the *SummarAI* Bot for the selected Chatroom via the three dots menue of the Chatroom (The Bots settings are located inside the *Bot Section*) +Usage +----- + +- After enabling the *SummarAI* Bot in a Chatroom, you can test its functionality by simply sending the message below: + + - @summarai + + > Hi! I am here and listening + +- A full list of the available commands can be received via this message + + - @summarai help + +- Add a SummarAI job (The job will be executed daily at the same time): + + - @summarai add : + +- List scheduled SummarAI jobs: + + - @summarai list + +- Delete a SummarAI job: + + - @summarai delete + +- Prints a help message: + + - @summarai help + + App store --------- @@ -125,7 +155,7 @@ Known Limitations ----------------- * The SummarAI Bot cannot access previous conversations, it only recognizes messages from the moment it was enabled in the chatroom. -* Restarting the server or the SummarAI Docker image will erase any knowledge of messages, as they are not persistently stored. +* Restarting the server or the SummarAI Docker image will erase any knowledge of messages and added jobs, as they are not persistently stored. * Instructional models may occasionally produce inaccurate information. Therefore, they should be employed with caution in non-critical scenarios. It's essential to verify the accuracy of the bot's output before application. * Make sure to test the instruction model you are using for whether it meets the use-case's quality requirements * Be aware that AI models can consume a significant amount of energy. It's advisable to consider this factor in the planning and operation of AI systems. diff --git a/admin_manual/ai/index.rst b/admin_manual/ai/index.rst index 009b07ede72..86e35f748fd 100644 --- a/admin_manual/ai/index.rst +++ b/admin_manual/ai/index.rst @@ -12,5 +12,6 @@ Artificial Intelligence app_stt_whisper2 app_recognize app_context_chat + app_summarai app_api_and_external_apps ai_as_a_service From 7553b5c556a0058eb6dfea439a6d1393c71fad3b Mon Sep 17 00:00:00 2001 From: Florian Klinger Date: Wed, 17 Apr 2024 16:41:20 +0200 Subject: [PATCH 3/4] Small fixes in style of documentation Signed-off-by: Florian Klinger --- admin_manual/ai/app_summarai.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/admin_manual/ai/app_summarai.rst b/admin_manual/ai/app_summarai.rst index 3135e171f90..1f2a3894af1 100644 --- a/admin_manual/ai/app_summarai.rst +++ b/admin_manual/ai/app_summarai.rst @@ -4,7 +4,7 @@ App: SummarAI (Talk chat summarize bot) .. _ai-app-summarai: -The *SummarAI* app is one of the apps that utilize the llm or any other configured llm provider in Nextcloud and act as a configurable bot for `Nextcloud Talk`. +The *SummarAI* app is one of the apps that utilize the large language model (llm) or any other configured large language model (llm) provider in Nextcloud and act as a configurable bot for `Nextcloud Talk`. The *SummarAI* app can be running on only open source models, on-premise or any configured llm provider and does so entirely on-premises. Nextcloud can provide customer support upon request, please talk to your account manager for the possibilities. @@ -28,24 +28,24 @@ Requirements Space usage ~~~~~~~~~~~ - * ~100MB +* ~100MB Installation ------------ 0. Make sure the following apps are installed: - `Nextcloud AppAPI app `_ + - `Nextcloud AppAPI app `_ - `Nextcloud Talk app (Spreed) `_ + - `Nextcloud Talk app (Spreed) `_ - :ref:`Nextcloud Assistant app` + - :ref:`Nextcloud Assistant app` - One of the following AI model providers: + - One of the following AI model providers: - `Nextcloud Local large language model app `_ + - `Nextcloud Local large language model app `_ - `Nextcloud OpenAI and LocalAI integration app `_ + - `Nextcloud OpenAI and LocalAI integration app `_ Setup (via App Store) From 14f50cfa73e33ba4439e9ea758e0ca618feb562a Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Mon, 9 Sep 2024 17:23:57 +0530 Subject: [PATCH 4/4] feat(Admin/AI): add docs for summary bot Signed-off-by: Anupam Kumar --- admin_manual/ai/app_summarai.rst | 163 ---------------------------- admin_manual/ai/app_summary_bot.rst | 137 +++++++++++++++++++++++ admin_manual/ai/index.rst | 2 +- admin_manual/ai/overview.rst | 2 +- 4 files changed, 139 insertions(+), 165 deletions(-) delete mode 100644 admin_manual/ai/app_summarai.rst create mode 100644 admin_manual/ai/app_summary_bot.rst diff --git a/admin_manual/ai/app_summarai.rst b/admin_manual/ai/app_summarai.rst deleted file mode 100644 index 1f2a3894af1..00000000000 --- a/admin_manual/ai/app_summarai.rst +++ /dev/null @@ -1,163 +0,0 @@ -========================================== -App: SummarAI (Talk chat summarize bot) -========================================== - -.. _ai-app-summarai: - -The *SummarAI* app is one of the apps that utilize the large language model (llm) or any other configured large language model (llm) provider in Nextcloud and act as a configurable bot for `Nextcloud Talk`. -The *SummarAI* app can be running on only open source models, on-premise or any configured llm provider and does so entirely on-premises. -Nextcloud can provide customer support upon request, please talk to your account manager for the possibilities. - -The app currently supports the following languages: - -* English (en) - -As the models are entirely open source, the quality of translations may not be comparable to commercially available services. - -Requirements ------------- - -* Minimal Nextcloud version: 27 -* x86 CPU -* Docker -* AppAPI >= 2.3.2 -* Talk -* Assistant -* Local large language model - -Space usage -~~~~~~~~~~~ - -* ~100MB - -Installation ------------- - -0. Make sure the following apps are installed: - - - `Nextcloud AppAPI app `_ - - - `Nextcloud Talk app (Spreed) `_ - - - :ref:`Nextcloud Assistant app` - - - One of the following AI model providers: - - - `Nextcloud Local large language model app `_ - - - `Nextcloud OpenAI and LocalAI integration app `_ - - -Setup (via App Store) -~~~~~~~~~~~~~~~~~~~~~ - -1. Install the *SummarAI* app via the "Apps" page in Nextcloud - -2. Enable the *SummarAI* Bot for the selected Chatroom via the three dots menue of the Chatroom (The Bots settings are located inside the *Bot Section*) - -Setup (Manual) -~~~~~~~~~~~~~~ - -After cloning this app *manually* (cloned via git to your apps directory) you will need to execute the following steps: - -1. Change to the folder you have cloned the source to: -.. code-block:: - - cd /path/to/your/nextcloud/webroot/apps/summarai/ - - -2. Build the docker image: -.. code-block:: - - docker build --no-cache -f Dockerfile -t ghcr.io/nextcloud/summarai:latest . - -3. Run the docker image: - -*Info:* - -- APP_VERSION environmet variable should be equal to the version of the *SummarAI Bot* you are using - -- NEXTCLOUD_URL environment variable must be set to your Nextcloud instance's URL, ensuring it's reachable by the docker image. - -.. code-block:: - - sudo docker run -ti -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -e APP_ID=summarai -e APP_HOST=0.0.0.0 -e APP_PORT=9031 -e APP_SECRET=12345 -e APP_VERSION=1.0.0 -e NEXTCLOUD_URL='' -p 9031:9031 ghcr.io/nextcloud/summarai:latest - - -4. Un-register the SummarAI Bot if its already installed - -.. code-block:: - - sudo -u php /path/to/your/nextcloud/webroot/occ app_api:app:unregister summarai - - -5. Register the SummarAI Bot so that your Nextcloud instance is aware of it - -*Info:* Adjust the host value in the following example to the IP the docker image can reache your nextcloud instance on - -.. code-block:: - - sudo -u php ./occ app_api:app:register summarai manual_install --json-info '{ "id": "summarai", "name": "SummarAI", "daemon_config_name": "manual_install", "version": "1.0.0", "secret": "12345", "host": "192.168.0.199", "port": 9031, "scopes": ["AI_PROVIDERS", "NOTIFICATIONS", "TALK", "TALK_BOT", "TEXT_PROCESSING"], "protocol": "http", "system": 1}' --force-scopes --wait-finish - - -6. Enable the *SummarAI* Bot for the selected Chatroom via the three dots menue of the Chatroom (The Bots settings are located inside the *Bot Section*) - -Usage ------ - -- After enabling the *SummarAI* Bot in a Chatroom, you can test its functionality by simply sending the message below: - - - @summarai - - > Hi! I am here and listening - -- A full list of the available commands can be received via this message - - - @summarai help - -- Add a SummarAI job (The job will be executed daily at the same time): - - - @summarai add : - -- List scheduled SummarAI jobs: - - - @summarai list - -- Delete a SummarAI job: - - - @summarai delete - -- Prints a help message: - - - @summarai help - - -App store ---------- - -You can also find the app in our app store, where you can write a review: ``_ - -Repository ----------- - -You can find the app's code repository on GitHub where you can report bugs and contribute fixes and features: ``_ - -Nextcloud customers should file bugs directly with our Customer Support. - -Ethical AI Rating ------------------ - -The ethical rating of the *SummarAI Bot*, which utilizes a model for text processing through the Nextcloud Assistant app, is significantly influenced by the choice and implementation of the underlying model. - -Learn more about the Nextcloud Ethical AI Rating `in our blog`. - -Known Limitations ------------------ - -* The SummarAI Bot cannot access previous conversations, it only recognizes messages from the moment it was enabled in the chatroom. -* Restarting the server or the SummarAI Docker image will erase any knowledge of messages and added jobs, as they are not persistently stored. -* Instructional models may occasionally produce inaccurate information. Therefore, they should be employed with caution in non-critical scenarios. It's essential to verify the accuracy of the bot's output before application. -* Make sure to test the instruction model you are using for whether it meets the use-case's quality requirements -* Be aware that AI models can consume a significant amount of energy. It's advisable to consider this factor in the planning and operation of AI systems. -* AI models can exhibit extended processing times when run on CPUs. For enhanced efficiency, utilizing GPU support is recommended to expedite request handling. -* Customer support is available upon request, however we can't solve false or problematic output, most performance issues, or other problems caused by the underlying models. Support is thus limited only to bugs directly caused by the implementation of the app (connectors, API, front-end, AppAPI) diff --git a/admin_manual/ai/app_summary_bot.rst b/admin_manual/ai/app_summary_bot.rst new file mode 100644 index 00000000000..c6a9fcea2cf --- /dev/null +++ b/admin_manual/ai/app_summary_bot.rst @@ -0,0 +1,137 @@ +========================================== +App: Summary Bot (Talk chat summarize bot) +========================================== + +.. _ai-app-summary-bot: + +The *Summary Bot* app utilizes Large Language Model (LLM) providers in Nextcloud and can be added to a conversation in `Nextcloud Talk` to generate summaries from the chat messages of that room either on-demand or following a schedule. +It can run on only open source or proprietary models either on-premises or in the cloud leveraging apps like `Local large language model app `_ or `OpenAI and LocalAI integration app `_. + +Nextcloud can provide customer support upon request, please talk to your account manager for the possibilities. + +The app currently supports the following languages: + +* English (en) + +The quality of summaries depends directly on the quality of the underlying model. It is recommended to test the model for the desired use-case before applying it. + +Requirements +------------ + +* Minimal Nextcloud version: 30 +* Docker +* AppAPI >= 3.0.0 +* Talk +* Task Processing Provider like Local large language model app (llm2) or OpenAI and LocalAI integration app (integration_openai) + +Space usage +~~~~~~~~~~~ + +* ~100MB + +Installation +------------ + +0. Make sure the following apps are installed: + + - `Nextcloud AppAPI app `_ + + - `Nextcloud Talk app (Spreed) `_ + + - One of the following AI model providers: + + - `Nextcloud Local large language model app `_ + + - `Nextcloud OpenAI and LocalAI integration app `_ + + +Setup (via App Store) +~~~~~~~~~~~~~~~~~~~~~ + +1. Install the *Summary Bot* app via the "External Apps" page in Nextcloud + +2. Enable the *Summary Bot* Bot for the selected Chatroom via the three dots menu of the Chatroom (The Bots settings are located inside the *Bots* section) + +Setup (Manual) +~~~~~~~~~~~~~~ + +After cloning this app *manually* (cloned via git to your apps directory) you will need to execute the following steps: + +1. Change to the folder you have cloned the source to: +.. code-block:: + + cd /path/to/your/nextcloud/webroot/apps/summary_bot/ + + +2. Build the docker image: +.. code-block:: + + docker build --no-cache -f Dockerfile -t local_summary_bot . + +3. Run the docker image: + +*Info:* + +- APP_VERSION environment variable should be equal to the version of the *Summary Bot* you are using + +- NEXTCLOUD_URL environment variable must be set to your Nextcloud instance's URL, ensuring it's reachable by the docker image. + +.. code-block:: + + sudo docker run -ti -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -e APP_ID=summary_bot -e APP_DISPLAY_NAME="Summary Bot" -e APP_HOST=0.0.0.0 -e APP_PORT=9031 -e APP_SECRET=12345 -e APP_VERSION=1.0.0 -e NEXTCLOUD_URL='' -p 9031:9031 local_summary_bot + + +4. Un-register the Summary Bot if its already installed + +.. code-block:: + + sudo -u php /path/to/your/nextcloud/webroot/occ app_api:app:unregister summary_bot + + +5. Register the Summary Bot so that your Nextcloud instance is aware of it + +*Info:* Adjust the host value in the following example to the IP address of the docker container (for added security) + +.. code-block:: + + sudo -u php ./occ app_api:app:register summary_bot manual_install --json-info '{ "id": "summary_bot", "name": "Summary Bot", "daemon_config_name": "manual_install", "version": "1.0.0", "secret": "12345", "host": "0.0.0.0", "port": 9031, "scopes": ["AI_PROVIDERS", "TALK", "TALK_BOT"], "protocol": "http"}' --force-scopes --wait-finish + + +6. Enable the *Summary Bot* for the selected Chatroom via the three dots menu of the Chatroom (The Bots settings are located inside the *Bots* section) + +Usage +----- + +After enabling the *Summary Bot* in a Chatroom, you can test its functionality by simply sending the message below: + + "@summary" or "@summary help" + +App store +--------- + +You can also find the app in our app store, where you can write a review: ``_ + +Repository +---------- + +You can find the app's code repository on GitHub where you can report bugs and contribute fixes and features: ``_ + +Nextcloud customers should file bugs directly with our Customer Support. + +Ethical AI Rating +----------------- + +The ethical rating of the *Summary Bot*, which utilizes a model for text processing through the Nextcloud Assistant app, is significantly influenced by the choice and implementation of the underlying model. + +Learn more about the Nextcloud Ethical AI Rating `in our blog`. + +Known Limitations +----------------- + +* The Summary Bot cannot access previous conversations, it only recognizes messages from the moment it was enabled in the chatroom. +* Summary of maximum 40000 characters is supported. This assumes the underlying model can handle this amount of text (which should be close to 16000 context length). +* Languages other than English are not supported. The underlying model may still be able to understand other languages. +* AI models may occasionally produce inaccurate information. Therefore, they should be employed with caution in non-critical scenarios. It's essential to verify the accuracy of the bot's output before application. +* Be aware that AI models can consume a significant amount of energy. It's advisable to consider this factor in the planning and operation of AI systems if hosted on-premises or sustainability is a concern. +* AI models can exhibit extended processing times when run on CPUs. For enhanced efficiency, utilizing GPU support is recommended to expedite request handling. +* Customer support is available upon request, however we can't solve false or problematic output (hallucinations), most performance issues, or other problems caused by the underlying models. Support is thus limited only to bugs directly caused by the implementation of the app (connectors, API, front-end, AppAPI) diff --git a/admin_manual/ai/index.rst b/admin_manual/ai/index.rst index 86e35f748fd..75fa987d0ed 100644 --- a/admin_manual/ai/index.rst +++ b/admin_manual/ai/index.rst @@ -12,6 +12,6 @@ Artificial Intelligence app_stt_whisper2 app_recognize app_context_chat - app_summarai + app_summary_bot app_api_and_external_apps ai_as_a_service diff --git a/admin_manual/ai/overview.rst b/admin_manual/ai/overview.rst index 343d7a6571a..21463b60c60 100644 --- a/admin_manual/ai/overview.rst +++ b/admin_manual/ai/overview.rst @@ -82,7 +82,7 @@ Frontend apps * *Text* for offering an inline graphical UI for the various tasks * `Assistant `_ for offering a graphical UI for the various tasks and a smart picker * `Mail `_ for summarizing mail threads (see :ref:`the Nextcloud Mail docs` for how to enable this) -* `Summary Bot `_ for summarizing chat histories in `Talk `_ +* `Summary Bot `_ for summarizing chat histories in `Talk `_ Backend apps