forked from open-webui/open-webui
		
	Merge pull request #1117 from open-webui/model-whitelist
feat: model filter (whitelist)
This commit is contained in:
		
						commit
						bcabd3df84
					
				
					 7 changed files with 241 additions and 88 deletions
				
			
		| 
						 | 
				
			
			@ -912,88 +912,6 @@
 | 
			
		|||
					{/if}
 | 
			
		||||
				</div>
 | 
			
		||||
			</div>
 | 
			
		||||
 | 
			
		||||
			<!-- <div class="mt-2 space-y-3 pr-1.5">
 | 
			
		||||
				<div>
 | 
			
		||||
					<div class=" mb-2.5 text-sm font-medium">Add LiteLLM Model</div>
 | 
			
		||||
					<div class="flex w-full mb-2">
 | 
			
		||||
						<div class="flex-1">
 | 
			
		||||
							<input
 | 
			
		||||
								class="w-full rounded py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-800 outline-none"
 | 
			
		||||
								placeholder="Enter LiteLLM Model (e.g. ollama/mistral)"
 | 
			
		||||
								bind:value={liteLLMModel}
 | 
			
		||||
								autocomplete="off"
 | 
			
		||||
							/>
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<div class="flex justify-between items-center text-sm">
 | 
			
		||||
						<div class="  font-medium">Advanced Model Params</div>
 | 
			
		||||
						<button
 | 
			
		||||
							class=" text-xs font-medium text-gray-500"
 | 
			
		||||
							type="button"
 | 
			
		||||
							on:click={() => {
 | 
			
		||||
								showLiteLLMParams = !showLiteLLMParams;
 | 
			
		||||
							}}>{showLiteLLMParams ? 'Hide' : 'Show'}</button
 | 
			
		||||
						>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					{#if showLiteLLMParams}
 | 
			
		||||
						<div>
 | 
			
		||||
							<div class=" mb-2.5 text-sm font-medium">LiteLLM API Key</div>
 | 
			
		||||
							<div class="flex w-full">
 | 
			
		||||
								<div class="flex-1">
 | 
			
		||||
									<input
 | 
			
		||||
										class="w-full rounded py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-800 outline-none"
 | 
			
		||||
										placeholder="Enter LiteLLM API Key (e.g. os.environ/AZURE_API_KEY_CA)"
 | 
			
		||||
										bind:value={liteLLMAPIKey}
 | 
			
		||||
										autocomplete="off"
 | 
			
		||||
									/>
 | 
			
		||||
								</div>
 | 
			
		||||
							</div>
 | 
			
		||||
						</div>
 | 
			
		||||
 | 
			
		||||
						<div>
 | 
			
		||||
							<div class=" mb-2.5 text-sm font-medium">LiteLLM API Base URL</div>
 | 
			
		||||
							<div class="flex w-full">
 | 
			
		||||
								<div class="flex-1">
 | 
			
		||||
									<input
 | 
			
		||||
										class="w-full rounded py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-800 outline-none"
 | 
			
		||||
										placeholder="Enter LiteLLM API Base URL"
 | 
			
		||||
										bind:value={liteLLMAPIBase}
 | 
			
		||||
										autocomplete="off"
 | 
			
		||||
									/>
 | 
			
		||||
								</div>
 | 
			
		||||
							</div>
 | 
			
		||||
						</div>
 | 
			
		||||
 | 
			
		||||
						<div>
 | 
			
		||||
							<div class=" mb-2.5 text-sm font-medium">LiteLLM API RPM</div>
 | 
			
		||||
							<div class="flex w-full">
 | 
			
		||||
								<div class="flex-1">
 | 
			
		||||
									<input
 | 
			
		||||
										class="w-full rounded py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-800 outline-none"
 | 
			
		||||
										placeholder="Enter LiteLLM API RPM"
 | 
			
		||||
										bind:value={liteLLMRPM}
 | 
			
		||||
										autocomplete="off"
 | 
			
		||||
									/>
 | 
			
		||||
								</div>
 | 
			
		||||
							</div>
 | 
			
		||||
						</div>
 | 
			
		||||
					{/if}
 | 
			
		||||
 | 
			
		||||
					<div class="mt-2 text-xs text-gray-400 dark:text-gray-500">
 | 
			
		||||
						Not sure what to add?
 | 
			
		||||
						<a
 | 
			
		||||
							class=" text-gray-300 font-medium underline"
 | 
			
		||||
							href="https://litellm.vercel.app/docs/proxy/configs#quick-start"
 | 
			
		||||
							target="_blank"
 | 
			
		||||
						>
 | 
			
		||||
							Click here for help.
 | 
			
		||||
						</a>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
			</div> -->
 | 
			
		||||
		</div>
 | 
			
		||||
	</div>
 | 
			
		||||
</div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue