Skip to content

Commit bab9426

Browse files
author
BitsAdmin
committed
Merge branch 'feat/ark-content-generation-flf2v' into 'integration_2025-05-08_883154236930'
feat: [development task] ark runtime (1207535) See merge request iaasng/volcengine-java-sdk!472
2 parents 94609fb + 3ad5280 commit bab9426

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

volcengine-java-sdk-ark-runtime/src/main/java/com/volcengine/ark/runtime/model/content/generation/CreateContentGenerationTaskRequest.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,17 @@ public static class Content {
8787
@JsonProperty("image_url")
8888
private ImageUrl imageUrl;
8989

90+
@JsonProperty("role")
91+
private String role;
92+
9093
public Content() {
9194
}
9295

93-
public Content(String type, String text, ImageUrl imageUrl) {
96+
public Content(String type, String text, ImageUrl imageUrl, String role) {
9497
this.type = type;
9598
this.text = text;
9699
this.imageUrl = imageUrl;
100+
this.role = role;
97101
}
98102

99103
public String getType() {
@@ -120,12 +124,21 @@ public void setImageUrl(ImageUrl imageUrl) {
120124
this.imageUrl = imageUrl;
121125
}
122126

127+
public String getRole() {
128+
return role;
129+
}
130+
131+
public void setRole(String role) {
132+
this.role = role;
133+
}
134+
123135
@Override
124136
public String toString() {
125137
return "Content{" +
126138
"type='" + type + '\'' +
127139
", text='" + text + '\'' +
128140
", imageUrl=" + imageUrl +
141+
", role=" + role +
129142
'}';
130143
}
131144

@@ -137,6 +150,7 @@ public static class Builder {
137150
private String type;
138151
private String text;
139152
private ImageUrl imageUrl;
153+
private String role;
140154

141155
private Builder() {
142156
}
@@ -156,11 +170,17 @@ public Builder imageUrl(ImageUrl imageUrl) {
156170
return this;
157171
}
158172

173+
public Builder role(String role) {
174+
this.role = role;
175+
return this;
176+
}
177+
159178
public Content build() {
160179
Content content = new Content();
161180
content.setType(type);
162181
content.setText(text);
163182
content.setImageUrl(imageUrl);
183+
content.setRole(role);
164184
return content;
165185
}
166186
}

volcengine-java-sdk-ark-runtime/test/java/com/volcengine/ark/runtime/ContentGenerationTaskExample.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public static void main(String[] args) {
4444
.imageUrl(CreateContentGenerationTaskRequest.ImageUrl.builder()
4545
.url("${IMAGE URL HERE}")
4646
.build())
47+
// .role("first_frame")
4748
.build());
4849

4950
CreateContentGenerationTaskRequest createRequest = CreateContentGenerationTaskRequest.builder()

0 commit comments

Comments
 (0)