diff --git a/pom.xml b/pom.xml
index a8ece16..42a8068 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
cn.bigmodel.openapi
oapi-java-sdk
- release-V4-2.4.3
+ release-V4-2.4.4
jar
diff --git a/src/main/java/com/zhipu/oapi/service/v4/model/ChatMessage.java b/src/main/java/com/zhipu/oapi/service/v4/model/ChatMessage.java
index 64b587f..152f4ed 100644
--- a/src/main/java/com/zhipu/oapi/service/v4/model/ChatMessage.java
+++ b/src/main/java/com/zhipu/oapi/service/v4/model/ChatMessage.java
@@ -23,6 +23,9 @@ public class ChatMessage extends ObjectNode {
private String role;
private Object content;
private Audio audio;
+
+ private Object reasoning_content;
+
private String name;
@JsonProperty("tool_calls")
@@ -70,6 +73,11 @@ public ChatMessage(ObjectNode objectNode) {
} else {
this.setTool_call_id(null);
}
+ if (objectNode.get("reasoning_content") != null) {
+ this.setReasoning_content(objectNode.get("reasoning_content").asText());
+ } else {
+ this.setReasoning_content(null);
+ }
Iterator fieldNames = objectNode.fieldNames();
@@ -120,4 +128,9 @@ public void setAudio(Audio audio) {
this.putPOJO("audio", audio);
}
+
+ public void setReasoning_content(Object reasoning_content) {
+ this.reasoning_content = reasoning_content;
+ this.putPOJO("reasoning_content", reasoning_content);
+ }
}
diff --git a/src/main/java/com/zhipu/oapi/service/v4/model/Delta.java b/src/main/java/com/zhipu/oapi/service/v4/model/Delta.java
index f114344..0344595 100644
--- a/src/main/java/com/zhipu/oapi/service/v4/model/Delta.java
+++ b/src/main/java/com/zhipu/oapi/service/v4/model/Delta.java
@@ -27,6 +27,8 @@ public class Delta extends ObjectNode {
@Setter
private Audio audio;
+ private String reasoning_content;
+
@JsonProperty("tool_calls")
private List tool_calls;
@@ -61,6 +63,11 @@ public Delta(ObjectNode objectNode) {
} else {
this.setAudio(null);
}
+ if (objectNode.get("reasoning_content") != null) {
+ this.setReasoning_content(objectNode.get("reasoning_content").asText());
+ } else {
+ this.setReasoning_content(null);
+ }
Iterator fieldNames = objectNode.fieldNames();
@@ -94,4 +101,9 @@ public void setTool_calls(List tool_calls) {
}
}
}
+
+ public void setReasoning_content(String reasoning_content) {
+ this.reasoning_content = reasoning_content;
+ this.put("reasoning_content", reasoning_content);
+ }
}
diff --git a/src/main/java/com/zhipu/oapi/service/v4/videos/VideoCreateParams.java b/src/main/java/com/zhipu/oapi/service/v4/videos/VideoCreateParams.java
index 97e8a02..dbdabd0 100644
--- a/src/main/java/com/zhipu/oapi/service/v4/videos/VideoCreateParams.java
+++ b/src/main/java/com/zhipu/oapi/service/v4/videos/VideoCreateParams.java
@@ -34,7 +34,7 @@ public class VideoCreateParams implements ClientRequest {
* 图片大小:
*/
@JsonProperty("image_url")
- private String imageUrl;
+ private Object imageUrl;
/**
* 调用指定模型进行对 prompt 优化,推荐使用 GLM-4-Air 和 GLM-4-Flash。如未指定,则直接使用原始 prompt。
diff --git a/src/test/java/com/zhipu/oapi/TestVideosClientApiService.java b/src/test/java/com/zhipu/oapi/TestVideosClientApiService.java
index b76e3f4..c466723 100644
--- a/src/test/java/com/zhipu/oapi/TestVideosClientApiService.java
+++ b/src/test/java/com/zhipu/oapi/TestVideosClientApiService.java
@@ -50,7 +50,7 @@ public void testVideo(){
VideoCreateParams build = VideoCreateParams.builder()
.prompt("A person driving a boat")
- .model("cogvideox")
+ .model("cogvideox-3")
.withAudio(Boolean.TRUE)
.quality("quality")
.build();
@@ -70,7 +70,7 @@ public void testVideoSensitiveWordCheck(){
VideoCreateParams build = VideoCreateParams.builder()
.prompt("A person driving a boat")
- .model("cogvideox")
+ .model("cogvideox-3")
.sensitiveWordCheck(sensitiveWordCheckRequest)
.build();
VideosResponse apply = new VideosClientApiService(client.getConfig().getHttpClient(), client.getConfig().getBaseUrl())
@@ -90,7 +90,7 @@ public void testVideoByImage() throws IOException {
.prompt(
"This scene depicts a magical atmosphere. On a stone table surrounded by green plants and orange flowers, an ancient book lies open, its pages seemingly just turned. Next to the book sits a transparent magic orb filled with twinkling lights and flowing shadows, as if mysterious energy flows within. The base beneath the magic orb emits a faint glow, while tiny light particles float in the surrounding air, enhancing the scene's mystique and magical ambiance. Vague architectural structures can be seen in the background, further emphasizing the fantasy and mystery of this scene.")
.imageUrl(imageUrl)
- .model("cogvideox")
+ .model("cogvideox-3")
.build();
VideosResponse apply = new VideosClientApiService(client.getConfig().getHttpClient(), client.getConfig().getBaseUrl())
.videoGenerations(build)