Skip to content

Commit 1e3ad7d

Browse files
muverystrongfengyizhu
authored andcommitted
feat: change put.level from int to integer
1 parent 42b0956 commit 1e3ad7d

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
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.97</version>
9+
<version>0.23.98</version>
1010
</parent>
1111
<packaging>jar</packaging>
1212
<artifactId>openai-api</artifactId>

api/src/main/java/com/theokanning/openai/queue/Put.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ public class Put {
5353
/**
5454
* The timeout duration for the operation in seconds
5555
*/
56-
private int timeout;
56+
@Builder.Default
57+
private Integer timeout = 300;
5758

5859
/**
5960
* Used to trace the task or batch that spawned this task
@@ -102,4 +103,13 @@ public int getTaskTimeout() {
102103
throw new IllegalArgumentException("Unsupported response mode: " + responseMode);
103104
}
104105
}
106+
107+
/**
108+
* Sets the timeout value. If null is provided, it will be set to 300.
109+
*
110+
* @param timeout the timeout duration in seconds
111+
*/
112+
public void setTimeout(Integer timeout) {
113+
this.timeout = timeout != null ? timeout : 300;
114+
}
105115
}

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

0 commit comments

Comments
 (0)