mirror of
https://github.com/coalaura/whiskr.git
synced 2025-09-08 00:29:54 +00:00
dynamic iterations
This commit is contained in:
@@ -532,7 +532,7 @@ body:not(.loading) #loading {
|
||||
}
|
||||
|
||||
.statistics .ttft::before {
|
||||
background-image: url(icons/ttft.svg);
|
||||
background-image: url(icons/time.svg);
|
||||
}
|
||||
|
||||
.statistics .tps::before {
|
||||
@@ -789,13 +789,18 @@ input.invalid {
|
||||
}
|
||||
|
||||
#reasoning-tokens,
|
||||
#temperature {
|
||||
#temperature,
|
||||
#iterations {
|
||||
appearance: textfield;
|
||||
width: 48px;
|
||||
padding: 2px 4px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#iterations {
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
label[for="role"] {
|
||||
background-image: url(icons/user.svg);
|
||||
}
|
||||
@@ -812,6 +817,10 @@ label[for="temperature"] {
|
||||
background-image: url(icons/temperature.svg);
|
||||
}
|
||||
|
||||
label[for="iterations"] {
|
||||
background-image: url(icons/time.svg);
|
||||
}
|
||||
|
||||
label[for="reasoning-effort"] {
|
||||
background-image: url(icons/reasoning.svg);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 679 B |
@@ -58,6 +58,10 @@
|
||||
<label for="temperature" title="Temperature (0 - 2)"></label>
|
||||
<input id="temperature" type="number" min="0" max="2" step="0.05" value="0.85" />
|
||||
</div>
|
||||
<div class="option">
|
||||
<label for="iterations" title="Maximum number of iterations (turns) per response"></label>
|
||||
<input id="iterations" type="number" min="1" max="50" value="3" />
|
||||
</div>
|
||||
<div class="option none">
|
||||
<label for="reasoning-effort" title="Reasoning Effort"></label>
|
||||
<select id="reasoning-effort">
|
||||
@@ -69,7 +73,7 @@
|
||||
</div>
|
||||
<div class="option none">
|
||||
<label for="reasoning-tokens" title="Maximum amount of reasoning tokens"></label>
|
||||
<input id="reasoning-tokens" type="number" min="2" max="1" step="0.05" value="0.85" />
|
||||
<input id="reasoning-tokens" type="number" min="2" max="1048576" value="1024" />
|
||||
</div>
|
||||
<div class="option group none">
|
||||
<button id="json" title="Turn on structured json output"></button>
|
||||
|
@@ -9,6 +9,7 @@
|
||||
$model = document.getElementById("model"),
|
||||
$prompt = document.getElementById("prompt"),
|
||||
$temperature = document.getElementById("temperature"),
|
||||
$iterations = document.getElementById("iterations"),
|
||||
$reasoningEffort = document.getElementById("reasoning-effort"),
|
||||
$reasoningTokens = document.getElementById("reasoning-tokens"),
|
||||
$json = document.getElementById("json"),
|
||||
@@ -816,20 +817,32 @@
|
||||
}
|
||||
|
||||
if (!$temperature.value) {
|
||||
$temperature.value = 0.85;
|
||||
}
|
||||
|
||||
const temperature = parseFloat($temperature.value);
|
||||
let temperature = parseFloat($temperature.value);
|
||||
|
||||
if (Number.isNaN(temperature) || temperature < 0 || temperature > 2) {
|
||||
return;
|
||||
temperature = 0.85;
|
||||
|
||||
$temperature.value = temperature;
|
||||
}
|
||||
|
||||
const effort = $reasoningEffort.value,
|
||||
tokens = parseInt($reasoningTokens.value);
|
||||
let iterations = parseInt($iterations.value);
|
||||
|
||||
if (Number.isNaN(iterations) || iterations < 1 || iterations > 50) {
|
||||
iterations = 3;
|
||||
|
||||
$iterations.value = iterations;
|
||||
}
|
||||
|
||||
const effort = $reasoningEffort.value;
|
||||
|
||||
let tokens = parseInt($reasoningTokens.value);
|
||||
|
||||
if (!effort && (Number.isNaN(tokens) || tokens <= 0 || tokens > 1024 * 1024)) {
|
||||
return;
|
||||
tokens = 1024;
|
||||
|
||||
$reasoningTokens.value = tokens;
|
||||
}
|
||||
|
||||
pushMessage();
|
||||
@@ -842,6 +855,7 @@
|
||||
prompt: $prompt.value,
|
||||
model: $model.value,
|
||||
temperature: temperature,
|
||||
iterations: iterations,
|
||||
reasoning: {
|
||||
effort: effort,
|
||||
tokens: tokens || 0,
|
||||
|
Reference in New Issue
Block a user