Skip to content
Snippets Groups Projects
Commit 7edad891 authored by ali asaria's avatar ali asaria
Browse files

Use delete models endpoint

parent e575abfa
No related branches found
No related tags found
No related merge requests found
......@@ -317,8 +317,19 @@ export default function LocalModels({
 
<Trash2Icon
color="var(--joy-palette-danger-600)"
onClick={() => {
mutate();
onClick={async () => {
if (
confirm(
"Are you sure you want to delete model '" +
row.model_id +
"'?"
)
) {
await fetch(
chatAPI.Endpoints.Models.Delete(row.model_id)
);
mutate();
}
}}
/>
</>
......
......@@ -436,6 +436,7 @@ Endpoints.Models = {
ModelDetailsFromGallery: (modelId: string) =>
API_URL() + 'model/gallery/' + convertSlashInUrl(modelId),
HuggingFaceLogin: () => API_URL() + 'model/login_to_huggingface',
Delete: (modelId: string) => API_URL() + 'model/delete?model_id=' + modelId,
};
Endpoints.Plugins = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment