Provide embeddings vector size
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3477750. --> Reported by: [slashrsm](https://www.drupal.org/user/744628) Related to !116 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>In some situations it is useful to know the size of the output vector when generating embeddings. Some providers have a static map (<a href="https://platform.openai.com/docs/models/embeddings">OpenAI</a> for example) while some offer APIs to retrieve this information (<a href="https://github.com/ollama/ollama/blob/main/docs/api.md#show-model-information">Ollama</a> for example).</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Add a function to <code>Drupal\ai\OperationType\Embeddings\EmbeddingsInterafce</code> that will return vector size for a given model.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>TBD</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>None. </p> <h3 id="summary-api-changes">API changes</h3> <p>New function added to <code>Drupal\ai\OperationType\Embeddings\EmbeddingsInterafce</code>.</p>
issue