deepseek-1.x-dev/src/Attribute/AiDbVectors.php
src/Attribute/AiDbVectors.php
<?php
namespace Drupal\deepseek\Attribute;
use Drupal\Component\Plugin\Attribute\AttributeBase;
use Drupal\Core\StringTranslation\TranslatableMarkup;
/**
* The AI database vectors attribute.
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class AiDbVectors extends AttributeBase {
/**
* Constructs a new Aidbvectors instance.
*
* @param string $id
* The plugin ID. There are some implementation bugs that make the plugin
* available only if the ID follows a specific pattern. It must be either
* identical to group or prefixed with the group. E.g. if the group is "foo"
* the ID must be either "foo" or "foo:bar".
* @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $label
* (optional) The human-readable name of the plugin.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
* (optional) A brief description of the plugin.
* @param string|null $url
* The endpoint API of the plugin.
* @param string|null $api_key
* The API key of AI provider.
* @param string|null $embedding
* The model embeddings.
* @param string|null $port
* Port of service.
* @param string|null $db_name
* Database name.
* @param string|null $table_name
* Table name if using relational database.
*/
public function __construct(
public readonly string $id,
public readonly ?TranslatableMarkup $label,
public readonly ?TranslatableMarkup $description = NULL,
public ?string $url = '',
public ?string $api_key = NULL,
public ?string $embedding = '',
public ?string $port = '',
public ?string $db_name = 'default',
public ?string $table_name = 'ai_embedding',
) {}
}
