|
14 | 14 | from common.auth import TokenAuth
|
15 | 15 | from common.auth.authentication import has_permissions
|
16 | 16 | from common.constants.permission_constants import PermissionConstants
|
17 |
| -from common.result import result |
| 17 | +from common.result import result, DefaultResultSerializer |
18 | 18 | from common.utils.common import query_params_to_single_dict
|
19 |
| -from models_provider.api.model import ModelCreateAPI, GetModelApi, ModelEditApi, ModelListResponse |
| 19 | +from models_provider.api.model import ModelCreateAPI, GetModelApi, ModelEditApi, ModelListResponse, DefaultModelResponse |
20 | 20 | from models_provider.api.provide import ProvideApi
|
21 | 21 | from models_provider.serializers.model_serializer import ModelSerializer
|
22 | 22 |
|
@@ -82,6 +82,7 @@ def put(self, request: Request, workspace_id, model_id: str):
|
82 | 82 | description=_('Delete model'),
|
83 | 83 | operation_id=_('Delete model'),
|
84 | 84 | parameters=GetModelApi.get_query_params_api(),
|
| 85 | + responses=DefaultModelResponse.get_response(), |
85 | 86 | tags=[_('Model')])
|
86 | 87 | @has_permissions(PermissionConstants.MODEL_DELETE.get_workspace_permission())
|
87 | 88 | def delete(self, request: Request, workspace_id: str, model_id: str):
|
@@ -147,6 +148,7 @@ class PauseDownload(APIView):
|
147 | 148 | description=_('Pause model download'),
|
148 | 149 | operation_id=_('Pause model download'),
|
149 | 150 | parameters=GetModelApi.get_query_params_api(),
|
| 151 | + responses=DefaultModelResponse.get_response(), |
150 | 152 | tags=[_('Model')])
|
151 | 153 | @has_permissions(PermissionConstants.MODEL_CREATE.get_workspace_permission())
|
152 | 154 | def put(self, request: Request, workspace_id: str, model_id: str):
|
|
0 commit comments