TypeError if multiple search terms are used

Created on 15 July 2025, about 2 months ago

Problem/Motivation

If multiple search terms are used, an array is returned from QueryInterface::getOriginalKeys(). This results in a TypeError exception:

 TypeError: Drupal\ai\OperationType\Embeddings\EmbeddingsInput::__construct(): Argument #1 ($prompt) must be of type string, array given in ...

Steps to reproduce

Search for multiple keywords with this module enabled and configured.

Proposed resolution

Cast the array to a string prior to calling the embeddings provider.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jhedstrom Portland, OR

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