[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/php-ai-client/src/Providers/Models/EmbeddingGeneration/Contracts/ -> EmbeddingGenerationModelInterface.php (source)

   1  <?php
   2  
   3  declare (strict_types=1);
   4  namespace WordPress\AiClient\Providers\Models\EmbeddingGeneration\Contracts;
   5  
   6  use WordPress\AiClient\Messages\DTO\MessagePart;
   7  use WordPress\AiClient\Results\DTO\EmbeddingResult;
   8  /**
   9   * Interface for models that support embedding generation.
  10   *
  11   * @since 1.4.0
  12   */
  13  interface EmbeddingGenerationModelInterface
  14  {
  15      /**
  16       * Generates embeddings from one or more inputs.
  17       *
  18       * @since 1.4.0
  19       *
  20       * @param list<MessagePart> $inputs The inputs to embed, one embedding generated per input.
  21       * @return EmbeddingResult Result containing one embedding per input, in input order.
  22       */
  23      public function generateEmbeddingResult(array $inputs): EmbeddingResult;
  24  }


Generated : Wed Oct 14 08:20:33 2026 Cross-referenced by PHPXref