mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
feat: feature/1.5-Data Integration
This commit is contained in:
@@ -57,9 +57,12 @@ const LocalAiDeploy = forwardRef<LocalAiDeployHandle, any>((props: any, ref: any
|
||||
* @returns
|
||||
*/
|
||||
const deployPopularModel = async (id: string) => {
|
||||
await deployLocalModel({
|
||||
const response = await deployLocalModel({
|
||||
modelID: id
|
||||
})
|
||||
if (response.code !== STATUS_CODE.SUCCESS) {
|
||||
return
|
||||
}
|
||||
onClose?.()
|
||||
}
|
||||
|
||||
@@ -84,10 +87,13 @@ const LocalAiDeploy = forwardRef<LocalAiDeployHandle, any>((props: any, ref: any
|
||||
form
|
||||
.validateFields()
|
||||
.then(async (value) => {
|
||||
await deployLocalModel({
|
||||
const response = await deployLocalModel({
|
||||
modelID: value.model,
|
||||
team: value.team
|
||||
})
|
||||
if (response.code !== STATUS_CODE.SUCCESS) {
|
||||
return
|
||||
}
|
||||
resolve(true)
|
||||
})
|
||||
.catch((errorInfo) => reject(errorInfo))
|
||||
|
||||
@@ -23,6 +23,7 @@ const useDeployLocalModel = () => {
|
||||
const { code, msg } = response
|
||||
if (code === STATUS_CODE.SUCCESS) {
|
||||
message.success(msg || $t(RESPONSE_TIPS.success))
|
||||
return response
|
||||
} else {
|
||||
message.error(msg || $t(RESPONSE_TIPS.error))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user