optimize ui

add new ki endpoint params
This commit is contained in:
team2
2026-02-17 20:36:47 +01:00
parent 5b2a633a99
commit 6822c8f3f8
23 changed files with 1915 additions and 608 deletions

View File

@@ -0,0 +1,90 @@
<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: \App\Repository\ModelGenerationConfigRepository::class)]
#[ORM\Table(name: 'model_generation_config')]
#[ORM\Index(columns: ['model_name', 'active'], name: 'idx_model_active')]
class ModelGenerationConfig
{
#[ORM\Id]
#[ORM\Column(type: 'uuid', unique: true)]
private Uuid $id;
#[ORM\Column(name: 'model_name', type: 'string', length: 120)]
private string $modelName;
#[ORM\Column(type: 'boolean')]
private bool $stream;
#[ORM\Column(type: 'float')]
private float $temperature;
#[ORM\Column(name: 'top_k', type: 'integer')]
private int $topK;
#[ORM\Column(name: 'top_p', type: 'float')]
private float $topP;
#[ORM\Column(name: 'repeat_penalty', type: 'float')]
private float $repeatPenalty;
#[ORM\Column(name: 'num_ctx', type: 'integer')]
private int $numCtx;
#[ORM\Column(type: 'boolean')]
private bool $active;
#[ORM\Column(type: 'integer')]
private int $version;
#[ORM\Column(name: 'created_at', type: 'datetime_immutable')]
private \DateTimeImmutable $createdAt;
public function __construct(
string $modelName,
int $version,
bool $stream = false,
float $temperature = 0.1,
int $topK = 20,
float $topP = 0.8,
float $repeatPenalty = 1.05,
int $numCtx = 4096,
bool $active = false
) {
$this->id = Uuid::v4();
$this->modelName = $modelName;
$this->version = $version;
$this->stream = $stream;
$this->temperature = $temperature;
$this->topK = $topK;
$this->topP = $topP;
$this->repeatPenalty = $repeatPenalty;
$this->numCtx = $numCtx;
$this->active = $active;
$this->createdAt = new \DateTimeImmutable();
}
public function getId(): Uuid { return $this->id; }
public function getModelName(): string { return $this->modelName; }
public function isStream(): bool { return $this->stream; }
public function getTemperature(): float { return $this->temperature; }
public function getTopK(): int { return $this->topK; }
public function getTopP(): float { return $this->topP; }
public function getRepeatPenalty(): float { return $this->repeatPenalty; }
public function getNumCtx(): int { return $this->numCtx; }
public function isActive(): bool { return $this->active; }
public function getVersion(): int { return $this->version; }
public function getCreatedAt(): \DateTimeImmutable { return $this->createdAt; }
// Nur vom Manager nutzen
public function setActive(bool $active): void
{
$this->active = $active;
}
}