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
Copy file name to clipboardExpand all lines: docs/developer/web-integration.md
+34-13Lines changed: 34 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,10 +28,9 @@ A helper function is exposed as `OCA.Assistant.openAssistantForm`. It opens the
28
28
29
29
It accepts one parameter which is an object that can contain those keys:
30
30
* appId: [string, mandatory] app id of the app currently displayed
31
-
*identifier: [string, optional, default: ''] the task identifier (if the task is scheduled, this helps to identify the task when receiving the "task finished" event in the backend)
31
+
*customId: [string, optional, default: ''] the task custom ID (if the task is scheduled, this helps to identify the task when receiving the "task finished" event in the backend)
32
32
* taskType: [string, optional, default: last used task type] initially selected task type. It can be a text processing task type class or `speech-to-text` or `OCP\TextToImage\Task`
33
-
* input: [string, optional, default: '', DEPRECATED] initial input prompt (for task types that only require a prompt)
34
-
* inputs: [object, optional, default: {}] initial inputs (specific to each task type)
33
+
* input: [object, optional, default: {}] initial inputs (specific to each task type)
35
34
* isInsideViewer: [boolean, optional, default: false] should be true if this function is called while the Viewer is displayed
36
35
* closeOnResult: [boolean, optional, default: false] If true, the modal will be closed after running a synchronous task and getting its result
37
36
* actionButtons: [array, optional, default: empty list] List of extra buttons to show in the assistant result form (only used if closeOnResult is false)
@@ -47,15 +46,17 @@ The promise resolves with a task object which looks like:
47
46
```javascript
48
47
{
49
48
appId:'text',
50
-
category:1, // 0: text generation, 1: image generation, 2: speech-to-text
51
49
id:310, // the assistant task ID
52
-
identifier:'my custom identifier',
53
-
inputs: { prompt:'give me a short summary of a simple settings section about GitHub' },
50
+
customId:'my custom identifier',
51
+
input: { input:'give me a short summary of a simple settings section about GitHub' },
0 commit comments