Skip to content

Commit 02f6518

Browse files
Wang Zesongwgzesg-bd
authored andcommitted
Add generated files for attempt 1
1 parent f16529f commit 02f6518

16 files changed

+1607
-1
lines changed

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

Lines changed: 456 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public class ResponsesConstants {
7575
public static final String TOOL_TYPE_WEB_SEARCH = "web_search";
7676
public static final String TOOL_TYPE_IMAGE_PROCESS = "image_process";
7777
public static final String TOOL_TYPE_MCP = "mcp";
78+
public static final String TOOL_TYPE_DOUBAO_APP = "doubao_app";
7879

7980
// UserLocationType.Enum
8081
public static final String USER_LOCATION_TYPE_APPROXIMATE = "approximate";
@@ -136,6 +137,23 @@ public class ResponsesConstants {
136137
public static final String EVENT_TYPE_RESPONSE_MCP_CALL_COMPLETED = "response.mcp_call.completed";
137138
public static final String EVENT_TYPE_RESPONSE_MCP_CALL_FAILED = "response.mcp_call.failed";
138139

140+
// Doubao app events
141+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_IN_PROGRESS = "response.doubao_app_call.in_progress";
142+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_COMPLETED = "response.doubao_app_call.completed";
143+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_FAILED = "response.doubao_app_call.failed";
144+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_OUTPUT_TEXT_DELTA = "response.doubao_app_call.output_text.delta";
145+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_OUTPUT_TEXT_DONE = "response.doubao_app_call.output_text.done";
146+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_SEARCH_IN_PROGRESS = "response.doubao_app_call.search.in_progress";
147+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_SEARCH_SEARCHING = "response.doubao_app_call.search.searching";
148+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_SEARCH_COMPLETED = "response.doubao_app_call.search.completed";
149+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_REASONING_TEXT_DELTA = "response.doubao_app_call.reasoning_text.delta";
150+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_REASONING_TEXT_DONE = "response.doubao_app_call.reasoning_text.done";
151+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_REASONING_SEARCH_IN_PROGRESS = "response.doubao_app_call.reasoning_search.in_progress";
152+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_REASONING_SEARCH_SEARCHING = "response.doubao_app_call.reasoning_search.searching";
153+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_REASONING_SEARCH_COMPLETED = "response.doubao_app_call.reasoning_search.completed";
154+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_BLOCK_ADDED = "response.doubao_app_call.block.added";
155+
public static final String EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_BLOCK_DONE = "response.doubao_app_call.block.done";
156+
139157
// IncludeType.Enum
140158
public static final String INCLUDE_TYPE_IMAGE_URL = "message.input_image.image_url";
141159

@@ -147,6 +165,17 @@ public class ResponsesConstants {
147165
public static final String MCP_APPROVAL_MODE_ALWAYS = "always";
148166
public static final String MCP_APPROVAL_MODE_NEVER = "never";
149167

168+
// DoubaoAppBlockType.Enum
169+
public static final String DOBAO_APP_BLOCK_TYPE_OUTPUT_TEXT = "output_text";
170+
public static final String DOBAO_APP_BLOCK_TYPE_REASONING_TEXT = "reasoning_text";
171+
public static final String DOBAO_APP_BLOCK_TYPE_SEARCH = "search";
172+
public static final String DOBAO_APP_BLOCK_TYPE_REASONING_SEARCH = "reasoning_search";
173+
174+
// ResponseDoubaoAppFeatureType.Enum
175+
public static final String RESPONSE_DOBAO_APP_FEATURE_TYPE_UNSPECIFIED = "unspecified";
176+
public static final String RESPONSE_DOBAO_APP_FEATURE_TYPE_ENABLED = "enabled";
177+
public static final String RESPONSE_DOBAO_APP_FEATURE_TYPE_DISABLED = "disabled";
178+
150179
private ResponsesConstants() {
151180
// Prevent instantiation
152181
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
package com.volcengine.ark.runtime.model.responses.event.doubaoapp;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
import com.volcengine.ark.runtime.model.responses.constant.ResponsesConstants;
5+
import com.volcengine.ark.runtime.model.responses.event.ItemEvent;
6+
7+
public class DoubaoAppCallInProgressEvent extends ItemEvent {
8+
9+
@JsonProperty("feature")
10+
private String feature;
11+
12+
public DoubaoAppCallInProgressEvent() {
13+
super(ResponsesConstants.EVENT_TYPE_RESPONSE_DOBAO_APP_CALL_IN_PROGRESS);
14+
}
15+
16+
public String getFeature() {
17+
return feature;
18+
}
19+
20+
public void setFeature(String feature) {
21+
this.feature = feature;
22+
}
23+
24+
@Override
25+
public String toString() {
26+
return "DoubaoAppCallInProgressEvent{" +
27+
"type='" + getType() + '\'' +
28+
", feature='feature'" +
29+
", itemId='" + getItemId() + '\'' +
30+
", outputIndex=" + getOutputIndex() +
31+
", sequenceNumber=" + getSequenceNumber() +
32+
'}';
33+
}
34+
35+
public static Builder builder() {
36+
return new Builder();
37+
}
38+
39+
public static class Builder {
40+
41+
private DoubaoAppCallInProgressEvent event = new DoubaoAppCallInProgressEvent();
42+
43+
public Builder feature(String feature) {
44+
event.setFeature(feature);
45+
return this;
46+
}
47+
48+
public DoubaoAppCallInProgressEvent build() {
49+
return event;
50+
}
51+
}
52+
}

volcengine-java-sdk-ark-runtime/src/main/java/com/volcengine/ark/runtime/model/responses/item/BaseItem.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
@JsonSubTypes.Type(value = ItemMCPApprovalResponse.class, name = ResponsesConstants.ITEM_TYPE_MCP_APPROVAL_RESPONSE),
3232
@JsonSubTypes.Type(value = ItemMCPListTools.class, name = ResponsesConstants.ITEM_TYPE_MCP_LIST_TOOLS),
3333
@JsonSubTypes.Type(value = ItemMCPCall.class, name = ResponsesConstants.ITEM_TYPE_MCP_CALL),
34+
35+
// DoubaoApp type
36+
@JsonSubTypes.Type(value = ItemDoubaoAppCall.class, name = ResponsesConstants.ITEM_TYPE_DOUBAO_APP_CALL)
3437
})
3538
public class BaseItem {
3639
@JsonProperty("type")
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
package com.volcengine.ark.runtime.model.responses.item;
2+
3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4+
import com.fasterxml.jackson.annotation.JsonProperty;
5+
import com.volcengine.ark.runtime.model.responses.constant.ResponsesConstants;
6+
import com.volcengine.ark.runtime.model.responses.item.doubaoapp.DoubaoAppCallBlock;
7+
8+
import java.util.List;
9+
10+
@JsonIgnoreProperties(ignoreUnknown = true)
11+
public class ItemDoubaoAppCall extends BaseItem implements OutputItem {
12+
13+
@JsonProperty("id")
14+
private String id;
15+
16+
@JsonProperty("feature")
17+
private String feature;
18+
19+
@JsonProperty("blocks")
20+
private List<DoubaoAppCallBlock> blocks;
21+
22+
@JsonProperty("status")
23+
private String status;
24+
25+
public ItemDoubaoAppCall() {
26+
super(ResponsesConstants.ITEM_TYPE_DOUBAO_APP_CALL);
27+
}
28+
29+
public String getId() {
30+
return id;
31+
}
32+
33+
public void setId(String id) {
34+
this.id = id;
35+
}
36+
37+
public String getFeature() {
38+
return feature;
39+
}
40+
41+
public void setFeature(String feature) {
42+
this.feature = feature;
43+
}
44+
45+
public List<DoubaoAppCallBlock> getBlocks() {
46+
return blocks;
47+
}
48+
49+
public void setBlocks(List<DoubaoAppCallBlock> blocks) {
50+
this.blocks = blocks;
51+
}
52+
53+
public String getStatus() {
54+
return status;
55+
}
56+
57+
public void setStatus(String status) {
58+
this.status = status;
59+
}
60+
61+
@Override
62+
public String toString() {
63+
return "ItemDoubaoAppCall{" +
64+
"type='" + getType() + '\'' +
65+
", id='" + id + '\'' +
66+
", feature='" + feature + '\'' +
67+
", blocks=" + blocks +
68+
", status='" + status + '\'' +
69+
'}';
70+
}
71+
72+
public static Builder builder() {
73+
return new Builder();
74+
}
75+
76+
public static class Builder {
77+
private String id;
78+
private String feature;
79+
private List<DoubaoAppCallBlock> blocks;
80+
private String status;
81+
82+
public Builder id(String id) {
83+
this.id = id;
84+
return this;
85+
}
86+
87+
public Builder feature(String feature) {
88+
this.feature = feature;
89+
return this;
90+
}
91+
92+
public Builder blocks(List<DoubaoAppCallBlock> blocks) {
93+
this.blocks = blocks;
94+
return this;
95+
}
96+
97+
public Builder status(String status) {
98+
this.status = status;
99+
return this;
100+
}
101+
102+
public ItemDoubaoAppCall build() {
103+
ItemDoubaoAppCall itemDoubaoAppCall = new ItemDoubaoAppCall();
104+
itemDoubaoAppCall.setId(id);
105+
itemDoubaoAppCall.setFeature(feature);
106+
itemDoubaoAppCall.setBlocks(blocks);
107+
itemDoubaoAppCall.setStatus(status);
108+
return itemDoubaoAppCall;
109+
}
110+
}
111+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package com.volcengine.ark.runtime.model.responses.item.doubaoapp;
2+
3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4+
import com.fasterxml.jackson.annotation.JsonProperty;
5+
import com.fasterxml.jackson.annotation.JsonSubTypes;
6+
import com.fasterxml.jackson.annotation.JsonTypeInfo;
7+
8+
@JsonIgnoreProperties(ignoreUnknown = true)
9+
@JsonTypeInfo(
10+
use = JsonTypeInfo.Id.NAME,
11+
include = JsonTypeInfo.As.EXISTING_PROPERTY,
12+
property = "type"
13+
)
14+
@JsonSubTypes({
15+
@JsonSubTypes.Type(value = DoubaoAppCallBlockOutputText.class, name = "output_text"),
16+
@JsonSubTypes.Type(value = DoubaoAppCallBlockReasoningText.class, name = "reasoning_text"),
17+
@JsonSubTypes.Type(value = DoubaoAppCallBlockSearch.class, name = "search"),
18+
@JsonSubTypes.Type(value = DoubaoAppCallBlockReasoningSearch.class, name = "reasoning_search")
19+
})
20+
public abstract class DoubaoAppCallBlock {
21+
22+
@JsonProperty("type")
23+
private String type;
24+
25+
public String getType() {
26+
return type;
27+
}
28+
29+
public void setType(String type) {
30+
this.type = type;
31+
}
32+
33+
public DoubaoAppCallBlock() {
34+
}
35+
36+
public DoubaoAppCallBlock(String type) {
37+
this.type = type;
38+
}
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
package com.volcengine.ark.runtime.model.responses.item.doubaoapp;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
import com.volcengine.ark.runtime.model.responses.constant.ResponsesConstants;
5+
6+
public class DoubaoAppCallBlockOutputText extends DoubaoAppCallBlock {
7+
8+
@JsonProperty("id")
9+
private String id;
10+
11+
@JsonProperty("type")
12+
private String type = ResponsesConstants.DOBAO_APP_BLOCK_TYPE_OUTPUT_TEXT;
13+
14+
@JsonProperty("text")
15+
private String text;
16+
17+
@JsonProperty("status")
18+
private String status;
19+
20+
@JsonProperty("parent_id")
21+
private String parentId;
22+
23+
public String getId() {
24+
return id;
25+
}
26+
27+
public void setId(String id) {
28+
this.id = id;
29+
}
30+
31+
public String getType() {
32+
return type;
33+
}
34+
35+
public void setType(String type) {
36+
this.type = type;
37+
}
38+
39+
public String getText() {
40+
return text;
41+
}
42+
43+
public void setText(String text) {
44+
this.text = text;
45+
}
46+
47+
public String getStatus() {
48+
return status;
49+
}
50+
51+
public void setStatus(String status) {
52+
this.status = status;
53+
}
54+
55+
public String getParentId() {
56+
return parentId;
57+
}
58+
59+
public void setParentId(String parentId) {
60+
this.parentId = parentId;
61+
}
62+
63+
public DoubaoAppCallBlockOutputText() {
64+
}
65+
66+
public static Builder builder() {
67+
return new Builder();
68+
}
69+
70+
public static class Builder {
71+
private String id;
72+
private String text;
73+
private String status;
74+
private String parentId;
75+
76+
public Builder id(String id) {
77+
this.id = id;
78+
return this;
79+
}
80+
81+
public Builder text(String text) {
82+
this.text = text;
83+
return this;
84+
}
85+
86+
public Builder status(String status) {
87+
this.status = status;
88+
return this;
89+
}
90+
91+
public Builder parentId(String parentId) {
92+
this.parentId = parentId;
93+
return this;
94+
}
95+
96+
public DoubaoAppCallBlockOutputText build() {
97+
DoubaoAppCallBlockOutputText outputText = new DoubaoAppCallBlockOutputText();
98+
outputText.setId(id);
99+
outputText.setText(text);
100+
outputText.setStatus(status);
101+
outputText.setParentId(parentId);
102+
return outputText;
103+
}
104+
}
105+
106+
@Override
107+
public String toString() {
108+
return "DoubaoAppCallBlockOutputText{" +
109+
"id='" + id + '\'' +
110+
", type='" + type + '\'' +
111+
", text='" + text + '\'' +
112+
", status='" + status + '\'' +
113+
", parentId='" + parentId + '\'' +
114+
'}';
115+
}
116+
}

0 commit comments

Comments
 (0)