Problem/Motivation

I am getting the following error while trying to add new AI agents

Class Drupal\ai_agents\Plugin\AiFunctionCall\Wikipedia contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Drupal\ai\Service\FunctionCalling\ExecutableFunctionCallInterface::getReadableOutput) in /var/www/html/web/modules/contrib/ai_agents/src/Plugin/AiFunctionCall/Wikipedia.php on line 35

The Wikipedia tool does not implement getReadableOutput() method

Steps to reproduce

Try creating an AI agent from the ui with the latest dev version of the module

Proposed resolution

The wikipedia tool has a setOutput method. But this method is not defined anywhere. Not sure if its going to be added to the plugin classes later.

Raising a PR with getReadableOutput

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork ai_agents-3520288

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

akhil babu created an issue. See original summary.

akhil babu’s picture

Status: Active » Needs review

I have raised a PR. Please review

annmarysruthy’s picture

Status: Needs review » Needs work

@akhil babu setOutput() method is necessary in all tools and cannot be removed.

akhil babu’s picture

Status: Needs work » Closed (outdated)

Thanks @annmarysruthy. Just checked again. getReadableOutput has been moved to Drupal\ai\Base\FunctionCallBase. So this issue no longer exists. Closing this issue