xf 翻译
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.newyetai.sdk.xf.util;
|
||||
|
||||
import com.newyetai.sdk.xf.model.TranslateReq;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -229,4 +230,16 @@ public class XfUtils {
|
||||
return result.getData();
|
||||
}
|
||||
|
||||
public static String chat(ChatReq req) {
|
||||
AlitaResult<String> result = XfSparkProvider.httpChat(req);
|
||||
Assert.isTrue(result.getSuccess(), result.getMsg());
|
||||
return result.getData();
|
||||
}
|
||||
|
||||
public static String translate(TranslateReq req) {
|
||||
AlitaResult<String> result = XfSparkProvider.translate(req);
|
||||
Assert.isTrue(result.getSuccess(), result.getMsg());
|
||||
return result.getData();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user