forked from phoenix/litellm-mirror
(ui) add all_models
This commit is contained in:
parent
30a4f224ee
commit
ba56e988f5
1 changed files with 13 additions and 9 deletions
|
@ -91,18 +91,19 @@ const CreateKey: React.FC<CreateKeyProps> = ({
|
|||
}
|
||||
};
|
||||
|
||||
const sendSlackAlert = async () => {
|
||||
try {
|
||||
console.log("Sending Slack alert...");
|
||||
const response = await slackBudgetAlertsHealthCheck(accessToken);
|
||||
console.log("slackBudgetAlertsHealthCheck Response:", response);
|
||||
console.log("Testing Slack alert successful");
|
||||
} catch (error) {
|
||||
console.error("Error sending Slack alert:", error);
|
||||
|
||||
const handleModelSelection = (selectedModels: string[]) => {
|
||||
if (selectedModels.includes("all_models")) {
|
||||
// Select all models except "All Models"
|
||||
const allModelsExceptAll = team ? team.models : userModels;
|
||||
form.setFieldsValue({
|
||||
models: allModelsExceptAll
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
const handleCopy = () => {
|
||||
message.success('API Key copied to clipboard');
|
||||
};
|
||||
|
@ -153,8 +154,11 @@ const CreateKey: React.FC<CreateKeyProps> = ({
|
|||
mode="multiple"
|
||||
placeholder="Select models"
|
||||
style={{ width: "100%" }}
|
||||
onChange={(selectedModels) => handleModelSelection(selectedModels)}
|
||||
>
|
||||
|
||||
<Option key="all_models" value="all_models">
|
||||
All Models
|
||||
</Option>
|
||||
{team && team.models ? (
|
||||
team.models.map((model: string) => (
|
||||
<Option key={model} value={model}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue