Skip to content

Commit 20a779e

Browse files
committed
feat: support multiple images
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
1 parent 3e24c40 commit 20a779e

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

lib/composer/composer/autoload_classmap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@
842842
'OCP\\TaskProcessing\\ShapeDescriptor' => $baseDir . '/lib/public/TaskProcessing/ShapeDescriptor.php',
843843
'OCP\\TaskProcessing\\ShapeEnumValue' => $baseDir . '/lib/public/TaskProcessing/ShapeEnumValue.php',
844844
'OCP\\TaskProcessing\\Task' => $baseDir . '/lib/public/TaskProcessing/Task.php',
845-
'OCP\\TaskProcessing\\TaskTypes\\AnalyzeImage' => $baseDir . '/lib/public/TaskProcessing/TaskTypes/AnalyzeImage.php',
845+
'OCP\\TaskProcessing\\TaskTypes\\AnalyzeImages' => $baseDir . '/lib/public/TaskProcessing/TaskTypes/AnalyzeImages.php',
846846
'OCP\\TaskProcessing\\TaskTypes\\AudioToText' => $baseDir . '/lib/public/TaskProcessing/TaskTypes/AudioToText.php',
847847
'OCP\\TaskProcessing\\TaskTypes\\ContextAgentInteraction' => $baseDir . '/lib/public/TaskProcessing/TaskTypes/ContextAgentInteraction.php',
848848
'OCP\\TaskProcessing\\TaskTypes\\ContextWrite' => $baseDir . '/lib/public/TaskProcessing/TaskTypes/ContextWrite.php',

lib/composer/composer/autoload_static.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
883883
'OCP\\TaskProcessing\\ShapeDescriptor' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/ShapeDescriptor.php',
884884
'OCP\\TaskProcessing\\ShapeEnumValue' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/ShapeEnumValue.php',
885885
'OCP\\TaskProcessing\\Task' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/Task.php',
886-
'OCP\\TaskProcessing\\TaskTypes\\AnalyzeImage' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/TaskTypes/AnalyzeImage.php',
886+
'OCP\\TaskProcessing\\TaskTypes\\AnalyzeImages' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/TaskTypes/AnalyzeImages.php',
887887
'OCP\\TaskProcessing\\TaskTypes\\AudioToText' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/TaskTypes/AudioToText.php',
888888
'OCP\\TaskProcessing\\TaskTypes\\ContextAgentInteraction' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/TaskTypes/ContextAgentInteraction.php',
889889
'OCP\\TaskProcessing\\TaskTypes\\ContextWrite' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/TaskTypes/ContextWrite.php',

lib/private/TaskProcessing/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ private function _getTaskTypes(): array {
585585
\OCP\TaskProcessing\TaskTypes\ContextAgentInteraction::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\ContextAgentInteraction::class),
586586
\OCP\TaskProcessing\TaskTypes\TextToTextProofread::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToTextProofread::class),
587587
\OCP\TaskProcessing\TaskTypes\TextToSpeech::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToSpeech::class),
588-
\OCP\TaskProcessing\TaskTypes\AnalyzeImage::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\AnalyzeImage::class),
588+
\OCP\TaskProcessing\TaskTypes\AnalyzeImages::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\AnalyzeImages::class),
589589
];
590590

591591
foreach ($context->getTaskProcessingTaskTypes() as $providerServiceRegistration) {

lib/public/TaskProcessing/TaskTypes/AnalyzeImage.php renamed to lib/public/TaskProcessing/TaskTypes/AnalyzeImages.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
use OCP\TaskProcessing\ShapeDescriptor;
1717

1818
/**
19-
* This is the task processing task type to ask a question about an image
19+
* This is the task processing task type to ask a question about the images
2020
* @since 32.0.0
2121
*/
22-
class AnalyzeImage implements ITaskType {
22+
class AnalyzeImages implements ITaskType {
2323
/**
2424
* @since 32.0.0
2525
*/
26-
public const ID = 'core:analyze-image';
26+
public const ID = 'core:analyze-images';
2727

2828
private IL10N $l;
2929

@@ -42,15 +42,15 @@ public function __construct(
4242
* @since 32.0.0
4343
*/
4444
public function getName(): string {
45-
return $this->l->t('Analyze image');
45+
return $this->l->t('Analyze images');
4646
}
4747

4848
/**
4949
* @inheritDoc
5050
* @since 32.0.0
5151
*/
5252
public function getDescription(): string {
53-
return $this->l->t('Ask a question about an image.');
53+
return $this->l->t('Ask a question about the given images.');
5454
}
5555

5656
/**
@@ -67,14 +67,14 @@ public function getId(): string {
6767
*/
6868
public function getInputShape(): array {
6969
return [
70-
'image' => new ShapeDescriptor(
71-
$this->l->t('Image'),
72-
$this->l->t('Image to ask a question about'),
73-
EShapeType::Image,
70+
'images' => new ShapeDescriptor(
71+
$this->l->t('Images'),
72+
$this->l->t('Images to ask a question about'),
73+
EShapeType::ListOfImages,
7474
),
7575
'input' => new ShapeDescriptor(
7676
$this->l->t('Question'),
77-
$this->l->t('What to ask about the image.'),
77+
$this->l->t('What to ask about the images.'),
7878
EShapeType::Text,
7979
),
8080
];

0 commit comments

Comments
 (0)