From c48db62d00829a1313ea57fef55c3054e41704b8 Mon Sep 17 00:00:00 2001 From: yutou <583819556@qq.com> Date: Wed, 13 Sep 2023 15:30:46 +0800 Subject: [PATCH] update --- src/main/java/com/yutou/qqbot/utlis/BaiduGPTManager.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/yutou/qqbot/utlis/BaiduGPTManager.java b/src/main/java/com/yutou/qqbot/utlis/BaiduGPTManager.java index 7abafee..faa3513 100644 --- a/src/main/java/com/yutou/qqbot/utlis/BaiduGPTManager.java +++ b/src/main/java/com/yutou/qqbot/utlis/BaiduGPTManager.java @@ -60,10 +60,8 @@ public class BaiduGPTManager { JSONObject json = new JSONObject(); json.put("messages", messages); System.out.println("json = " + json); - HashMap 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();