deepseek-1.x-dev/src/Attribute/AiProviders.php

src/Attribute/AiProviders.php
<?php

namespace Drupal\deepseek\Attribute;

use Drupal\Component\Plugin\Attribute\Plugin;
use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * Defines an Address provider item annotation object.
 */
#[\Attribute(\Attribute::TARGET_CLASS)]
class AiProviders extends Plugin {

  /**
   * Constructs an AI attribute.
   *
   * @param string $id
   *   The plugin ID.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $label
   *   The administrative label of the AI.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
   *   The administrative description of the AI.
   * @param string|null $url
   *   The endpoint API of the plugin.
   * @param string|null $model
   *   The model of AI.
   * @param string|null $api_key
   *   The API key of AI provider.
   * @param string|null $embedding
   *   The model embeddings.
   */
  public function __construct(
    public readonly string $id,
    public ?TranslatableMarkup $label = NULL,
    public ?TranslatableMarkup $description = NULL,
    public ?string $url = '',
    public ?string $model = '',
    public ?string $api_key = NULL,
    public ?string $embedding = '',
  ) {}

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc