|
|
@@ -39,6 +39,7 @@ public class BaiduChatUtils {
|
|
|
private static final String BAIDU_CHAT_ERNIE_LITE_URL="https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant?access_token=";
|
|
|
/*ERNIE_BOT_4*/
|
|
|
private static final String ERNIE_BOT_4="https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions_pro?access_token=";
|
|
|
+ private static final String ERNIE_SPEED_128K="https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-speed-128k?access_token=";
|
|
|
/*accessToken获取地址*/
|
|
|
private static final String BAIDU_ACCESSTOKEN_URL="https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&";
|
|
|
|
|
|
@@ -58,6 +59,11 @@ public class BaiduChatUtils {
|
|
|
LoggerUtils.debug(getClass(),"ERNIE_BOT_4");
|
|
|
sendStream(inputSendChat,ERNIE_BOT_4);
|
|
|
}
|
|
|
+ @Async
|
|
|
+ public void sendErnieSpeed128K(InputSendChat inputSendChat) throws IOException {
|
|
|
+ LoggerUtils.debug(getClass(),"ERNIE_SPEED_128K");
|
|
|
+ sendStream(inputSendChat,ERNIE_SPEED_128K);
|
|
|
+ }
|
|
|
|
|
|
@Async
|
|
|
public void sendStream(InputSendChat inputSendChat,String httpUrl) throws IOException {
|