18 lines
403 B
PHP
18 lines
403 B
PHP
<?php
|
|
|
|
namespace App\Domain\Model\Embedding;
|
|
|
|
use App\Domain\Model\Value\Vector;
|
|
|
|
class LargeEmbeddingVector
|
|
{
|
|
public const DIMENSION = 3072;
|
|
|
|
public function __construct(
|
|
public readonly Vector $vector,
|
|
) {
|
|
if ($vector->dimension() !== self::DIMENSION) {
|
|
throw new \InvalidArgumentException('Vector must be ' . self::DIMENSION . ' dimensions');
|
|
}
|
|
}
|
|
} |