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

Method flowCall

samples/ApplicationCalls.java:99–112  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

callMethod · 0.95
builderMethod · 0.80
buildMethod · 0.65

Tested by

no test coverage detected