From 02c8221a5085742146c4705df0b007bb98f131ba Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 24 Apr 2025 14:52:30 -0700 Subject: [PATCH] Docs --- docs/configuration.md | 45 +++++++++++++++++++++++++++++++++++++++++++ docs/index.md | 3 ++- docs/usage.md | 8 ++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index d4133139f..5a066cb63 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1706,3 +1706,48 @@ password. All of these options come from their similarly-named [Django settings] #### [`PAPERLESS_EMAIL_USE_SSL=`](#PAPERLESS_EMAIL_USE_SSL) {#PAPERLESS_EMAIL_USE_SSL} : Defaults to false. + +## AI {#ai} + +#### [`PAPERLESS_ENABLE_AI=`](#PAPERLESS_ENABLE_AI) {#PAPERLESS_ENABLE_AI} + +: Enables the AI features in Paperless. This includes the AI-based +suggestions. This setting is required to be set to true in order to use the AI features. + + Defaults to false. + +#### [`PAPERLESS_AI_BACKEND=`](#PAPERLESS_AI_BACKEND) {#PAPERLESS_AI_BACKEND} + +: The AI backend to use. This can be either "openai" or "ollama". If set to "ollama", the AI +features will be run locally on your machine. If set to "openai", the AI features will be run +using the OpenAI API. This setting is required to be set to use the AI features. + + Defaults to None. + + !!! note + + The OpenAI API is a paid service. You will need to set up an OpenAI account and + will be charged for usage incurred by Paperless-ngx features and your document data + will (of course) be shared with OpenAI. Paperless-ngx does not endorse the use of the + OpenAI API in any way. + + Refer to the OpenAI terms of service, and use at your own risk. + +#### [`PAPERLESS_LLM_MODEL=`](#PAPERLESS_LLM_MODEL) {#PAPERLESS_LLM_MODEL} + +: The model to use for the AI backend, i.e. "gpt-3.5-turbo", "gpt-4" or any of the models supported by the +current backend. This setting is required to be set to use the AI features. + + Defaults to None. + +#### [`PAPERLESS_LLM_API_KEY=`](#PAPERLESS_LLM_API_KEY) {#PAPERLESS_LLM_API_KEY} + +: The API key to use for the AI backend. This is required for the OpenAI backend only. + + Defaults to None. + +#### [`PAPERLESS_LLM_URL=`](#PAPERLESS_LLM_URL) {#PAPERLESS_LLM_URL} + +: The URL to use for the AI backend. This is required for the Ollama backend only. + + Defaults to None. diff --git a/docs/index.md b/docs/index.md index b86112ed6..3e9f83591 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,11 +25,12 @@ physical documents into a searchable online archive so you can keep, well, _less ## Features - **Organize and index** your scanned documents with tags, correspondents, types, and more. -- _Your_ data is stored locally on _your_ server and is never transmitted or shared in any way. +- _Your_ data is stored locally on _your_ server and is never transmitted or shared in any way, unless you explicitly choose to do so. - Performs **OCR** on your documents, adding searchable and selectable text, even to documents scanned with only images. - Utilizes the open-source Tesseract engine to recognize more than 100 languages. - Documents are saved as PDF/A format which is designed for long term storage, alongside the unaltered originals. - Uses machine-learning to automatically add tags, correspondents and document types to your documents. +- **New**: Paperless-ngx can now leverage AI (Large Language Models or LLMs) for document suggestions. This is an optional feature that can be enabled (and is disabled by default). - Supports PDF documents, images, plain text files, Office documents (Word, Excel, Powerpoint, and LibreOffice equivalents)[^1] and more. - Paperless stores your documents plain on disk. Filenames and folders are managed by paperless and their format can be configured freely with different configurations assigned to different documents. - **Beautiful, modern web application** that features: diff --git a/docs/usage.md b/docs/usage.md index 1b691e678..d9419810b 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -261,6 +261,14 @@ Once setup, navigating to the email settings page in Paperless-ngx will allow yo You can also submit a document using the REST API, see [POSTing documents](api.md#file-uploads) for details. +## Document Suggestions + +Paperless-ngx can suggest tags, correspondents, document types and storage paths for documents based on the content of the document. This is done using a machine learning model that is trained on the documents in your database. The suggestions are shown in the document detail page and can be accepted or rejected by the user. + +### AI-Enhanced Suggestions + +If enabled, Paperless-ngx can use an AI LLM model to suggest document titles, dates, tags, correspondents and document types for documents. This feature will always be "opt-in" and does not disable the existing suggestion system. Currently, both remote (via the OpenAI API) and local (via Ollama) models are supported, see [configuration](configuration.md#ai) for details. + ## Sharing documents from Paperless-ngx Paperless-ngx supports sharing documents with other users by assigning them [permissions](#object-permissions)