Implemented input validation and styling for temperature and max tokens options in the Playground component.
Browse files
src/lib/components/Playground/PlaygroundOptions.svelte
CHANGED
@@ -26,9 +26,12 @@
|
|
26 |
>Temperature</label
|
27 |
>
|
28 |
<input
|
29 |
-
type="
|
30 |
-
class="w-
|
31 |
bind:value={temperature}
|
|
|
|
|
|
|
32 |
/>
|
33 |
</div>
|
34 |
<input
|
@@ -47,9 +50,12 @@
|
|
47 |
>Max tokens</label
|
48 |
>
|
49 |
<input
|
50 |
-
type="
|
51 |
-
class="w-
|
52 |
bind:value={maxTokens}
|
|
|
|
|
|
|
53 |
/>
|
54 |
</div>
|
55 |
<input
|
|
|
26 |
>Temperature</label
|
27 |
>
|
28 |
<input
|
29 |
+
type="number"
|
30 |
+
class="w-16 rounded border px-1 py-0.5 text-right text-sm"
|
31 |
bind:value={temperature}
|
32 |
+
min="0"
|
33 |
+
max="1"
|
34 |
+
step="0.1"
|
35 |
/>
|
36 |
</div>
|
37 |
<input
|
|
|
50 |
>Max tokens</label
|
51 |
>
|
52 |
<input
|
53 |
+
type="number"
|
54 |
+
class="w-20 rounded border px-1 py-0.5 text-right text-sm"
|
55 |
bind:value={maxTokens}
|
56 |
+
min="1"
|
57 |
+
max="32000"
|
58 |
+
step="1"
|
59 |
/>
|
60 |
</div>
|
61 |
<input
|