update
This commit is contained in:
parent
e595cff31d
commit
c48db62d00
@ -60,10 +60,8 @@ public class BaiduGPTManager {
|
|||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("messages", messages);
|
json.put("messages", messages);
|
||||||
System.out.println("json = " + json);
|
System.out.println("json = " + json);
|
||||||
HashMap<String, String> header = new HashMap<>();
|
String post = HttpTools.post(url + "?access_token=" + getToken()
|
||||||
header.put("Content-Type", "application/json");
|
, json.toJSONString().getBytes(StandardCharsets.UTF_8));
|
||||||
String post = HttpTools.http_post(url + "?access_token=" + getToken()
|
|
||||||
, json.toJSONString().getBytes(StandardCharsets.UTF_8), 5, header);
|
|
||||||
System.out.println("post = " + post);
|
System.out.println("post = " + post);
|
||||||
if (StringUtils.isEmpty(post)) {
|
if (StringUtils.isEmpty(post)) {
|
||||||
clear();
|
clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user