forked from open-webui/open-webui
		
	fix: keep alive value should be string
This commit is contained in:
		
							parent
							
								
									7053f2f67d
								
							
						
					
					
						commit
						56966c411b
					
				
					 1 changed files with 33 additions and 14 deletions
				
			
		|  | @ -7,7 +7,8 @@ | ||||||
| 
 | 
 | ||||||
| 	// Advanced | 	// Advanced | ||||||
| 	let requestFormat = ''; | 	let requestFormat = ''; | ||||||
| 	let keepAlive = ''; | 	let keepAlive = null; | ||||||
|  | 
 | ||||||
| 	let options = { | 	let options = { | ||||||
| 		// Advanced | 		// Advanced | ||||||
| 		seed: 0, | 		seed: 0, | ||||||
|  | @ -59,6 +60,37 @@ | ||||||
| 		<AdvancedParams bind:options /> | 		<AdvancedParams bind:options /> | ||||||
| 		<hr class=" dark:border-gray-700" /> | 		<hr class=" dark:border-gray-700" /> | ||||||
| 
 | 
 | ||||||
|  | 		<div class=" py-1 w-full justify-between"> | ||||||
|  | 			<div class="flex w-full justify-between"> | ||||||
|  | 				<div class=" self-center text-xs font-medium">Keep Alive</div> | ||||||
|  | 
 | ||||||
|  | 				<button | ||||||
|  | 					class="p-1 px-3 text-xs flex rounded transition" | ||||||
|  | 					type="button" | ||||||
|  | 					on:click={() => { | ||||||
|  | 						keepAlive = keepAlive === null ? '5m' : null; | ||||||
|  | 					}} | ||||||
|  | 				> | ||||||
|  | 					{#if keepAlive === null} | ||||||
|  | 						<span class="ml-2 self-center"> Default </span> | ||||||
|  | 					{:else} | ||||||
|  | 						<span class="ml-2 self-center"> Custom </span> | ||||||
|  | 					{/if} | ||||||
|  | 				</button> | ||||||
|  | 			</div> | ||||||
|  | 
 | ||||||
|  | 			{#if keepAlive !== null} | ||||||
|  | 				<div class="flex mt-1 space-x-2"> | ||||||
|  | 					<input | ||||||
|  | 						class="w-full rounded py-1.5 px-4 text-sm dark:text-gray-300 dark:bg-gray-800 outline-none border border-gray-100 dark:border-gray-600" | ||||||
|  | 						type="text" | ||||||
|  | 						placeholder={`e.g.) "30s","10m". Valid time units are "s", "m", "h".`} | ||||||
|  | 						bind:value={keepAlive} | ||||||
|  | 					/> | ||||||
|  | 				</div> | ||||||
|  | 			{/if} | ||||||
|  | 		</div> | ||||||
|  | 
 | ||||||
| 		<div> | 		<div> | ||||||
| 			<div class=" py-1 flex w-full justify-between"> | 			<div class=" py-1 flex w-full justify-between"> | ||||||
| 				<div class=" self-center text-sm font-medium">Request Mode</div> | 				<div class=" self-center text-sm font-medium">Request Mode</div> | ||||||
|  | @ -87,19 +119,6 @@ | ||||||
| 				</button> | 				</button> | ||||||
| 			</div> | 			</div> | ||||||
| 		</div> | 		</div> | ||||||
| 		<div class=" py-1 flex w-full justify-between"> |  | ||||||
| 			<div class=" w-20 text-xs font-medium self-center">Keep Alive</div> |  | ||||||
| 			<div class=" flex-1 self-center"> |  | ||||||
| 				<input |  | ||||||
| 					class="w-full rounded py-1.5 px-4 text-sm dark:text-gray-300 dark:bg-gray-800 outline-none border border-gray-100 dark:border-gray-600" |  | ||||||
| 					type="number" |  | ||||||
| 					placeholder="Default" |  | ||||||
| 					bind:value={keepAlive} |  | ||||||
| 					autocomplete="off" |  | ||||||
| 					min="-1" |  | ||||||
| 				/> |  | ||||||
| 			</div> |  | ||||||
| 		</div> |  | ||||||
| 	</div> | 	</div> | ||||||
| 
 | 
 | ||||||
| 	<div class="flex justify-end pt-3 text-sm font-medium"> | 	<div class="flex justify-end pt-3 text-sm font-medium"> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek