mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
fix(ui): show human labels on playground virtual key source select
Base UI SelectValue renders the raw value unless children supply the label, so map session/custom to Current UI Session and Virtual Key
This commit is contained in:
parent
65203b2920
commit
7ff6f26b93
1 changed files with 6 additions and 3 deletions
|
|
@ -857,7 +857,7 @@ const ChatUI: React.FC<ChatUIProps> = ({
|
|||
|
||||
const requestProxyBaseUrl =
|
||||
simplified && proxySettings
|
||||
? proxySettings.LITELLM_UI_API_DOC_BASE_URL ?? proxySettings.PROXY_BASE_URL ?? undefined
|
||||
? (proxySettings.LITELLM_UI_API_DOC_BASE_URL ?? proxySettings.PROXY_BASE_URL ?? undefined)
|
||||
: customProxyBaseUrl || undefined;
|
||||
await makeOpenAIChatCompletionRequest(
|
||||
apiChatHistory,
|
||||
|
|
@ -1205,7 +1205,7 @@ const ChatUI: React.FC<ChatUIProps> = ({
|
|||
}}
|
||||
>
|
||||
<SelectTrigger className="w-full" size="sm" aria-label="Virtual Key Source">
|
||||
<SelectValue />
|
||||
<SelectValue>{apiKeySource === "custom" ? "Virtual Key" : "Current UI Session"}</SelectValue>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="session">Current UI Session</SelectItem>
|
||||
|
|
@ -1331,7 +1331,10 @@ const ChatUI: React.FC<ChatUIProps> = ({
|
|||
}}
|
||||
>
|
||||
<SelectTrigger className="w-full" size="sm" aria-label="Voice">
|
||||
<SelectValue />
|
||||
<SelectValue>
|
||||
{OPEN_AI_VOICE_SELECT_OPTIONS.find((voice) => voice.value === selectedVoice)?.label ??
|
||||
selectedVoice}
|
||||
</SelectValue>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{OPEN_AI_VOICE_SELECT_OPTIONS.map((voice) => (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue