67 lines
1.2 KiB
PHP
67 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Config;
|
|
|
|
final readonly class ModelGenerationDefaultsConfig
|
|
{
|
|
public function __construct(
|
|
private string $modelName,
|
|
private bool $stream,
|
|
private float $temperature,
|
|
private int $topK,
|
|
private float $topP,
|
|
private float $repeatPenalty,
|
|
private int $numCtx,
|
|
private int $retrievalMaxChunks,
|
|
private int $retrievalVectorTopK,
|
|
) {
|
|
}
|
|
|
|
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 getRetrievalMaxChunks(): int
|
|
{
|
|
return $this->retrievalMaxChunks;
|
|
}
|
|
|
|
public function getRetrievalVectorTopK(): int
|
|
{
|
|
return $this->retrievalVectorTopK;
|
|
}
|
|
}
|