feat: support multiple images

Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
pull/53763/head
Lukas Schaefer 10 months ago
parent 3e24c40939
commit 20a779e4aa
No known key found for this signature in database
GPG Key ID: C7BC472A62569A20
  1. 2
      lib/composer/composer/autoload_classmap.php
  2. 2
      lib/composer/composer/autoload_static.php
  3. 2
      lib/private/TaskProcessing/Manager.php
  4. 20
      lib/public/TaskProcessing/TaskTypes/AnalyzeImages.php

@ -842,7 +842,7 @@ return array(
'OCP\\TaskProcessing\\ShapeDescriptor' => $baseDir . '/lib/public/TaskProcessing/ShapeDescriptor.php',
'OCP\\TaskProcessing\\ShapeEnumValue' => $baseDir . '/lib/public/TaskProcessing/ShapeEnumValue.php',
'OCP\\TaskProcessing\\Task' => $baseDir . '/lib/public/TaskProcessing/Task.php',
'OCP\\TaskProcessing\\TaskTypes\\AnalyzeImage' => $baseDir . '/lib/public/TaskProcessing/TaskTypes/AnalyzeImage.php',
'OCP\\TaskProcessing\\TaskTypes\\AnalyzeImages' => $baseDir . '/lib/public/TaskProcessing/TaskTypes/AnalyzeImages.php',
'OCP\\TaskProcessing\\TaskTypes\\AudioToText' => $baseDir . '/lib/public/TaskProcessing/TaskTypes/AudioToText.php',
'OCP\\TaskProcessing\\TaskTypes\\ContextAgentInteraction' => $baseDir . '/lib/public/TaskProcessing/TaskTypes/ContextAgentInteraction.php',
'OCP\\TaskProcessing\\TaskTypes\\ContextWrite' => $baseDir . '/lib/public/TaskProcessing/TaskTypes/ContextWrite.php',

@ -883,7 +883,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OCP\\TaskProcessing\\ShapeDescriptor' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/ShapeDescriptor.php',
'OCP\\TaskProcessing\\ShapeEnumValue' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/ShapeEnumValue.php',
'OCP\\TaskProcessing\\Task' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/Task.php',
'OCP\\TaskProcessing\\TaskTypes\\AnalyzeImage' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/TaskTypes/AnalyzeImage.php',
'OCP\\TaskProcessing\\TaskTypes\\AnalyzeImages' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/TaskTypes/AnalyzeImages.php',
'OCP\\TaskProcessing\\TaskTypes\\AudioToText' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/TaskTypes/AudioToText.php',
'OCP\\TaskProcessing\\TaskTypes\\ContextAgentInteraction' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/TaskTypes/ContextAgentInteraction.php',
'OCP\\TaskProcessing\\TaskTypes\\ContextWrite' => __DIR__ . '/../../..' . '/lib/public/TaskProcessing/TaskTypes/ContextWrite.php',

@ -585,7 +585,7 @@ class Manager implements IManager {
\OCP\TaskProcessing\TaskTypes\ContextAgentInteraction::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\ContextAgentInteraction::class),
\OCP\TaskProcessing\TaskTypes\TextToTextProofread::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToTextProofread::class),
\OCP\TaskProcessing\TaskTypes\TextToSpeech::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToSpeech::class),
\OCP\TaskProcessing\TaskTypes\AnalyzeImage::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\AnalyzeImage::class),
\OCP\TaskProcessing\TaskTypes\AnalyzeImages::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\AnalyzeImages::class),
];
foreach ($context->getTaskProcessingTaskTypes() as $providerServiceRegistration) {

@ -16,14 +16,14 @@ use OCP\TaskProcessing\ITaskType;
use OCP\TaskProcessing\ShapeDescriptor;
/**
* This is the task processing task type to ask a question about an image
* This is the task processing task type to ask a question about the images
* @since 32.0.0
*/
class AnalyzeImage implements ITaskType {
class AnalyzeImages implements ITaskType {
/**
* @since 32.0.0
*/
public const ID = 'core:analyze-image';
public const ID = 'core:analyze-images';
private IL10N $l;
@ -42,7 +42,7 @@ class AnalyzeImage implements ITaskType {
* @since 32.0.0
*/
public function getName(): string {
return $this->l->t('Analyze image');
return $this->l->t('Analyze images');
}
/**
@ -50,7 +50,7 @@ class AnalyzeImage implements ITaskType {
* @since 32.0.0
*/
public function getDescription(): string {
return $this->l->t('Ask a question about an image.');
return $this->l->t('Ask a question about the given images.');
}
/**
@ -67,14 +67,14 @@ class AnalyzeImage implements ITaskType {
*/
public function getInputShape(): array {
return [
'image' => new ShapeDescriptor(
$this->l->t('Image'),
$this->l->t('Image to ask a question about'),
EShapeType::Image,
'images' => new ShapeDescriptor(
$this->l->t('Images'),
$this->l->t('Images to ask a question about'),
EShapeType::ListOfImages,
),
'input' => new ShapeDescriptor(
$this->l->t('Question'),
$this->l->t('What to ask about the image.'),
$this->l->t('What to ask about the images.'),
EShapeType::Text,
),
];
Loading…
Cancel
Save