refactor: model
This commit is contained in:
parent
d05d82106e
commit
40df595173
@ -28,7 +28,7 @@ class ModelApply(APIView):
|
|||||||
responses=DefaultModelResponse.get_response(),
|
responses=DefaultModelResponse.get_response(),
|
||||||
tags=[_('Model')] # type: ignore
|
tags=[_('Model')] # type: ignore
|
||||||
)
|
)
|
||||||
def post(self, request: Request, workspace_id, model_id):
|
def post(self, request: Request, model_id):
|
||||||
return result.success(
|
return result.success(
|
||||||
ModelApplySerializers(data={'model_id': model_id}).embed_documents(request.data))
|
ModelApplySerializers(data={'model_id': model_id}).embed_documents(request.data))
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ class ModelApply(APIView):
|
|||||||
responses=DefaultModelResponse.get_response(),
|
responses=DefaultModelResponse.get_response(),
|
||||||
tags=[_('Model')] # type: ignore
|
tags=[_('Model')] # type: ignore
|
||||||
)
|
)
|
||||||
def post(self, request: Request, workspace_id, model_id):
|
def post(self, request: Request, model_id):
|
||||||
return result.success(
|
return result.success(
|
||||||
ModelApplySerializers(data={'model_id': model_id}).embed_query(request.data))
|
ModelApplySerializers(data={'model_id': model_id}).embed_query(request.data))
|
||||||
|
|
||||||
@ -52,6 +52,6 @@ class ModelApply(APIView):
|
|||||||
responses=DefaultModelResponse.get_response(),
|
responses=DefaultModelResponse.get_response(),
|
||||||
tags=[_('Model')] # type: ignore
|
tags=[_('Model')] # type: ignore
|
||||||
)
|
)
|
||||||
def post(self, request: Request, workspace_id, model_id):
|
def post(self, request: Request, model_id):
|
||||||
return result.success(
|
return result.success(
|
||||||
ModelApplySerializers(data={'model_id': model_id}).compress_documents(request.data))
|
ModelApplySerializers(data={'model_id': model_id}).compress_documents(request.data))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user