Plugin and flow application call sample @throws NoApiKeyException Can not find api key @throws ApiException The request failed, possibly due to a network or data error. @throws InputRequiredException Missing inputs.
()
| 97 | * @throws InputRequiredException Missing inputs. |
| 98 | */ |
| 99 | public static void flowCall() |
| 100 | throws ApiException, NoApiKeyException, InputRequiredException { |
| 101 | ApplicationParam param = ApplicationParam.builder() |
| 102 | .appId(APP_ID) |
| 103 | .prompt("杭州的天气怎么样") |
| 104 | .topP(0.2) |
| 105 | .build(); |
| 106 | |
| 107 | Application application = new Application(); |
| 108 | ApplicationResult result = application.call(param); |
| 109 | |
| 110 | System.out.printf("requestId: %s, text: %s, finishReason: %s\n", |
| 111 | result.getRequestId(), result.getOutput().getText(), result.getOutput().getFinishReason()); |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * Plugin and flow application call with biz params sample |