mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
(UI) Refactor Add Models for Specific Teams (#8592)
* ui - use common team dropdown component * re-use team component * rename org field on add model * handle add model submit * working view model_id and team_id on root models page * cleaner * show all fields * working model info view * working team info selector * clean up team id * new component for model dashboard * ui show table with dropdown * make public model names like email * revert changes to litellm model name * fix litellm model name * ui fix public model * fix mappings * fix conditional text input * fix message * ui fix bulk add models
This commit is contained in:
parent
e5c7a9ea08
commit
6d8138875f
6 changed files with 246 additions and 149 deletions
|
@ -92,7 +92,6 @@ export const modelCostMap = async (
|
|||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
export const modelCreateCall = async (
|
||||
accessToken: string,
|
||||
formValues: Model
|
||||
|
@ -106,7 +105,7 @@ export const modelCreateCall = async (
|
|||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
...formValues, // Include formValues in the request body
|
||||
...formValues,
|
||||
}),
|
||||
});
|
||||
|
||||
|
@ -121,9 +120,13 @@ export const modelCreateCall = async (
|
|||
|
||||
const data = await response.json();
|
||||
console.log("API Response:", data);
|
||||
message.success(
|
||||
"Model created successfully"
|
||||
);
|
||||
|
||||
// Close any existing messages before showing new ones
|
||||
message.destroy();
|
||||
|
||||
// Sequential success messages
|
||||
message.success(`Model ${formValues.model_name} created successfully`, 2);
|
||||
|
||||
return data;
|
||||
} catch (error) {
|
||||
console.error("Failed to create key:", error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue