Voicely Conversational AI Search adds a RAG-powered conversational search interface to Drupal sites.
Users can ask questions in natural language( text or voice), and the module retrieves relevant content from the site's
indexed pages/nodes and generates a grounded answer via an LLM backend. It also exposes a decoupled JSON API for headless front-ends and supports multiple languages.
Module is compatible with different search types like solr search, opensearch etc and that's what differentiates it from other modules.
Comments
Comment #2
vishal.kadamComment #3
avpadernoThank you for applying!
Before giving links helpful to understand how the review process works, what to expect from a review, and what to do to avoid a review takes more time than needed, I would like to thank all the reviewers for the work they do.
These applications are volunters-driven, which also means it is not possible to predict when an application will be marked fixed and the applicant will get the permission to opt projects into security advisory policy. While we aim to make an application as quick as possible, it is also important for us that more people review the project used for an application. In this way, we make sure applications do not miss some important points that should be instead reported.
Applications are not meant to be complete debugging sessions that eliminate every existing bug, though. I apologize if sometimes applications seem to go into too-detailed reviews.
Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.
The important notes are the following.
Keep in mind that once the project is opted into security advisory coverage, only Security Team members may change coverage.
To the reviewers
Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.
The important notes are the following.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.
Comment #4
avpadernovoicely_search.info.yml
Dependency names follow the format
<project machine name>:<module machine name>. Since those modules are not Drupal core modules, the first part cannot be drupal:.Comment #5
avpadernoI am going to review the rest of the files, now that I have time.
Comment #6
avpadernosrc/Annotation/SearchProvider.php
Projects that are compatible with Drupal 10 or higher versions should use attributes instead of annotations. This means requiring at least Drupal 10.3, but this is not an issue, considering which Drupal core versions are nowadays supported.
src/Controller/ConversationApiController.php
Code compatible with latest Drupal releases should use property promotion.
Since that class does not use methods from the parent class, or it uses a single method from the parent class, it does not need to use
ControllerBaseas parent class.Controllers do not need to have a parent class; as long as they implement
\Drupal\Core\DependencyInjection\ContainerInjectionInterface, they are fine.src/Controller/ConversationLogController.php
For translatable strings that change basing on a number (as in this case), there is
::formatPlural().src/Controller/StatusDashboardController.php
Strings used in the user interface should be translatable.
Documentation comments should describe also parameters and return value.
A :variable placeholder should be use for URLs as shown in the documentation for
FormattableMarkup::placeholderFormat(). That is the placeholder used also by Drupal core code for URLs that take to drupal.org.For system URLs, it is preferable to build the URL with
Url::fromRoute($route_name)->toUrl().For more complex markup, it is better to use a theme or a render function.
CSS styles should not be added directly in the markup. That could create issue with the theme used by a site.
There is no need to hardcode the markup for a table. Drupal core has a theme function for that.
Drupal core has
ByteSizeMarkup::create(), which returns a translatable string.Probably, the minimum required Drupal version needs to be raised to at least Drupal 10.3, but that should not be a problem, given that Drupal 10.3 is no longer supported, and sites are expected to use a more recent Drupal 10.x version.
voicely_search.module
A new module that aims to be compatible with latest Drupal releases is expected to implement hooks as class methods as described in Support for object oriented hook implementations using autowired services.
It requires increasing the minimum required Drupal version, but that is not an issue, since not all the Drupal releases are supported.
voicely_search.services.yml
Services can be autowired starting with Drupal 9.3.x. This means that it is no longer necessary to give a list of service arguments in the .services.yml file; they will be retrieved from the constructor definition.
Comment #7
kushal bansal commentedHi @avpaderno
Thanks for taking time to review this. I really appreciate that you gave your precious time to review this. I will make updates to the code asap and wait for re-review.
Thanks
Comment #8
vishal.kadam1. FILE: voicely_search.module
Since the module is declared compatible with Drupal 10.3, removing the function implementing the hook is not possible. The function still needs to be defined, but it calls the method defined by the service class, as described in Support for object oriented hook implementations using autowired services (Backwards-compatible Hook implementation for Drupal versions from 10.1 to 11.0).
Drupal does not have primary and secondary hooks. Instead of that, it is preferable to use the usual description: “Hook implementations for the [module name] module”, where [module name] is the name of the module given in its .info.yml file.
2. FILE: src/Form/SettingsForm.php
With Drupal 10 and Drupal 11, there is no longer need to use #default_value for each form element, when the parent class is ConfigFormBase: It is sufficient to use #config_target, as in the following code.
Using that code, it is no longer needed to save the configuration values in the form submission handler: The parent class will take care of that.
Comment #9
kushal bansal commentedHi @vishal.kadam and @avpaderno
Thanks for the review. I appreciate your time on reviewing this. I have added the recommended fixes and done some manual testing of the module after changes as well . Please have a re-review and let me know if more fixes required.
Comment #10
vishal.kadamIf you changed what has been reported, please change the status to Needs review. In this way, reviewers will know everything has been changed and can be reviewed again.
Comment #11
kushal bansal commented