| 10 | |
| 11 | |
| 12 | public class BaiChuanUsage{ |
| 13 | public static void usage() |
| 14 | throws NoApiKeyException, ApiException, InputRequiredException { |
| 15 | Generation gen = new Generation(); |
| 16 | GenerationParam param = GenerationParam |
| 17 | .builder() |
| 18 | .model("baichuan-7b-v1") |
| 19 | .prompt("介绍下杭州") |
| 20 | .build(); |
| 21 | GenerationResult result = gen.call(param); |
| 22 | System.out.println(JsonUtils.toJson(result)); |
| 23 | } |
| 24 | |
| 25 | public static void main(String[] args){ |
| 26 | try { |
| 27 | usage(); |
| 28 | } catch (ApiException | NoApiKeyException | InputRequiredException e) { |
| 29 | System.out.println(e.getMessage()); |
| 30 | } |
| 31 | System.exit(0); |
| 32 | } |
| 33 | } |
nothing calls this directly
no outgoing calls
no test coverage detected