()
| 10 | |
| 11 | public class YuanyuUsage { |
| 12 | public static void usage() throws NoApiKeyException, ApiException, InputRequiredException { |
| 13 | Generation gen = new Generation(); |
| 14 | String prompt = "翻译成英文:春天来了,花朵都开了。"; |
| 15 | GenerationParam param = |
| 16 | GenerationParam.builder().model("chatyuan-large-v2").prompt(prompt).build(); |
| 17 | GenerationResult result = gen.call(param); |
| 18 | System.out.println(JsonUtils.toJson(result)); |
| 19 | } |
| 20 | |
| 21 | public static void main(String[] args) { |
| 22 | try { |