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

Method getHttpBody

examples/legacy_2x/ChatGLMParam.java:50–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48 }
49
50 @Override
51 public JsonObject getHttpBody() {
52 JsonObject requestObject = new JsonObject();
53 requestObject.addProperty(ApiKeywords.MODEL, getModel());
54 requestObject.add(ApiKeywords.INPUT, getInput());
55 Map<String, Object> params = getParameters();
56 if (params != null && !params.isEmpty()) {
57 requestObject.add(ApiKeywords.PARAMETERS, JsonUtils.parametersToJsonObject(params));
58 }
59 return requestObject;
60 }
61
62 @Override
63 public void validate() throws InputRequiredException {}

Callers 1

streamCallMethod · 0.45

Calls 6

getInputMethod · 0.95
isEmptyMethod · 0.80
getModelMethod · 0.45
addMethod · 0.45
getParametersMethod · 0.45

Tested by

no test coverage detected