@@ -196,24 +196,21 @@ <h2 class="font-bold mb-4 ml-4">Conversations</h2>
196196 < h3 class ="text-lg font-bold mb-6 "> Settings</ h3 >
197197 < div class ="h-[calc(90vh-12rem)] overflow-y-auto ">
198198 < p class ="opacity-40 mb-6 "> Settings below are saved in browser's localStorage</ p >
199- < label class ="input input-bordered flex items-center gap-2 mb-2 ">
200- < b > API Key</ b >
201- < input type ="text " class ="grow " placeholder ="Default: (empty) " v-model ="config.apiKey " />
202- </ label >
199+ < settings-modal-short-input :config-key ="'apiKey' " :config-default ="configDefault " :config-info ="configInfo " v-model ="config.apiKey "> </ settings-modal-short-input >
203200 < label class ="form-control mb-2 ">
204201 < div class ="label "> System Message</ div >
205202 < textarea class ="textarea textarea-bordered h-24 " :placeholder ="'Default: ' + configDefault.systemMessage " v-model ="config.systemMessage "> </ textarea >
206203 </ label >
207204 < template v-for ="configKey in ['temperature', 'top_k', 'top_p', 'min_p', 'max_tokens'] ">
208- < settings-modal-numeric -input :config-key ="configKey " :config-default ="configDefault " :config-info ="configInfo " v-model ="config[configKey] " />
205+ < settings-modal-short -input :config-key ="configKey " :config-default ="configDefault " :config-info ="configInfo " v-model ="config[configKey] " />
209206 </ template >
210207 <!-- TODO: add more sampling-related configs, please regroup them into different "collapse" sections -->
211208 <!-- Section: Other sampler settings -->
212209 < details class ="collapse collapse-arrow bg-base-200 mb-2 overflow-visible ">
213210 < summary class ="collapse-title font-bold "> Other sampler settings</ summary >
214211 < div class ="collapse-content ">
215212 < template v-for ="configKey in ['dynatemp_range', 'dynatemp_exponent', 'typical_p', 'xtc_probability', 'xtc_threshold'] ">
216- < settings-modal-numeric -input :config-key ="configKey " :config-default ="configDefault " :config-info ="configInfo " v-model ="config[configKey] " />
213+ < settings-modal-short -input :config-key ="configKey " :config-default ="configDefault " :config-info ="configInfo " v-model ="config[configKey] " />
217214 </ template >
218215 </ div >
219216 </ details >
@@ -222,7 +219,7 @@ <h3 class="text-lg font-bold mb-6">Settings</h3>
222219 < summary class ="collapse-title font-bold "> Penalties settings</ summary >
223220 < div class ="collapse-content ">
224221 < template v-for ="configKey in ['repeat_last_n', 'repeat_penalty', 'presence_penalty', 'frequency_penalty', 'dry_multiplier', 'dry_base', 'dry_allowed_length', 'dry_penalty_last_n'] ">
225- < settings-modal-numeric -input :config-key ="configKey " :config-default ="configDefault " :config-info ="configInfo " v-model ="config[configKey] " />
222+ < settings-modal-short -input :config-key ="configKey " :config-default ="configDefault " :config-info ="configInfo " v-model ="config[configKey] " />
226223 </ template >
227224 </ div >
228225 </ details >
@@ -249,7 +246,7 @@ <h3 class="text-lg font-bold mb-6">Settings</h3>
249246 </ div >
250247
251248 <!-- Template to be used by settings modal -->
252- < template id ="settings-modal-numeric -input ">
249+ < template id ="settings-modal-short -input ">
253250 < label class ="input input-bordered join-item grow flex items-center gap-2 mb-2 ">
254251 <!-- Show help message on hovering on the input label -->
255252 < div class ="dropdown dropdown-hover ">
@@ -303,7 +300,7 @@ <h3 class="text-lg font-bold mb-6">Settings</h3>
303300 custom : '' , // custom json-stringified object
304301 } ;
305302 const CONFIG_INFO = {
306- apiKey : '' ,
303+ apiKey : 'Set the API Key if you are using --api-key option for the server. ' ,
307304 systemMessage : 'The starting message that defines how model should behave.' ,
308305 temperature : 'Controls the randomness of the generated text by affecting the probability distribution of the output tokens. Higher = more random, lower = more focused.' ,
309306 dynatemp_range : 'Addon for the temperature sampler. The added value to the range of dynamic temperature, which adjusts probabilities by entropy of tokens.' ,
@@ -353,8 +350,8 @@ <h3 class="text-lg font-bold mb-6">Settings</h3>
353350 ) ;
354351
355352 // inout field to be used by settings modal
356- const SettingsModalNumericInput = defineComponent ( {
357- template : document . getElementById ( 'settings-modal-numeric -input' ) . innerHTML ,
353+ const SettingsModalShortInput = defineComponent ( {
354+ template : document . getElementById ( 'settings-modal-short -input' ) . innerHTML ,
358355 props : [ 'configKey' , 'configDefault' , 'configInfo' , 'modelValue' ] ,
359356 } ) ;
360357
@@ -452,7 +449,7 @@ <h3 class="text-lg font-bold mb-6">Settings</h3>
452449 const mainApp = createApp ( {
453450 components : {
454451 VueMarkdown,
455- SettingsModalNumericInput ,
452+ SettingsModalShortInput ,
456453 } ,
457454 data ( ) {
458455 return {
0 commit comments