()
| 10 | |
| 11 | public class ChatGLMUsage { |
| 12 | public static void usage() throws NoApiKeyException, ApiException, InputRequiredException { |
| 13 | GeneralHalfDuplexApi gen = new GeneralHalfDuplexApi(); |
| 14 | ChatGLMParam param = |
| 15 | ChatGLMParam.builder() |
| 16 | .model("chatglm-6b-v2") |
| 17 | .prompt("介绍下杭州") |
| 18 | .history(Arrays.asList()) |
| 19 | .build(); |
| 20 | DashScopeResult result = gen.call(param); |
| 21 | System.out.println(JsonUtils.toJson(result)); |
| 22 | } |
| 23 | |
| 24 | public static void main(String[] args) { |
| 25 | try { |