l = $l10nFactory->get('lib'); } /** * @inheritDoc * @since 32.0.0 */ public function getName(): string { return $this->l->t('Analyze images'); } /** * @inheritDoc * @since 32.0.0 */ public function getDescription(): string { return $this->l->t('Ask a question about the given images.'); } /** * @return string * @since 32.0.0 */ public function getId(): string { return self::ID; } /** * @return ShapeDescriptor[] * @since 32.0.0 */ public function getInputShape(): array { return [ '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 images.'), EShapeType::Text, ), ]; } /** * @return ShapeDescriptor[] * @since 32.0.0 */ public function getOutputShape(): array { return [ 'output' => new ShapeDescriptor( $this->l->t('Generated response'), $this->l->t('The answer to the question'), EShapeType::Text ), ]; } }