|
@@ -81,10 +81,10 @@ public class BaiduChatUtils {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void sendBaiduAiStream() throws IOException {
|
|
public void sendBaiduAiStream() throws IOException {
|
|
|
- URL url = null;
|
|
|
|
|
try {
|
|
try {
|
|
|
- url = new URL("https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions?access_token=xxx");
|
|
|
|
|
- HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
|
|
|
|
|
|
+ String baidu_url=BAIDU_CHAT_WXYY_URL+getRedisBaiduAccessToken();
|
|
|
|
|
+ URL url = new URL(baidu_url);
|
|
|
|
|
+ HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
|
|
connection.setRequestMethod("POST");
|
|
connection.setRequestMethod("POST");
|
|
|
connection.setRequestProperty("Content-Type", "application/json");
|
|
connection.setRequestProperty("Content-Type", "application/json");
|
|
|
connection.setDoInput(true);
|
|
connection.setDoInput(true);
|