Skip to content

Commit 560db63

Browse files
committed
feat: reasoning_content_signature
1 parent 96575b2 commit 560db63

File tree

8 files changed

+30
-6
lines changed

8 files changed

+30
-6
lines changed

api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>top.bella</groupId>
88
<artifactId>openai-java</artifactId>
9-
<version>0.23.42</version>
9+
<version>0.23.43</version>
1010
</parent>
1111
<packaging>jar</packaging>
1212
<artifactId>openai-api</artifactId>

api/src/main/java/com/theokanning/openai/assistants/message/Message.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import lombok.Data;
99
import lombok.NoArgsConstructor;
1010

11+
import java.util.ArrayList;
12+
import java.util.HashMap;
1113
import java.util.List;
1214
import java.util.Map;
1315

@@ -101,12 +103,12 @@ public class Message {
101103
/**
102104
* A list of files attached to the message, and the tools they were added to.
103105
*/
104-
List<Attachment> attachments;
106+
List<Attachment> attachments = new ArrayList<>();
105107

106108
/**
107109
* Set of 16 key-value pairs that can be attached to an object.
108110
* This can be useful for storing additional information about the object in a structured format.
109111
* Keys can be a maximum of 64 characters long, and values can be a maximum of 512 characters long.
110112
*/
111-
Map<String, String> metadata;
113+
Map<String, String> metadata = new HashMap<>();
112114
}

api/src/main/java/com/theokanning/openai/completion/chat/AssistantMessage.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.theokanning.openai.completion.chat;
22

33
import com.fasterxml.jackson.annotation.JsonIgnore;
4+
import com.fasterxml.jackson.annotation.JsonInclude;
45
import com.fasterxml.jackson.annotation.JsonProperty;
56
import com.theokanning.openai.utils.JsonUtil;
67
import lombok.AllArgsConstructor;
@@ -24,8 +25,17 @@ public class AssistantMessage implements ChatMessage {
2425

2526
// The contents of the reasoning message.
2627
@JsonProperty("reasoning_content")
28+
@JsonInclude(JsonInclude.Include.NON_NULL)
2729
String reasoningContent;
2830

31+
@JsonProperty("reasoning_content_signature")
32+
@JsonInclude(JsonInclude.Include.NON_NULL)
33+
String reasoningContentSignature;
34+
35+
@JsonInclude(JsonInclude.Include.NON_NULL)
36+
@JsonProperty("redacted_reasoning_content")
37+
private String redactedReasoningContent;
38+
2939
//An optional name for the participant. Provides the model information to differentiate between participants of the same role.
3040
String name;
3141

api/src/main/java/com/theokanning/openai/completion/chat/AssistantMultipleMessage.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.theokanning.openai.completion.chat;
22

33
import com.fasterxml.jackson.annotation.JsonIgnore;
4+
import com.fasterxml.jackson.annotation.JsonInclude;
45
import com.fasterxml.jackson.annotation.JsonProperty;
56
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
67
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@@ -27,6 +28,14 @@ public class AssistantMultipleMessage implements ChatMessage {
2728
@JsonProperty("reasoning_content")
2829
String reasoningContent;
2930

31+
@JsonProperty("reasoning_content_signature")
32+
@JsonInclude(JsonInclude.Include.NON_NULL)
33+
String reasoningContentSignature;
34+
35+
@JsonInclude(JsonInclude.Include.NON_NULL)
36+
@JsonProperty("redacted_reasoning_content")
37+
private String redactedReasoningContent;
38+
3039
//An optional name for the participant. Provides the model information to differentiate between participants of the same role.
3140
String name;
3241

api/src/main/java/com/theokanning/openai/completion/chat/ChatCompletionChunk.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.fasterxml.jackson.annotation.JsonIgnore;
44
import com.fasterxml.jackson.annotation.JsonProperty;
55
import com.theokanning.openai.Usage;
6+
import com.theokanning.openai.common.LastError;
67
import lombok.Data;
78

89
import java.util.List;
@@ -61,4 +62,6 @@ public class ChatCompletionChunk {
6162
*/
6263
@JsonIgnore
6364
String source;
65+
66+
LastError error;
6467
}

client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>top.bella</groupId>
88
<artifactId>openai-java</artifactId>
9-
<version>0.23.42</version>
9+
<version>0.23.43</version>
1010
</parent>
1111
<packaging>jar</packaging>
1212

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>top.bella</groupId>
77
<artifactId>openai-java</artifactId>
8-
<version>0.23.42</version>
8+
<version>0.23.43</version>
99
<packaging>pom</packaging>
1010
<description>openai java 版本</description>
1111
<name>openai-java</name>

service/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>top.bella</groupId>
88
<artifactId>openai-java</artifactId>
9-
<version>0.23.42</version>
9+
<version>0.23.43</version>
1010
</parent>
1111
<packaging>jar</packaging>
1212

0 commit comments

Comments
 (0)