取消英文字母的正则匹配

This commit is contained in:
2024-07-24 09:44:32 +08:00
parent 9a2d58d922
commit 77a4aee88e

View File

@@ -3302,10 +3302,6 @@ public class PythonService {
} }
public String promptTranslate(String text) throws BusinessException { public String promptTranslate(String text) throws BusinessException {
if (text.matches("^[a-zA-Z\\s,.!?'-]+$")){
return text;
}
OkHttpClient client = new OkHttpClient().newBuilder() OkHttpClient client = new OkHttpClient().newBuilder()
.connectTimeout(30, TimeUnit.SECONDS) .connectTimeout(30, TimeUnit.SECONDS)
.pingInterval(5, TimeUnit.SECONDS)//websocket轮训间隔(单位:秒) .pingInterval(5, TimeUnit.SECONDS)//websocket轮训间隔(单位:秒)