PHP Fatal error: Declaration of Drupal\ai_vdb_provider_postgres\Plugin\VdbProvider\PostgresProvider::vectorSearch

Created on 9 January 2025, 3 months ago

Problem/Motivation

php8.2
Drupal 10.4

"PHP message: PHP Fatal error: Declaration of Drupal\ai_vdb_provider_postgres\Plugin\VdbProvider\PostgresProvider::vectorSearch(string $collection_name, array $vector_input, array $output_fields, string $filters = '', int $limit = 10, int $offset = 0, Drupal\ai\Enum\VdbSimilarityMetrics $metric_type = Drupal\ai\Enum\VdbSimilarityMetrics::CosineSimilarity, ?string $database = null): array must be compatible with Drupal\ai\AiVdbProviderInterface::vectorSearch(string $collection_name, array $vector_input, array $output_fields, string $filters = '', int $limit = 10, int $offset = 0, string $database = 'default'): array in drupal-10.4.x/html/modules/contrib/ai_vdb_provider_postgres/src/Plugin/VdbProvider/PostgresProvider.php on line 326

Steps to reproduce

I enabled the module
cleared cache
went to my site
got a WSOD and the above error

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @SocialNicheGuru
  • Hi @socialnicheguru,

    Sorry for the delay in getting back to you.

    This module is still in early development and, at this time, is not fully supported by drupal/ai, one of its dependencies. As such it currently relies on a patch to function. At time of writing it requires the 1.0.x-dev branch with the following issue's MR patch: https://www.drupal.org/project/ai/issues/3486166 ✨ Pass metric type to vector search function Active .

    I'll spend some time today improving the project page with a proper description, setup instructions, the current state of the project and a rough roadmap.

    Thanks

  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

    No worries. I am here to try and help out.

Production build 0.71.5 2024