File tree Expand file tree Collapse file tree 5 files changed +13
-4
lines changed
src/main/java/com/theokanning/openai/batch Expand file tree Collapse file tree 5 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 66 <parent >
77 <groupId >top.bella</groupId >
88 <artifactId >openai-java</artifactId >
9- <version >0.23.93 </version >
9+ <version >0.23.94 </version >
1010 </parent >
1111 <packaging >jar</packaging >
1212 <artifactId >openai-api</artifactId >
Original file line number Diff line number Diff line change 11package com .theokanning .openai .batch ;
22
3+ import com .fasterxml .jackson .annotation .JsonIgnore ;
34import com .fasterxml .jackson .annotation .JsonProperty ;
45import lombok .AllArgsConstructor ;
56import lombok .Data ;
@@ -126,4 +127,12 @@ public class Batch {
126127 */
127128
128129 Map <String , String > metadata ;
130+
131+ @ JsonIgnore
132+ public boolean isCompleted () {
133+ long total = getRequestCounts ().getTotal ();
134+ long completed = getRequestCounts ().getCompleted ();
135+ long failed = getRequestCounts ().getFailed ();
136+ return completed + failed >= total ;
137+ }
129138}
Original file line number Diff line number Diff line change 66 <parent >
77 <groupId >top.bella</groupId >
88 <artifactId >openai-java</artifactId >
9- <version >0.23.93 </version >
9+ <version >0.23.94 </version >
1010 </parent >
1111 <packaging >jar</packaging >
1212
Original file line number Diff line number Diff line change 55
66 <groupId >top.bella</groupId >
77 <artifactId >openai-java</artifactId >
8- <version >0.23.93 </version >
8+ <version >0.23.94 </version >
99 <packaging >pom</packaging >
1010 <description >openai java 版本</description >
1111 <name >openai-java</name >
Original file line number Diff line number Diff line change 66 <parent >
77 <groupId >top.bella</groupId >
88 <artifactId >openai-java</artifactId >
9- <version >0.23.93 </version >
9+ <version >0.23.94 </version >
1010 </parent >
1111 <packaging >jar</packaging >
1212
You can’t perform that action at this time.
0 commit comments