MCPcopy Create free account
hub / github.com/dashscope/dashscope-sdk-java / BaiChuanUsage

Class BaiChuanUsage

samples/BaiChuanUsage.java:12–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11
12public 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected