Skip to content

Commit 8fc8921

Browse files
feat: ark content generation sdk support flf2v image roles
1 parent 8364cca commit 8fc8921

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-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
}

0 commit comments

Comments
 (0)