Skip to content

Commit 0747eb6

Browse files
committed
feat: add field truncation
1 parent fead893 commit 0747eb6

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
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.62</version>
9+
<version>0.23.63</version>
1010
</parent>
1111
<packaging>jar</packaging>
1212
<artifactId>openai-api</artifactId>

api/src/main/java/com/theokanning/openai/response/CreateResponseRequest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ public class CreateResponseRequest implements IUssrRequest {
153153
@JsonProperty("truncation_strategy")
154154
private TruncationStrategy truncationStrategy;
155155

156+
/**
157+
* The truncation strategy to use for the model response.
158+
* auto: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation.
159+
* disabled (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error.
160+
*/
161+
private String truncation;
162+
156163
/**
157164
* Additional data to include in response.
158165
*/

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

0 commit comments

Comments
 (0)