Create an 'embedding' object that can be validated
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3540885. --> Reported by: [kim.pepper](https://www.drupal.org/user/370574) Related to !825 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Currently <code>\Drupal\ai_search\EmbeddingStrategyInterface::getEmbedding()</code> returns an array. In <code>\Drupal\ai\Base\AiVdbProviderClientBase::validateRetrievedEmbedding() </code>we go through each array key and validate each one, throwing exceptions.</p> <p>We can create an Embedding object and validate it using our existing validation tools.</p> <h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4> <p>Please provide information like AI modules enabled, which AI provider, browser, etc.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3>Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)</h3>
issue