Fatal error: Declaration of SQLiteProvider::vectorSearch must be compatible with AiVdbProviderInterface::vectorSearch

Created on 15 May 2025, 2 months ago

Problem/Motivation

Fatal error: Declaration of Drupal\ai_vdb_provider_sqlite\Plugin\VdbProvider\SQLiteProvider::vectorSearch(string $collection_name, array $vector_input, array $output_fields, string $filters = '', int $limit = 10, int $offset = 0, ?string $database = null): array must be compatible with Drupal\ai\AiVdbProviderInterface::vectorSearch(string $collection_name, array $vector_input, array $output_fields, Drupal\search_api\Query\QueryInterface $query, string $filters = '', int $limit = 10, int $offset = 0, string $database = 'default'): array in /var/www/html/web/modules/contrib/ai_vdb_provider_sqlite/src/Plugin/VdbProvider/SQLiteProvider.php on line 287

the 1.1.x version introduced a breaking change in this function signature in Pass metric type to vector search function Active (which is technically ok because it is still experimental..)

Steps to reproduce

update the ai modules to their 1.1.x branches.

Proposed resolution

I don't know.. maybe branching 1.1.x as well?
Or maybe just drop support for 1.0.x and go for >1.1 of the ai module like ai_vdb_provider_postgres does
I would also appreciate a dev release for the raw branches so that they show up in the version selection on issues :D

Remaining tasks

review patch.
Maybe we can do the same as pgvector now with this?

User interface changes

none

API changes

none?

Data model changes

none

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇭Switzerland bircher 🇨🇿

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024