You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0f1eb19
Browse filesBrowse the repository at this point in the historyBrowse files
Sphinx treats warnings as errors in CI — fix all of them.
184
+
185
+
## Nextcloud Contribution Policy
186
+
187
+
All contributions generated or assisted by this agent must fully comply with:
188
+
189
+
-**[AI Contribution Policy](https://github.com/nextcloud/.github/blob/master/AI_POLICY.md)** - the primary reference for AI-specific rules, covering disclosure, author accountability, communication, security, licensing, code quality, and autonomous agent behavior.
190
+
-**[Contribution Guidelines](https://github.com/nextcloud/.github/blob/master/CONTRIBUTING.md)** - covering testing requirements, the Developer Certificate of Origin (DCO), license headers, conventional commits, and translations. These apply in full to all contributions regardless of how they were produced.
191
+
192
+
### What this agent must always do
193
+
194
+
- Add an `Assisted-by: AGENT_NAME:MODEL_VERSION` git trailer to every commit containing AI-assisted content.
195
+
- Ensure every pull request includes a disclosure of AI tool use in the PR description.
196
+
- Produce focused, scoped pull requests that address exactly one concern. Do not touch unrelated files or introduce incidental refactors.
197
+
- Write code comments that document the code, never the process that produced it:
198
+
- Comments describe what the code does - method signatures, behavior, and constraints the code itself cannot express (e.g. a non-obvious invariant or workaround).
199
+
- Never add comments that document progress, decisions, or changes (e.g. "changed X to Y", "as requested", "this fixes ...", "previously this did ..."). That belongs in the commit message or PR discussion; in the code it goes stale and becomes misleading.
200
+
- Do not narrate self-explanatory code. If the code is readable without a comment, omit the comment.
201
+
- Keep comments brief - short and simple, matching the comment density of the surrounding code.
202
+
- Reuse existing helper functions and utilities instead of re-implementing their logic inline. When fixing a flawed pattern, fix every occurrence of it across the changed code, not only the instance that was pointed out.
203
+
- Explicitly inform the contributor when any action they are about to take, or have taken, would violate the AI Contribution Policy or the Contribution Guidelines. Do not silently proceed. State which rule is at risk and what the contributor should do instead.
204
+
- Warn the contributor if a pull request is growing too large. A PR approaching several thousand lines of changed code is a signal that it should be split into smaller, focused PRs. Suggest a logical split before the PR is opened, not after.
205
+
- Recommend opening a ticket for discussion before starting implementation whenever a feature or change is sufficiently complex - for example when it touches multiple subsystems, requires architectural decisions, or the right approach is not yet clear. A ticket allows maintainers and the contributor to align on direction before code is written, avoiding wasted effort on a PR that may be rejected or require fundamental rework.
206
+
207
+
### What this agent must never do
208
+
209
+
- Open issues, submit pull requests, post review comments, or send security reports autonomously. Every contribution must be reviewed and submitted by a human.
210
+
- Add `Signed-off-by` tags to commits. Only the human contributor can certify the Developer Certificate of Origin.
211
+
- Generate or submit security reports without independent human verification. Report verified vulnerabilities via [HackerOne](https://hackerone.com/nextcloud), not as GitHub issues.
212
+
- Write PR descriptions, review comments, or issue reports on behalf of the contributor. These must be in the contributor's own words.
213
+
- Fully automate the resolution of issues labeled [`good first issue`](https://github.com/issues?q=org%3Anextcloud+label%3A%22good+first+issue%22) or similar beginner-friendly labels.
214
+
- Submit code that has not been reviewed and cleaned up by the contributor. Dead code, redundant logic, excessive comments, malformed or garbled characters (e.g. `�` replacement characters), and unrelated changes must be removed before submission.
Copy file name to clipboardExpand all lines: admin_manual/ai/app_assistant.rst
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Nextcloud Assistant
6
6
7
7
Nextcloud assistant is the primary graphical user interface for interacting with artificial intelligence features in Nextcloud.
8
8
9
-
It offers the graphical user interface for the unified AI Task processing API offering features like summarizing text, generating headlines, asking arbitrary questions, transcription of media files, image generation and it integrates with the context_chat app to offer in-context answers about your own data stored in Nextcloud. The assistant app also offers a chat interface to interact with the chosen language model. Nextcloud can provide customer support upon request, please talk to your account manager for the possibilities.
9
+
It offers the graphical user interface for the unified AI Task processing API offering features like summarizing text, generating headlines, asking arbitrary questions, transcription of media files, image generation and it integrates with the context_chat app to offer in-context answers about your own data stored in Nextcloud. The assistant app also offers a chat interface to interact with the chosen language model, including multimodal chat with file attachments when a compatible backend is configured. Nextcloud can provide customer support upon request, please talk to your account manager for the possibilities.
10
10
11
11
Find the user documentation here:
12
12
`AI assistant user documentation <https://docs.nextcloud.com/server/latest/user_manual/ai_assistant.html>`_
@@ -106,6 +106,15 @@ In order to make use of our "Chat with AI" feature you will need any one of the
106
106
* :ref:`llm2<ai-app-llm2>` - Runs open source AI language models locally on your own server hardware (Customer support available upon request)
107
107
* `OpenAI and LocalAI integration (via OpenAI API) <https://apps.nextcloud.com/apps/integration_openai>`_ - Integrates with the OpenAI API to provide AI functionality from OpenAI servers (Customer support available upon request; see :ref:`AI as a Service<ai-ai_as_a_service>`)
108
108
109
+
Multimodal chat
110
+
~~~~~~~~~~~~~~~
111
+
112
+
Multimodal chat extends "Chat with AI" so users can attach files for the language model to analyze in the conversation, such as images and, with some models, audio and video. Text files can also be attached as context.
113
+
114
+
In order to make use of multimodal chat you will need any one of the following backends with a multimodal-capable model:
115
+
116
+
* :ref:`llm2<ai-app-llm2>` - Use a multimodal model such as the shipped Qwen 3.5 9B (vision) or Gemma 4 E4B (vision and audio) (Customer support available upon request)
117
+
* `OpenAI and LocalAI integration (via OpenAI API) <https://apps.nextcloud.com/apps/integration_openai>`_ - Integrates with multimodal models via the OpenAI API (Customer support available upon request; see :ref:`AI as a Service<ai-ai_as_a_service>`)
Copy file name to clipboardExpand all lines: admin_manual/ai/app_context_chat.rst
+40-35Lines changed: 40 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,15 @@ This app supports input and output in the same languages that the currently conf
18
18
Requirements
19
19
------------
20
20
21
-
* Minimal Nextcloud version: 30
21
+
* Minimal Nextcloud version: 32
22
22
* Nextcloud AIO is supported
23
-
* We currently support NVIDIA GPUs and x86_64 CPUs
23
+
* We currently support NVIDIA GPUs, AMD GPUs (via Vulkan) and x86_64 CPUs
24
24
* CPU that supports AVX and AVX2 instruction
25
-
* CUDA >= v12.2 on your host system
25
+
* CUDA >= v12.8 on your host system if NVIDIA GPUs are used
26
26
* Both podman and docker are supported
27
27
* GPU Setup Sizing
28
28
29
-
* A NVIDIA GPU with at least 2GB VRAM
29
+
* A GPU with at least 2GB VRAM
30
30
* The requirements for the text-to-text providers should be checked separately for each app :ref:`here <tp-consumer-apps>` in the "Backend apps" section, as they can vary greatly based on the model used and whether the provider is hosted locally or remotely.
31
31
* At least 8GB of system RAM
32
32
* 2 GB + additional 500MB for each concurrent request made to the backend if configuration parameters are changed
@@ -66,7 +66,9 @@ Installation
66
66
67
67
6. Optionally but recommended, setup background workers for faster pickup of tasks. See :ref:`the relevant section in AI Overview<ai-overview_improve-ai-task-pickup-speed>` for more information.
68
68
69
-
**Note**: Both apps need to be installed and both major version and minor version of the two apps must match for the functionality to work (ie. "v1.3.4" and "v1.3.1"; but not "v1.3.4" and "v2.1.6"; and not "v1.3.4" and "v1.4.5"). Keep this in mind when updating.
69
+
.. note::
70
+
71
+
Both apps need to be installed and both major version and minor version of the two apps must match for the functionality to work (ie. "v1.3.4" and "v1.3.1"; but not "v1.3.4" and "v2.1.6"; and not "v1.3.4" and "v1.4.5"). Keep this in mind when updating.
70
72
71
73
72
74
Initial loading of data
@@ -75,30 +77,11 @@ Initial loading of data
75
77
Auto-indexing
76
78
~~~~~~~~~~~~~
77
79
78
-
|Context chat will automatically load user data into the Vector DB using asynchronous background jobs.
80
+
|Context chat will automatically load user data into the Vector DB. Context chat backend pulls the queued files and content providers' items from the context chat PHP app and indexes them.
79
81
|The initial loading of data can take a long time depending on the number of files and their size.
80
82
81
-
The indexing jobs are set up to run during the Nextcloud instance's maintenance window (typically during the night) only. If you have not set a maintenance window, indexing will run 24/7.
82
-
83
-
|You can set up a separate cron job to run every 30 minutes for Context Chat to avoid slowing down normal background job operation on larger instances.
84
-
|The following command can bypass the maintenance window so it can either be set to run during the day even with a maintenance window set, or it can be set to run during the weekends 24/7 to speed up the indexing process.
|To index all the files synchronously, use the following command:
95
-
|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.
96
-
97
-
.. code-block::
98
-
99
-
occ context_chat:scan <user_id>
100
83
101
-
**Note**: The synchronous command could take several days to complete. On larger systems we thus recommend to use auto-indexing.
84
+
.. _scaling-context-chat:
102
85
103
86
Scaling
104
87
-------
@@ -119,23 +102,42 @@ Listed below are the major parts of the system that can be scaled independently
119
102
|The embedding model performance can be scaled by using a hosted embedding service, locally or remotely hosted. It should be able to serve an OpenAI-compatible API.
120
103
|The embedding service URL can be set using the environment variable ``CC_EM_BASE_URL`` during deployment in the "Deploy Options". Other options like the model name, api key, or username and password can be set using the environment variables ``CC_EM_MODEL_NAME``, ``CC_EM_API_KEY``, ``CC_EM_USERNAME``, and ``CC_EM_PASSWORD`` respectively.
121
104
122
-
|Note that you cannot change the embedding model after installing the app, so if you want to use a different embedding model or service you will need to do a full uninstall (removing all data of the ExApp) and reinstall the ``context_chat_backend`` ExApp with the new environment variables and an empty vectorDB. If the vectorDB is external, the connected database (can be `ccb`) should be dropped before installing the ExApp again.
105
+
.. warning::
106
+
107
+
The embedding model cannot be changed after installing the app. To use a different embedding model or service, you
108
+
will need to do a full uninstall (removing all data of the ExApp) and reinstall the ``context_chat_backend`` ExApp
109
+
with the new environment variables and an empty vector DB. If the vector DB is external, the connected database
110
+
(database may be named ``ccb``) should be dropped before installing the ExApp again.
111
+
112
+
For the ``context_chat`` app, obtain a clean slate by dropping all the ``<PREFIX>_context_chat_*`` tables in the database, and removing all the config values:
113
+
And re-installing it.
114
+
115
+
.. code-block:: sql
116
+
117
+
drop table if exists oc_context_chat_action_queue;
118
+
drop table if exists oc_context_chat_content_queue;
119
+
drop table if exists oc_context_chat_fs_events;
120
+
drop table if exists oc_context_chat_queue;
121
+
delete from oc_appconfig where appid = 'context_chat';
123
122
124
-
One part of the system that cannot be scaled yet is the parsing of the documents to extract text.
125
-
This is currently done in a single instance of the ``context_chat_backend`` ExApp.
126
-
It is a CPU-bound task so having a powerful CPU will help speed up the parsing process.
123
+
124
+
4. The parsing of the documents to extract text
125
+
126
+
|The parsing of the documents to extract text is done in a single instance of the ``context_chat_backend`` ExApp in a docker-based environment. It is a CPU-bound task, so having a powerful CPU will help speed up the parsing process.
127
+
|This can be scaled by using Kubernetes for deployment, allowing multiple instances of the ``context_chat_backend`` ExApp to handle the parsing concurrently, see :ref:`the Kubernetes section <kubernetes-context-chat>`.
127
128
128
129
If ``context_chat_backend`` is already deployed, you can change these environment variables by redeploying it with the new values.
129
130
130
131
1. Go to Apps page -> search for "Context Chat Backend"
131
-
2. Disable and remove the app taking care the data is not removed
132
+
2. Disable and remove the app taking care the data is not removed (except when the embedding model is changed, in which case the data should be removed)
132
133
3. Set the "Deploy Options" with the new environment variables
133
134
4. Reinstall the app
134
135
136
+
.. _kubernetes-context-chat:
135
137
136
138
Kubernetes
137
139
~~~~~~~~~~
138
-
Starting with version 5.4.0 of the app, Kubernetes is supported for deployment of the backend to scale ContextChat to large instances. Nextcloud customers can find details about Kubernetes deployment in the customer documentation or by contacting support.
140
+
Starting with version 5.4.0 of the app and Nextcloud 34, Kubernetes is supported for deployment of the backend to scale ContextChat to large instances. Nextcloud customers can find details about Kubernetes deployment in the customer documentation or by contacting support.
139
141
140
142
App store
141
143
---------
@@ -160,15 +162,16 @@ The options for each command can be found like this, using scan as example: ``co
160
162
* ``context_chat:search``
161
163
Perform a semantic (vector DB based) search on your indexed documents, with options for selective context.
162
164
163
-
* ``context_chat:scan``
164
-
Scan and index the user's documents based on the user ID provided, synchronously.
165
-
166
165
* ``context_chat:stats``
167
166
|Shows the time taken to complete the initial indexing of the documents if it has finished,
168
167
|and the current no. of items in the indexer and actions queue.
169
168
|"Actions" refers to tasks like file deletions, ownership changes through share changes, etc.
170
169
|These file and ownership changes are synced with the backed through this actions queue.
171
170
171
+
* ``context_chat:reindex``
172
+
|Schedule a full re-crawl of all the files in all the mounts. Indexed files are not re-indexed when compared against context_chat_backend's vector DB.
0 commit comments