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(); $this->setRetrievalMaxChunks($retrievalMaxChunks); $this->setRetrievalVectorTopK($retrievalVectorTopK); } // ----------------------------- // Getter // ----------------------------- 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; } public function getRetrievalMaxChunks(): int { return $this->retrievalMaxChunks; } public function getRetrievalVectorTopK(): int { return $this->retrievalVectorTopK; } // ----------------------------- // Controlled Mutators // ----------------------------- // Nur vom Manager nutzen public function setActive(bool $active): void { $this->active = $active; } public function setRetrievalMaxChunks(int $value): void { $value = max(1, min($value, self::MAX_RETRIEVAL_CHUNKS)); $this->retrievalMaxChunks = $value; } public function setRetrievalVectorTopK(int $value): void { $value = max(1, min($value, self::MAX_VECTOR_TOPK)); $this->retrievalVectorTopK = $value; } }