File tree 2 files changed +4
-0
lines changed
chatgpt-java-sdk/src/main/java/io/github/kezhenxu94/chatgpt
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ public List<Choice> choices() {
56
56
return choices ;
57
57
}
58
58
59
+ @ JsonIgnoreProperties (ignoreUnknown = true )
59
60
public static class Usage {
60
61
private final int promptTokens ;
61
62
private final int completionTokens ;
@@ -84,6 +85,7 @@ public int totalTokens() {
84
85
}
85
86
}
86
87
88
+ @ JsonIgnoreProperties (ignoreUnknown = true )
87
89
public static class Choice {
88
90
private final Message message ;
89
91
private final String finishReason ;
Original file line number Diff line number Diff line change 1
1
package io .github .kezhenxu94 .chatgpt .message ;
2
2
3
+ import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
3
4
import com .fasterxml .jackson .annotation .JsonProperty ;
4
5
import com .fasterxml .jackson .annotation .JsonSubTypes ;
5
6
import com .fasterxml .jackson .annotation .JsonTypeInfo ;
6
7
8
+ @ JsonIgnoreProperties (ignoreUnknown = true )
7
9
@ JsonTypeInfo (use = JsonTypeInfo .Id .NAME , property = "role" )
8
10
@ JsonSubTypes ({
9
11
@ JsonSubTypes .Type (value = UserMessage .class , name = "user" ),
You can’t perform that action at this time.
0 commit comments