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

Method userTextItem

samples/QwenLiveUsage.java:207–218  ·  view source on GitHub ↗
(String text)

Source from the content-addressed store, hash-verified

205 }
206
207 private static JsonObject userTextItem(String text) {
208 JsonObject part = new JsonObject();
209 part.addProperty(FIELD_TYPE, "input_text");
210 part.addProperty("text", text);
211 JsonArray content = new JsonArray();
212 content.add(part);
213 JsonObject item = new JsonObject();
214 item.addProperty(FIELD_TYPE, "message");
215 item.addProperty("role", "user");
216 item.add(FIELD_CONTENT, content);
217 return item;
218 }
219
220 private static boolean hasWavHeader(Path pcm) throws Exception {
221 byte[] magic = new byte[4];

Callers 1

mainMethod · 0.95

Calls 1

addMethod · 0.80

Tested by

no test coverage detected