This commit is contained in:
yutou 2023-09-13 15:30:46 +08:00
parent e595cff31d
commit c48db62d00

View File

@ -60,10 +60,8 @@ public class BaiduGPTManager {
JSONObject json = new JSONObject();
json.put("messages", messages);
System.out.println("json = " + json);
HashMap<String, String> header = new HashMap<>();
header.put("Content-Type", "application/json");
String post = HttpTools.http_post(url + "?access_token=" + getToken()
, json.toJSONString().getBytes(StandardCharsets.UTF_8), 5, header);
String post = HttpTools.post(url + "?access_token=" + getToken()
, json.toJSONString().getBytes(StandardCharsets.UTF_8));
System.out.println("post = " + post);
if (StringUtils.isEmpty(post)) {
clear();