ui neatly show all proxy models

This commit is contained in:
Ishaan Jaff 2024-04-02 17:38:10 -07:00
parent 6e3ec361ae
commit df043eb1fb

View file

@ -146,11 +146,21 @@ const CreateKey: React.FC<CreateKeyProps> = ({
All Team Models All Team Models
</Option> </Option>
{team && team.models ? ( {team && team.models ? (
team.models.includes("all-proxy-models") ? (
userModels.map((model: string) => (
(
<Option key={model} value={model}>
{model}
</Option>
)
))
) : (
team.models.map((model: string) => ( team.models.map((model: string) => (
<Option key={model} value={model}> <Option key={model} value={model}>
{model} {model}
</Option> </Option>
)) ))
)
) : ( ) : (
userModels.map((model: string) => ( userModels.map((model: string) => (
<Option key={model} value={model}> <Option key={model} value={model}>
@ -159,7 +169,6 @@ const CreateKey: React.FC<CreateKeyProps> = ({
)) ))
)} )}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item