mirror of
https://gitee.com/dromara/hutool.git
synced 2025-06-28 13:34:09 +08:00
Merge branch 'v5-dev' of gitee.com:dromara/hutool into v5-dev
This commit is contained in:
commit
0426686dcb
@ -18,7 +18,7 @@ package cn.hutool.ai.core;
|
||||
|
||||
import cn.hutool.ai.AIException;
|
||||
import cn.hutool.http.*;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
@ -133,7 +133,7 @@ public class BaseAIService {
|
||||
connection.setConnectTimeout(180000);
|
||||
// 发送请求体
|
||||
try (OutputStream os = connection.getOutputStream()) {
|
||||
String jsonInputString = new ObjectMapper().writeValueAsString(paramMap);
|
||||
String jsonInputString = JSONUtil.toJsonStr(paramMap);
|
||||
os.write(jsonInputString.getBytes());
|
||||
os.flush();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user