feat: 节点设置模块初步完成对接
parent
cd816525b7
commit
7a37d4db6e
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* @Author: donghao donghao@supervision.ltd
|
||||
* @Date: 2024-05-24 17:57:19
|
||||
* @LastEditors: donghao donghao@supervision.ltd
|
||||
* @LastEditTime: 2024-05-30 14:14:24
|
||||
* @FilePath: \general-ai-platform-web\src\services\business\file.ts
|
||||
* @Description: api 文件
|
||||
*/
|
||||
// @ts-ignore
|
||||
/* eslint-disable */
|
||||
import { request } from '@umijs/max';
|
||||
|
||||
/** 文件存储 */
|
||||
// 上传文件
|
||||
export async function apiFileUpload(body: any, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||
`/api/v1/file/upload`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
// 上传文件
|
||||
export async function apiFileDelete(body: any, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||
`/api/v1/file/delete`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
/*
|
||||
* @Author: donghao donghao@supervision.ltd
|
||||
* @Date: 2024-05-24 17:57:19
|
||||
* @LastEditors: donghao donghao@supervision.ltd
|
||||
* @LastEditTime: 2024-05-30 14:58:40
|
||||
* @FilePath: \general-ai-platform-web\src\services\business\model.ts
|
||||
* @Description: api 模型
|
||||
*/
|
||||
|
||||
// @ts-ignore
|
||||
/* eslint-disable */
|
||||
import { request } from '@umijs/max';
|
||||
|
||||
/** 企业业务模型部署 */
|
||||
// 添加企业部署的业务模型
|
||||
export async function apiModelDeploymentAdd(body: any, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||
`/api/v1/model/deployment/add`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
// 编辑企业部署的业务模型
|
||||
export async function apiModelDeploymentEdit(body: any, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||
`/api/v1/model/deployment/edit`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
// 企业部署的业务模型列表
|
||||
export async function apiModelDeploymentList(body: any, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||
`/api/v1/model/deployment/list`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
// // 删除企业部署的业务模型
|
||||
// export async function apiModelDeploymentDelete(body: any, options?: { [key: string]: any }) {
|
||||
// return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||
// `/api/v1/model/deployment/delete`,
|
||||
// {
|
||||
// method: 'POST',
|
||||
// headers: {
|
||||
// // 'Content-Type': 'application/json',
|
||||
// // "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
// },
|
||||
// data: body,
|
||||
// ...(options || {}),
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
|
||||
// 企业部署的业务模型信息
|
||||
export async function apiModelDeploymentInfo(body: any, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||
`/api/v1/model/deployment/info`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue