first update to external config values
This commit is contained in:
66
src/Config/ModelGenerationDefaultsConfig.php
Normal file
66
src/Config/ModelGenerationDefaultsConfig.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Config;
|
||||
|
||||
final readonly class ModelGenerationDefaultsConfig
|
||||
{
|
||||
public function __construct(
|
||||
private string $modelName = 'mto-model',
|
||||
private bool $stream = false,
|
||||
private float $temperature = 0.1,
|
||||
private int $topK = 20,
|
||||
private float $topP = 0.8,
|
||||
private float $repeatPenalty = 1.05,
|
||||
private int $numCtx = 4096,
|
||||
private int $retrievalMaxChunks = 25,
|
||||
private int $retrievalVectorTopK = 25,
|
||||
) {
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user