Skip to content

Commit 66b07c5

Browse files
committed
feat: add default value
1 parent ba9c069 commit 66b07c5

File tree

8 files changed

+12
-10
lines changed

8 files changed

+12
-10
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.33</version>
9+
<version>0.23.34</version>
1010
</parent>
1111
<packaging>jar</packaging>
1212
<artifactId>openai-api</artifactId>

api/src/main/java/com/theokanning/openai/assistants/assistant/AssistantRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import lombok.NonNull;
1414

1515
import java.util.ArrayList;
16+
import java.util.HashMap;
1617
import java.util.List;
1718
import java.util.Map;
1819

@@ -94,7 +95,7 @@ public class AssistantRequest implements IUssrRequest {
9495
* This can be useful for storing additional information about the object in a structured format.
9596
* Keys can be a maximum of 64 characters long, and values can be a maximum of 512 characters long.
9697
*/
97-
Map<String, String> metadata;
98+
Map<String, String> metadata = new HashMap<>();
9899

99100
@JsonProperty("file_ids")
100101
List<String> fileIds;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ public class MessageRequest {
5151
/**
5252
* A list of files attached to the message, and the tools they should be added to.
5353
*/
54-
List<Attachment> attachments;
54+
List<Attachment> attachments = new ArrayList<>();
5555

5656

5757
/**
5858
* Set of 16 key-value pairs that can be attached to an object.
5959
* This can be useful for storing additional information about the object in a structured format.
6060
* Keys can be a maximum of 64 characters long, and values can be a maximum of 512 characters long.
6161
*/
62-
Map<String, String> metadata;
62+
Map<String, String> metadata = new HashMap<>();
6363

6464
String runId;
6565

api/src/main/java/com/theokanning/openai/assistants/message/content/Text.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class Text {
1919
/**
2020
* The data that makes up the text.
2121
*/
22-
String value;
22+
String value = "";
2323

2424
/**
2525
* Text annotations that show additional details

api/src/main/java/com/theokanning/openai/assistants/thread/ThreadRequest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import lombok.Data;
1010
import lombok.NoArgsConstructor;
1111

12+
import java.util.HashMap;
1213
import java.util.List;
1314
import java.util.Map;
1415

@@ -40,10 +41,10 @@ public class ThreadRequest implements IUssrRequest {
4041
* This can be useful for storing additional information about the object in a structured format.
4142
* Keys can be a maximum of 64 characters long, and values can be a maximum of 512 characters long.
4243
*/
43-
Map<String, String> metadata;
44+
Map<String, String> metadata = new HashMap<>();
4445

4546

46-
Map<String, Object> environment;
47+
Map<String, Object> environment = new HashMap<>();
4748

4849
String user;
4950
}

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.33</version>
9+
<version>0.23.34</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.33</version>
8+
<version>0.23.34</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.33</version>
9+
<version>0.23.34</version>
1010
</parent>
1111
<packaging>jar</packaging>
1212

0 commit comments

Comments
 (0)