修改
This commit is contained in:
parent
8b4a56488f
commit
53305996f6
@ -93,7 +93,7 @@ public class TrainHttpService {
|
||||
*/
|
||||
public String modelsList(String modelName){
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
login(headers);
|
||||
// login(headers);
|
||||
String modelsList = llmBackendProperties.getModelsList();
|
||||
String res = HttpUtils.get(modelsList + "?modelName=" + modelName, headers);
|
||||
return res;
|
||||
@ -150,7 +150,7 @@ public class TrainHttpService {
|
||||
* 创建微调任务 POST
|
||||
*/
|
||||
public AigcFineTuningCreateRespVO finetuningCreate(Map<String, String> headers,String url, AigcFineTuningCreateReqVO req){
|
||||
login(headers);
|
||||
// login(headers);
|
||||
// TODO: 在上个方法中已经将数据集的文件id赋予,调试时需要写死再放开
|
||||
// String fileId = "6237ed4d-a046-479c-80d6-8579a0283994";
|
||||
// req.setFileId(fileId);
|
||||
@ -243,7 +243,7 @@ public class TrainHttpService {
|
||||
}
|
||||
|
||||
public ModelDeployRespVO modelDeploy(Map<String, String> headers,String url,AigcModelDeploySaveReq req){
|
||||
login(headers);
|
||||
// login(headers);
|
||||
String modelDeploy = llmBackendProperties.getModelDeploy();
|
||||
log.info(" modelDeploy request:{}", JSON.toJSONString(req));
|
||||
String res = HttpUtils.post(url+modelDeploy, headers, JSON.toJSONString(req));
|
||||
@ -261,7 +261,7 @@ public class TrainHttpService {
|
||||
return modelDeployRespVO;
|
||||
}
|
||||
public AigcModelDeployVO modelUndeploy(Map<String, String> headers,String url, Long deployId) {
|
||||
login(headers);
|
||||
// login(headers);
|
||||
String modelDeploy = llmBackendProperties.getModelUndeploy();
|
||||
String res = HttpUtils.post(url+modelDeploy + deployId, headers,"");
|
||||
log.info(" modelDeploy:{}", res);
|
||||
@ -274,7 +274,7 @@ public class TrainHttpService {
|
||||
* 模型服务创建
|
||||
*/
|
||||
public AigcModelCreateRespVO modelCreate(Map<String, String> headers, AIgcModelCreateSaveReq req) {
|
||||
login(headers);
|
||||
// login(headers);
|
||||
String modelDeploy = llmBackendProperties.getModelCreate();
|
||||
String res = HttpUtils.post(modelDeploy, headers, JSON.toJSONString(req));
|
||||
log.info(" modelDeploy:{}", res);
|
||||
@ -299,7 +299,7 @@ public class TrainHttpService {
|
||||
*/
|
||||
public AigcDatasetFileRespV0 AigcUploadFile(Map<String, String> headers, String url,InputStream inputStream, String fileName) throws UnirestException, IOException {
|
||||
String aigcFileUpload = llmBackendProperties.getAigcFileUpload();
|
||||
login(headers);
|
||||
// login(headers);
|
||||
headers.remove("Content-Type");
|
||||
try {
|
||||
// 上传文件
|
||||
@ -323,7 +323,7 @@ public class TrainHttpService {
|
||||
|
||||
|
||||
public AigcRespVO finetuningCancle(Map<String, String> headers, String jobId) {
|
||||
login(headers);
|
||||
// login(headers);
|
||||
String finetuningCancel = llmBackendProperties.getFinetuningCancel();
|
||||
String url = String.format(finetuningCancel,jobId);
|
||||
String res = HttpUtils.del(url, headers);
|
||||
|
Loading…
x
Reference in New Issue
Block a user