feat: feature/1.5-Data Integration

This commit is contained in:
ningyv
2025-02-15 18:50:38 +08:00
parent 5286b90b27
commit 1127df66f7
2 changed files with 9 additions and 2 deletions
@@ -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))
}