GPT代码修改调用接口方法

This commit is contained in:
zhaol 2025-01-10 11:38:53 +08:00
parent a9d5c29b81
commit 892c5743fa
3 changed files with 5 additions and 6 deletions

View File

@ -567,7 +567,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
model.getWsId(), rowMap.getString("TASKID"), filename + "_" + lever + ".doc");
System.out.println("dcContext=========" + dcContext.getDownloadURL());
String filepath = dcContext.getFilePath();
String finalFilePath = filepath.replace("bin\\..\\", "");

View File

@ -19,6 +19,7 @@ public class UploadGptFileUtils {
String requestCode = "bbc058b3f3132b742089998684a91767"; // Replace with your requestCode
String filePath = "C:\\Users\\admin\\Desktop\\伊利项目\\伊利集团数据管理办法 (2).docx"; // Replace with your file path*/
String result = "";
String boundary = "----WebKitFormBoundary" + System.currentTimeMillis();
HttpURLConnection connection = (HttpURLConnection) new URL(targetUrl).openConnection();
connection.setRequestMethod("POST");
@ -60,13 +61,12 @@ public class UploadGptFileUtils {
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line=null;
String line;
StringBuilder response = new StringBuilder();
while ((line = reader.readLine()) != null) {
System.out.println(line);
result = result + line;
}
return line;
return result;
}
}