Skip to content

Commit 20a89a0

Browse files
committed
Merge "integration_2026-04-16_1139696595970" into "clawsentry-Java-2026-03-27-online-2552-2026_04_15_14_14_11"
Conflicts: pom.xml volcengine-java-sdk-bom/pom.xml
2 parents 0e4728a + c677ab4 commit 20a89a0

491 files changed

Lines changed: 94148 additions & 5556 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,5 +335,7 @@
335335
<module>volcengine-java-sdk-mem0</module>
336336
<module>volcengine-java-sdk-apmplusserver</module>
337337
<module>volcengine-java-sdk-clawsentry</module>
338+
<module>volcengine-java-sdk-dataleap20260301</module>
339+
<module>volcengine-java-sdk-arkclaw</module>
338340
</modules>
339341
</project>

volcengine-java-sdk-ark-runtime/src/main/java/com/volcengine/ark/runtime/model/PromptTokensDetails.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ public class PromptTokensDetails {
1212
@JsonProperty("provisioned_tokens")
1313
private Integer provisionedTokens;
1414

15+
@JsonProperty("audio_tokens")
16+
private Integer audioTokens;
17+
1518
public Integer getCachedTokens() {
1619
return cachedTokens;
1720
}
@@ -28,11 +31,20 @@ public void setProvisionedTokens(Integer provisionedTokens) {
2831
this.provisionedTokens = provisionedTokens;
2932
}
3033

34+
public Integer getAudioTokens() {
35+
return audioTokens;
36+
}
37+
38+
public void setAudioTokens(Integer audioTokens) {
39+
this.audioTokens = audioTokens;
40+
}
41+
3142
@Override
3243
public String toString() {
3344
return "PromptTokensDetails{" +
3445
"cachedTokens=" + cachedTokens +
3546
", provisionedTokens=" + provisionedTokens +
47+
", audioTokens=" + audioTokens +
3648
'}';
3749
}
3850
}

volcengine-java-sdk-ark-runtime/src/main/java/com/volcengine/ark/runtime/model/completion/chat/ChatCompletionContentPart.java

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public class ChatCompletionContentPart {
1616

1717
ChatCompletionContentPartVideoURL videoUrl;
1818

19+
ChatCompletionContentPartInputAudio inputAudio;
20+
1921
public String getType() {
2022
return type;
2123
}
@@ -56,6 +58,14 @@ public void setVideoUrl(ChatCompletionContentPartVideoURL videoUrl) {
5658
this.videoUrl = videoUrl;
5759
}
5860

61+
public ChatCompletionContentPartInputAudio getInputAudio() {
62+
return inputAudio;
63+
}
64+
65+
public void setInputAudio(ChatCompletionContentPartInputAudio inputAudio) {
66+
this.inputAudio = inputAudio;
67+
}
68+
5969
public static Builder builder() {
6070
return new Builder();
6171
}
@@ -68,6 +78,7 @@ public String toString() {
6878
", text='" + text + '\'' +
6979
", imageUrl=" + imageUrl +
7080
", videoUrl=" + videoUrl +
81+
", inputAudio=" + inputAudio +
7182
'}';
7283
}
7384

@@ -150,12 +161,71 @@ public String toString() {
150161
}
151162
}
152163

164+
public static class ChatCompletionContentPartInputAudio {
165+
String url;
166+
167+
String fileId;
168+
169+
String data;
170+
171+
String format;
172+
173+
public ChatCompletionContentPartInputAudio() {}
174+
175+
public ChatCompletionContentPartInputAudio(String url) {
176+
this.url = url;
177+
}
178+
179+
public String getUrl() {
180+
return url;
181+
}
182+
183+
public void setUrl(String url) {
184+
this.url = url;
185+
}
186+
187+
public String getFileId() {
188+
return fileId;
189+
}
190+
191+
public void setFileId(String fileId) {
192+
this.fileId = fileId;
193+
}
194+
195+
public String getData() {
196+
return data;
197+
}
198+
199+
public void setData(String data) {
200+
this.data = data;
201+
}
202+
203+
public String getFormat() {
204+
return format;
205+
}
206+
207+
public void setFormat(String format) {
208+
this.format = format;
209+
}
210+
211+
@Override
212+
public String toString() {
213+
return "ChatCompletionContentPartInputAudio{" +
214+
"url='" + url + '\'' +
215+
", fileId='" + fileId + '\'' +
216+
", data='" + data + '\'' +
217+
", format='" + format + '\'' +
218+
'}';
219+
}
220+
}
221+
153222
public static final class Builder {
154223
private String type;
155224
private String content;
156225
private String text;
157226
private ChatCompletionContentPartImageURL imageUrl;
158227
private ChatCompletionContentPartVideoURL videoUrl;
228+
private ChatCompletionContentPartInputAudio inputAudio;
159229

160230
public Builder type(String type) {
161231
this.type = type;
@@ -182,13 +252,19 @@ public Builder videoUrl(ChatCompletionContentPartVideoURL videoUrl) {
182252
return this;
183253
}
184254

255+
public Builder inputAudio(ChatCompletionContentPartInputAudio inputAudio) {
256+
this.inputAudio = inputAudio;
257+
return this;
258+
}
259+
185260
public ChatCompletionContentPart build() {
186261
ChatCompletionContentPart chatCompletionContentPart = new ChatCompletionContentPart();
187262
chatCompletionContentPart.setType(type);
188263
chatCompletionContentPart.setContent(content);
189264
chatCompletionContentPart.setText(text);
190265
chatCompletionContentPart.setImageUrl(imageUrl);
191266
chatCompletionContentPart.setVideoUrl(videoUrl);
267+
chatCompletionContentPart.setInputAudio(inputAudio);
192268
return chatCompletionContentPart;
193269
}
194270
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.volcengine.ark.runtime.model.completion.chat;
2+
3+
import com.fasterxml.jackson.annotation.JsonValue;
4+
5+
public enum ChatCompletionContentPartType {
6+
TEXT("text"),
7+
IMAGE_URL("image_url"),
8+
VIDEO_URL("video_url"),
9+
INPUT_AUDIO("input_audio");
10+
11+
@JsonValue
12+
private final String value;
13+
14+
ChatCompletionContentPartType(final String value) {
15+
this.value = value;
16+
}
17+
18+
public String value() {
19+
return value;
20+
}
21+
}

volcengine-java-sdk-ark-runtime/src/main/java/com/volcengine/ark/runtime/model/responses/constant/ResponsesConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public class ResponsesConstants {
4242
public static final String CONTENT_ITEM_TYPE_INPUT_IMAGE = "input_image";
4343
public static final String CONTENT_ITEM_TYPE_INPUT_VIDEO = "input_video";
4444
public static final String CONTENT_ITEM_TYPE_INPUT_FILE = "input_file";
45+
public static final String CONTENT_ITEM_TYPE_INPUT_AUDIO = "input_audio";
4546
public static final String CONTENT_ITEM_TYPE_OUTPUT_TEXT = "output_text";
4647
public static final String CONTENT_ITEM_TYPE_SUMMARY_TEXT = "summary_text";
4748

volcengine-java-sdk-ark-runtime/src/main/java/com/volcengine/ark/runtime/model/responses/content/InputContentItem.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
@JsonSubTypes.Type(value = InputContentItemImage.class, name = ResponsesConstants.CONTENT_ITEM_TYPE_INPUT_IMAGE),
1818
@JsonSubTypes.Type(value = InputContentItemVideo.class, name = ResponsesConstants.CONTENT_ITEM_TYPE_INPUT_VIDEO),
1919
@JsonSubTypes.Type(value = InputContentItemFile.class, name = ResponsesConstants.CONTENT_ITEM_TYPE_INPUT_FILE),
20+
@JsonSubTypes.Type(value = InputContentItemAudio.class, name = ResponsesConstants.CONTENT_ITEM_TYPE_INPUT_AUDIO),
2021
})
2122
public abstract class InputContentItem {
2223
@JsonProperty("type")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
package com.volcengine.ark.runtime.model.responses.content;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
import com.volcengine.ark.runtime.model.responses.constant.ResponsesConstants;
5+
6+
public class InputContentItemAudio extends InputContentItem {
7+
8+
@JsonProperty("audio_url")
9+
private String audioUrl;
10+
11+
@JsonProperty("file_id")
12+
private String fileId;
13+
14+
public InputContentItemAudio() {
15+
super(ResponsesConstants.CONTENT_ITEM_TYPE_INPUT_AUDIO);
16+
}
17+
18+
public String getAudioUrl() {
19+
return audioUrl;
20+
}
21+
22+
public void setAudioUrl(String audioUrl) {
23+
this.audioUrl = audioUrl;
24+
}
25+
26+
public String getFileId() {
27+
return fileId;
28+
}
29+
30+
public void setFileId(String fileId) {
31+
this.fileId = fileId;
32+
}
33+
34+
@Override
35+
public String toString() {
36+
return "InputContentItemAudio{" +
37+
"type='" + getType() + '\'' +
38+
", audioUrl='" + audioUrl + '\'' +
39+
", fileId='" + fileId + '\'' +
40+
'}';
41+
}
42+
43+
public static Builder builder() {
44+
return new Builder();
45+
}
46+
47+
public static class Builder {
48+
private String audioUrl;
49+
private String fileId;
50+
51+
public Builder type(String type) {
52+
return this;
53+
}
54+
55+
public Builder audioUrl(String audioUrl) {
56+
this.audioUrl = audioUrl;
57+
return this;
58+
}
59+
60+
public Builder fileId(String fileId) {
61+
this.fileId = fileId;
62+
return this;
63+
}
64+
65+
public InputContentItemAudio build() {
66+
InputContentItemAudio item = new InputContentItemAudio();
67+
item.setAudioUrl(audioUrl);
68+
item.setFileId(fileId);
69+
return item;
70+
}
71+
}
72+
}

volcengine-java-sdk-ark-runtime/src/main/java/com/volcengine/ark/runtime/model/responses/request/CreateResponsesRequest.java

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ public class CreateResponsesRequest {
7171
@JsonProperty("max_tool_calls")
7272
private Long maxToolCalls;
7373

74+
@JsonProperty("prompt_cache_key")
75+
private String promptCacheKey;
76+
77+
@JsonProperty("safety_identifier")
78+
private String safetyIdentifier;
79+
7480
public ResponsesInput getInput() {
7581
return input;
7682
}
@@ -231,6 +237,22 @@ public void setMaxToolCalls(Long maxToolCalls) {
231237
this.maxToolCalls = maxToolCalls;
232238
}
233239

240+
public String getPromptCacheKey() {
241+
return promptCacheKey;
242+
}
243+
244+
public void setPromptCacheKey(String promptCacheKey) {
245+
this.promptCacheKey = promptCacheKey;
246+
}
247+
248+
public String getSafetyIdentifier() {
249+
return safetyIdentifier;
250+
}
251+
252+
public void setSafetyIdentifier(String safetyIdentifier) {
253+
this.safetyIdentifier = safetyIdentifier;
254+
}
255+
234256
@Override
235257
public String toString() {
236258
return "ResponsesRequest{" +
@@ -254,6 +276,8 @@ public String toString() {
254276
", toolChoice=" + toolChoice +
255277
", parallelToolCalls=" + parallelToolCalls +
256278
", maxToolCalls=" + maxToolCalls +
279+
", promptCacheKey='" + promptCacheKey + '\'' +
280+
", safetyIdentifier='" + safetyIdentifier + '\'' +
257281
'}';
258282
}
259283

@@ -282,6 +306,8 @@ public static class Builder {
282306
private ResponsesToolChoice toolChoice;
283307
private Boolean parallelToolCalls;
284308
private Long maxToolCalls;
309+
private String promptCacheKey;
310+
private String safetyIdentifier;
285311

286312
public Builder input(ResponsesInput input) {
287313
this.input = input;
@@ -383,6 +409,16 @@ public Builder maxToolCalls(Long maxToolCalls) {
383409
return this;
384410
}
385411

412+
public Builder promptCacheKey(String promptCacheKey) {
413+
this.promptCacheKey = promptCacheKey;
414+
return this;
415+
}
416+
417+
public Builder safetyIdentifier(String safetyIdentifier) {
418+
this.safetyIdentifier = safetyIdentifier;
419+
return this;
420+
}
421+
386422
public CreateResponsesRequest build() {
387423
CreateResponsesRequest responsesRequest = new CreateResponsesRequest();
388424
responsesRequest.setInput(input);
@@ -405,6 +441,8 @@ public CreateResponsesRequest build() {
405441
responsesRequest.setToolChoice(toolChoice);
406442
responsesRequest.setParallelToolCalls(parallelToolCalls);
407443
responsesRequest.setMaxToolCalls(maxToolCalls);
444+
responsesRequest.setPromptCacheKey(promptCacheKey);
445+
responsesRequest.setSafetyIdentifier(safetyIdentifier);
408446
return responsesRequest;
409447
}
410448
}

0 commit comments

Comments
 (0)