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
Hey, there's been a few changes in the assistant and the server AI-related APIs. Here are some pointers if you want to adjust.
Text processing + transcription + image generation + anything else are now handled by one single API: the task processing one.
The concepts of task type and providers are still there. The task types now include the "shape" of their input and output.
The assistant now only submits "task processing" tasks. That's why you don't see any task in the list in Text.
Assistant
The openAssistantForm frontend function is now exposed as window.OCA.Assistant.openAssistantForm but the TPAssistant is still there for backward compatibility.
The identifier parameter is deprecated (but still works) and replaced by customId
The input parameter is deprecated (but still works for core:text2text* task types). It can be replaced by inputs which is an object which contains the values for each field. If you only support core:text2text* task types, only setting the inputs.input field value is enough, more on that below, in the "Task types")
Task processing OCS API
You can get the task types with /ocs/v2.php/taskprocessing/tasktypes
You can get the task list with /ocs/v2.php/taskprocessing/tasks/app/APP_ID?customId=CUSTOM_ID
Task representation
The task objects returned by the OCS API are a bit different.
Hey, there's been a few changes in the assistant and the server AI-related APIs. Here are some pointers if you want to adjust.
Text processing + transcription + image generation + anything else are now handled by one single API: the task processing one.
The concepts of task type and providers are still there. The task types now include the "shape" of their input and output.
The assistant now only submits "task processing" tasks. That's why you don't see any task in the list in Text.
Assistant
The
openAssistantForm
frontend function is now exposed aswindow.OCA.Assistant.openAssistantForm
but theTPAssistant
is still there for backward compatibility.The
identifier
parameter is deprecated (but still works) and replaced bycustomId
The
input
parameter is deprecated (but still works forcore:text2text*
task types). It can be replaced byinputs
which is an object which contains the values for each field. If you only supportcore:text2text*
task types, only setting theinputs.input
field value is enough, more on that below, in the "Task types")Task processing OCS API
You can get the task types with
/ocs/v2.php/taskprocessing/tasktypes
You can get the task list with
/ocs/v2.php/taskprocessing/tasks/app/APP_ID?customId=CUSTOM_ID
Task representation
The task objects returned by the OCS API are a bit different.
The
input
andoutput
attributes are now objects which contain the values for each field.The status is now a string: https://github.com/nextcloud/server/blob/master/lib/public/TaskProcessing/Task.php#L366-L370
Task types
You could support a static list of task types: the ones that are equivalent to text processing ones:
All those task types have the same input and output shapes: Just one text field named "input" and "output".
Here is the list of task types defined in the server: https://github.com/nextcloud/server/tree/master/lib/public/TaskProcessing/TaskTypes . We can discuss how to support more task types later.
cc @mejo-
The text was updated successfully, but these errors were encountered: