xf 翻译

This commit is contained in:
ran.shang
2025-06-24 16:24:57 +08:00
parent 2649ec853f
commit 6def8d1023
8 changed files with 304 additions and 3 deletions

View File

@@ -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();
}
}