From 5c2815bb2449ecf63bcbf0cd623f3611af4c633f Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Mon, 19 Aug 2024 10:34:09 +0200 Subject: [PATCH] fix(taskprocessing): text processing still mentioned Signed-off-by: Julien Veyssier --- developer_manual/client_apis/OCS/ocs-taskprocessing-api.rst | 2 +- developer_manual/client_apis/OCS/ocs-textprocessing-api.rst | 3 +++ developer_manual/digging_deeper/task_processing.rst | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/developer_manual/client_apis/OCS/ocs-taskprocessing-api.rst b/developer_manual/client_apis/OCS/ocs-taskprocessing-api.rst index 8298f80b6..fe948f414 100644 --- a/developer_manual/client_apis/OCS/ocs-taskprocessing-api.rst +++ b/developer_manual/client_apis/OCS/ocs-taskprocessing-api.rst @@ -6,7 +6,7 @@ OCS TaskProcessing API .. versionadded:: 30.0.0 -The OCS Text processing API allows you to run text processing tasks, like prompting large language models implemented by apps using :ref:`the backend Text Processing API`. +The OCS Task processing API allows you to run task processing tasks, like prompting large language models implemented by apps using :ref:`the backend Task Processing API`. The base URL for all calls to this API is: ``/ocs/v2.php/taskprocessing/`` diff --git a/developer_manual/client_apis/OCS/ocs-textprocessing-api.rst b/developer_manual/client_apis/OCS/ocs-textprocessing-api.rst index fe6dfa3ec..3d2d995b5 100644 --- a/developer_manual/client_apis/OCS/ocs-textprocessing-api.rst +++ b/developer_manual/client_apis/OCS/ocs-textprocessing-api.rst @@ -6,6 +6,9 @@ OCS TextProcessing API .. versionadded:: 27.1.0 +.. deprecated:: 30 + Use the TaskProcessing API instead + The OCS Text processing API allows you to run text processing tasks, like prompting large language models implemented by apps using :ref:`the backend Text Processing API`. The base URL for all calls to this API is: */ocs/v2.php/textprocessing/* diff --git a/developer_manual/digging_deeper/task_processing.rst b/developer_manual/digging_deeper/task_processing.rst index badd25fd2..b602d7880 100644 --- a/developer_manual/digging_deeper/task_processing.rst +++ b/developer_manual/digging_deeper/task_processing.rst @@ -20,7 +20,7 @@ To consume the Task Processing API, you will need to :ref:`inject` +If you would like to use the task processing functionality in a client, there are also OCS endpoints available for this: :ref:`OCS Task Processing API` Tasks types ^^^^^^^^^^^ @@ -336,7 +336,7 @@ A **Task processing provider** will usually be a class that implements the inter The method ``getName`` returns a string to identify the registered provider in the user interface. -The method ``process`` implements the text processing step. In case execution fails for some reason, you should throw a ``\OCP\TaskProcessing\Exception\ProcessingException`` with an explanatory error message. Important to note here is that ``Image``, ``Audio``, ``Video`` and ``File`` slots in the input array will be filled with ``\OCP\Files\File`` objects for your convenience. When outputting one of these you should simply return a string, the API will turn the data into a proper file for convenience. The ``$reportProgress`` parameter is a callback that you may use at will to report the task progress as a single float value between 0 and 1. Its return value will indicate if the task is still running (``true``) or if it was cancelled (``false``) and processing should be terminated. +The method ``process`` implements the task processing step. In case execution fails for some reason, you should throw a ``\OCP\TaskProcessing\Exception\ProcessingException`` with an explanatory error message. Important to note here is that ``Image``, ``Audio``, ``Video`` and ``File`` slots in the input array will be filled with ``\OCP\Files\File`` objects for your convenience. When outputting one of these you should simply return a string, the API will turn the data into a proper file for convenience. The ``$reportProgress`` parameter is a callback that you may use at will to report the task progress as a single float value between 0 and 1. Its return value will indicate if the task is still running (``true``) or if it was cancelled (``false``) and processing should be terminated. This class would typically be saved into a file in ``lib/TaskProcessing`` of your app but you are free to put it elsewhere as long as it's loadable by Nextcloud's :ref:`dependency injection container`.