File tree Expand file tree Collapse file tree 3 files changed +13
-18
lines changed Expand file tree Collapse file tree 3 files changed +13
-18
lines changed Original file line number Diff line number Diff line change 23
23
use OCA \Assistant \Reference \TaskOutputFileReferenceProvider ;
24
24
use OCA \Assistant \Reference \Text2ImageReferenceProvider ;
25
25
use OCA \Assistant \TaskProcessing \AudioToAudioChatProvider ;
26
- use OCA \Assistant \TaskProcessing \AudioToAudioChatTaskType ;
27
26
use OCP \AppFramework \App ;
28
27
use OCP \AppFramework \Bootstrap \IBootContext ;
29
28
@@ -73,8 +72,9 @@ public function register(IRegistrationContext $context): void {
73
72
74
73
$ context ->registerEventListener (AddContentSecurityPolicyEvent::class, CSPListener::class);
75
74
76
- $ context ->registerTaskProcessingTaskType (AudioToAudioChatTaskType::class);
77
- $ context ->registerTaskProcessingProvider (AudioToAudioChatProvider::class);
75
+ if (class_exists ('OCP \\TaskProcessing \\TaskTypes \\AudioToAudioChat ' )) {
76
+ $ context ->registerTaskProcessingProvider (AudioToAudioChatProvider::class);
77
+ }
78
78
}
79
79
80
80
public function boot (IBootContext $ context ): void {
Original file line number Diff line number Diff line change 14
14
use OCA \Assistant \Service \TaskProcessingService ;
15
15
use OCP \Files \File ;
16
16
use OCP \IL10N ;
17
- use OCP \TaskProcessing \EShapeType ;
18
17
use OCP \TaskProcessing \ISynchronousProvider ;
19
- use OCP \TaskProcessing \ShapeDescriptor ;
20
18
use OCP \TaskProcessing \Task ;
19
+ use OCP \TaskProcessing \TaskTypes \AudioToAudioChat ;
21
20
use OCP \TaskProcessing \TaskTypes \AudioToText ;
22
21
use OCP \TaskProcessing \TaskTypes \TextToSpeech ;
23
22
use OCP \TaskProcessing \TaskTypes \TextToTextChat ;
@@ -42,10 +41,7 @@ public function getName(): string {
42
41
}
43
42
44
43
public function getTaskTypeId (): string {
45
- if (class_exists ('OCP \\TaskProcessing \\TaskTypes \\AudioToAudioChat ' )) {
46
- return \OCP \TaskProcessing \TaskTypes \AudioToAudioChat::ID ;
47
- }
48
- return AudioToAudioChatTaskType::ID ;
44
+ return AudioToAudioChat::ID ;
49
45
}
50
46
51
47
public function getExpectedRuntime (): int {
@@ -78,13 +74,7 @@ public function getOutputShapeEnumValues(): array {
78
74
}
79
75
80
76
public function getOptionalOutputShape (): array {
81
- return [
82
- 'input_transcript ' => new ShapeDescriptor (
83
- $ this ->l ->t ('Input transcript ' ),
84
- $ this ->l ->t ('Input transcription ' ),
85
- EShapeType::Text,
86
- ),
87
- ];
77
+ return [];
88
78
}
89
79
90
80
public function getOptionalOutputShapeEnumValues (): array {
Original file line number Diff line number Diff line change @@ -72,14 +72,19 @@ public function getInputShape(): array {
72
72
*/
73
73
public function getOutputShape (): array {
74
74
return [
75
+ 'input_transcript ' => new ShapeDescriptor (
76
+ $ this ->l ->t ('Input transcript ' ),
77
+ $ this ->l ->t ('Transcription of the audio input ' ),
78
+ EShapeType::Text,
79
+ ),
75
80
'output ' => new ShapeDescriptor (
76
81
$ this ->l ->t ('Response voice message ' ),
77
- $ this ->l ->t ('The generated response as part of the conversation ' ),
82
+ $ this ->l ->t ('The generated voice response as part of the conversation ' ),
78
83
EShapeType::Audio
79
84
),
80
85
'output_transcript ' => new ShapeDescriptor (
81
86
$ this ->l ->t ('Output transcript ' ),
82
- $ this ->l ->t ('Response transcription ' ),
87
+ $ this ->l ->t ('Transcription of the audio output ' ),
83
88
EShapeType::Text,
84
89
),
85
90
];
You can’t perform that action at this time.
0 commit comments