From f5ae0fc4a9fae66da0ffdbd10cc0cbcdff2450d5 Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Wed, 22 Jan 2025 15:57:32 +0530 Subject: [PATCH 1/5] fix(AI/ContextChat): update docs Signed-off-by: Anupam Kumar --- admin_manual/ai/app_context_chat.rst | 40 ++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/admin_manual/ai/app_context_chat.rst b/admin_manual/ai/app_context_chat.rst index 1a7b85340..385d8b9d5 100644 --- a/admin_manual/ai/app_context_chat.rst +++ b/admin_manual/ai/app_context_chat.rst @@ -72,17 +72,17 @@ Installation Initial loading of data ----------------------- -Context chat will automatically load user data into the Vector DB using background jobs. To speed this up, you can run the following command to index all documents for a user synchronously: -Note: This does not interact with the auto-indexing feature and that list would remain unchanged. However, the indexed files would be skipped when the auto indexer runs. +| Context chat will automatically load user data into the Vector DB using background jobs. +| The initial loading of data can take a long time depending on the number of files and their size. +| To speed up the asynchronous indexing or to stop it altogether, see the `Configuration Options (OCC)`_. + +| To index all the files synchronously, use the following command: +| Note: This does not interact with the auto-indexing feature and that list would remain unchanged. However, the indexed files would be skipped when the auto indexer runs. .. code-block:: occ context_chat:scan -To speed up the asynchronous indexing, see the `Configuration Options (OCC)`_. - -See :ref:`the task speedup section in AI Overview` to know better ways to run these jobs. - Scaling ------- @@ -138,6 +138,13 @@ Configuration Options (OCC) occ config:app:set context_chat indexing_batch_size --value=100 --type=integer +* ``indexing_job_interval`` integer (default: 600) + The interval at which the indexer jobs run in seconds + +.. code-block:: + + occ config:app:set context_chat indexing_job_interval --value=600 --type=integer + * ``indexing_max_time`` integer (default: 1800) The number of seconds to index files for per run, regardless of batch size @@ -152,6 +159,14 @@ Configuration Options (OCC) occ config:app:set context_chat indexing_max_jobs_count --value=3 --type=integer +* ``request_timeout`` integer (default: 3000) + Request timeout in seconds for all requests made to the backend. + ``TIMEOUT_SERVER`` in the docker socket proxy should be set to a value higher than this. + +.. code-block:: + + occ config:app:set context_chat request_timeout --value=3 --type=integer + Configuration Options (Backend) ------------------------------- @@ -159,11 +174,20 @@ Configuration Options (Backend) Refer to `the Configuration head `_ in the backend's readme. +Logs +---- + +Logs for the ``context_chat`` PHP app can be found in the Nextcloud log file, which is usually located in the Nextcloud data directory. The log file is named ``nextcloud.log``. + +| For the backend, warning and error logs can be found in the docker container logs, and the complete logs can be found in ``logs/`` directory in the persistent storage of the docker container. +| That will be ``/nc_app_context_chat_backend/logs/`` in the docker container. +| See `the Logs head `_ in the backend's readme for more information. + Possibility of Data Leak ------------------------ -It is possible that some users who have been denied access to certain files/folders still have access to the content of those files/folders through the Context Chat app. We're working on a solution for this. -The users who never had access to a particular file/folder will NOT be able to see those contents in any way. +| It is possible that some users who have been denied access to certain files/folders still have access to the content of those files/folders through the Context Chat app. We're working on a solution for this. +| The users who never had access to a particular file/folder will NOT be able to see those contents in any way. Known Limitations ----------------- From 1a5a772375e2493e07342e6cf22615176d0787b9 Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Wed, 22 Jan 2025 16:10:31 +0530 Subject: [PATCH 2/5] Update admin_manual/ai/app_context_chat.rst Co-authored-by: Julien Veyssier Signed-off-by: Anupam Kumar --- admin_manual/ai/app_context_chat.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_manual/ai/app_context_chat.rst b/admin_manual/ai/app_context_chat.rst index 385d8b9d5..c1b141d14 100644 --- a/admin_manual/ai/app_context_chat.rst +++ b/admin_manual/ai/app_context_chat.rst @@ -160,7 +160,7 @@ Configuration Options (OCC) occ config:app:set context_chat indexing_max_jobs_count --value=3 --type=integer * ``request_timeout`` integer (default: 3000) - Request timeout in seconds for all requests made to the backend. + Request timeout in seconds for all requests made to the Context chat backend (the external app in AppAPI). ``TIMEOUT_SERVER`` in the docker socket proxy should be set to a value higher than this. .. code-block:: From 624375fa5d6f938e87a6974132ddffa336a4889a Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Wed, 22 Jan 2025 16:10:38 +0530 Subject: [PATCH 3/5] Update admin_manual/ai/app_context_chat.rst Co-authored-by: Julien Veyssier Signed-off-by: Anupam Kumar --- admin_manual/ai/app_context_chat.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_manual/ai/app_context_chat.rst b/admin_manual/ai/app_context_chat.rst index c1b141d14..02110963f 100644 --- a/admin_manual/ai/app_context_chat.rst +++ b/admin_manual/ai/app_context_chat.rst @@ -161,7 +161,7 @@ Configuration Options (OCC) * ``request_timeout`` integer (default: 3000) Request timeout in seconds for all requests made to the Context chat backend (the external app in AppAPI). - ``TIMEOUT_SERVER`` in the docker socket proxy should be set to a value higher than this. + If a docker socket proxy is used, the ``TIMEOUT_SERVER`` environment variable should be set to a value higher than ``request_timeout``. .. code-block:: From 4ac4dadfc50b6fa48fbc29626cfb8218dcd147f8 Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Wed, 22 Jan 2025 16:13:18 +0530 Subject: [PATCH 4/5] Update admin_manual/ai/app_context_chat.rst Co-authored-by: Julien Veyssier Signed-off-by: Anupam Kumar --- admin_manual/ai/app_context_chat.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_manual/ai/app_context_chat.rst b/admin_manual/ai/app_context_chat.rst index 02110963f..d0c58ef74 100644 --- a/admin_manual/ai/app_context_chat.rst +++ b/admin_manual/ai/app_context_chat.rst @@ -186,7 +186,7 @@ Logs for the ``context_chat`` PHP app can be found in the Nextcloud log file, wh Possibility of Data Leak ------------------------ -| It is possible that some users who have been denied access to certain files/folders still have access to the content of those files/folders through the Context Chat app. We're working on a solution for this. +| It is possible that some users who had access to certain files/folders (and have later have been denied this access) still have access to the content of those files/folders through the Context Chat app. We're working on a solution for this. | The users who never had access to a particular file/folder will NOT be able to see those contents in any way. Known Limitations From ae4a3c6bab23320bacdeda8fd11e6f01df2763b7 Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Thu, 23 Jan 2025 13:28:51 +0530 Subject: [PATCH 5/5] fix spell check Signed-off-by: Anupam Kumar --- developer_manual/client_apis/OCS/ocs-openapi.rst | 2 +- .../getting_started/coding_standards/javascript.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/developer_manual/client_apis/OCS/ocs-openapi.rst b/developer_manual/client_apis/OCS/ocs-openapi.rst index f23e6f030..671f7b140 100644 --- a/developer_manual/client_apis/OCS/ocs-openapi.rst +++ b/developer_manual/client_apis/OCS/ocs-openapi.rst @@ -606,7 +606,7 @@ You are required to add a description for every status code returned by the meth How to add response definitions to share type definitions --------------------------------------------------------- -In the previous steps we have been re-using the same data structure multiple times, but it was copied every time. +In the previous steps we have been reusing the same data structure multiple times, but it was copied every time. This is tedious and error prone, therefore we want to create some shared type definitions. Create a new file called ``ResponseDefinitions.php`` in the ``lib`` folder of your app. It will only work with that file name at that location. diff --git a/developer_manual/getting_started/coding_standards/javascript.rst b/developer_manual/getting_started/coding_standards/javascript.rst index 8732826a3..99d0e110f 100644 --- a/developer_manual/getting_started/coding_standards/javascript.rst +++ b/developer_manual/getting_started/coding_standards/javascript.rst @@ -5,8 +5,8 @@ JavaScript and Typescript .. contents:: :local: -General rules and advices -------------------------- +General rules and advice +------------------------ - Nextcloud uses Vue.js for its interface, for a consistent user interface we recommend apps to also use Vue with :ref:`provided components `. Yet also vanilla JavaScript and HTML can be used.