Allow deleting onnx models in model manager ui

This commit is contained in:
Brandon Rising
2023-07-27 09:50:20 -04:00
parent 024f92f9a9
commit 4ebde013ea
6 changed files with 10 additions and 8 deletions

View File

@ -14,6 +14,7 @@ import {
MergeModelConfig,
TextualInversionModelConfig,
VaeModelConfig,
ModelType,
} from 'services/api/types';
import queryString from 'query-string';
@ -62,6 +63,7 @@ type UpdateMainModelResponse =
type DeleteMainModelArg = {
base_model: BaseModelType;
model_name: string;
model_type: ModelType;
};
type DeleteMainModelResponse = void;
@ -287,9 +289,9 @@ export const modelsApi = api.injectEndpoints({
DeleteMainModelResponse,
DeleteMainModelArg
>({
query: ({ base_model, model_name }) => {
query: ({ base_model, model_name, model_type }) => {
return {
url: `models/${base_model}/main/${model_name}`,
url: `models/${base_model}/${model_type}/${model_name}`,
method: 'DELETE',
};
},