[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

   1  <?php
   2  
   3  declare (strict_types=1);
   4  namespace WordPress\AiClient\Providers\Models\Contracts;
   5  
   6  use WordPress\AiClient\Providers\DTO\ProviderMetadata;
   7  use WordPress\AiClient\Providers\Models\DTO\ModelConfig;
   8  use WordPress\AiClient\Providers\Models\DTO\ModelMetadata;
   9  /**
  10   * Interface for AI models.
  11   *
  12   * Models represent specific AI models from providers and define
  13   * their capabilities, configuration, and execution methods.
  14   *
  15   * @since 0.1.0
  16   */
  17  interface ModelInterface
  18  {
  19      /**
  20       * Gets model metadata.
  21       *
  22       * @since 0.1.0
  23       *
  24       * @return ModelMetadata Model metadata.
  25       */
  26      public function metadata(): ModelMetadata;
  27      /**
  28       * Returns the metadata for the model's provider.
  29       *
  30       * @since 0.1.0
  31       *
  32       * @return ProviderMetadata The provider metadata.
  33       */
  34      public function providerMetadata(): ProviderMetadata;
  35      /**
  36       * Sets model configuration.
  37       *
  38       * @since 0.1.0
  39       *
  40       * @param ModelConfig $config Model configuration.
  41       * @return void
  42       */
  43      public function setConfig(ModelConfig $config): void;
  44      /**
  45       * Gets model configuration.
  46       *
  47       * @since 0.1.0
  48       *
  49       * @return ModelConfig Current model configuration.
  50       */
  51      public function getConfig(): ModelConfig;
  52  }


Generated : Sat Jun 13 09:38:55 2026 Cross-referenced by PHPXref