Skip to content

Commit c881806

Browse files
authored
chore: release new version 0.0.3 (#33)
1 parent 550dd50 commit c881806

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Add the following dependency to your `pom.xml`:
3030
<dependency>
3131
<groupId>ai.z.openapi</groupId>
3232
<artifactId>zai-sdk</artifactId>
33-
<version>0.0.2</version>
33+
<version>0.0.3</version>
3434
</dependency>
3535
```
3636

@@ -39,7 +39,7 @@ Add the following dependency to your `build.gradle` (for Groovy DSL):
3939

4040
```groovy
4141
dependencies {
42-
implementation 'ai.z.openapi:zai-sdk:0.0.2'
42+
implementation 'ai.z.openapi:zai-sdk:0.0.3'
4343
}
4444
```
4545

@@ -170,10 +170,8 @@ if (response.isSuccess() && response.getFlowable() != null) {
170170
data -> {
171171
// Handle streaming chunk
172172
if (data.getChoices() != null && !data.getChoices().isEmpty()) {
173-
String content = data.getChoices().get(0).getDelta().getContent();
174-
if (content != null) {
175-
System.out.print(content);
176-
}
173+
Delta delta = data.getChoices().get(0).getDelta();
174+
System.out.print(delta + "\n");
177175
}
178176
},
179177
error -> System.err.println("\nStream error: " + error.getMessage()),

README_CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Z.ai AI 平台官方 Java SDK,提供统一接口访问强大的AI能力,包
3030
<dependency>
3131
<groupId>ai.z.openapi</groupId>
3232
<artifactId>zai-sdk</artifactId>
33-
<version>0.0.2</version>
33+
<version>0.0.3</version>
3434
</dependency>
3535
```
3636

@@ -39,7 +39,7 @@ Z.ai AI 平台官方 Java SDK,提供统一接口访问强大的AI能力,包
3939

4040
```groovy
4141
dependencies {
42-
implementation 'ai.z.openapi:zai-sdk:0.0.2'
42+
implementation 'ai.z.openapi:zai-sdk:0.0.3'
4343
}
4444
```
4545

Release-Note.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
# Release Notes
22

33
### 0.0.2
4-
- ✅ Initial the Z.ai sdk refer from ZHIPU sdk
4+
- ✅ Initial the Z.ai sdk refer from ZHIPU sdk
5+
6+
### 0.0.3
7+
- fix: update method calls and improve code clarity in README examples (#27)
8+
- chore: add function call sample (#29)
9+
- chore: update jackson version, add custom headers (#30)
10+
- feat: add request watermark param (#32)
11+
- feat: support reasoning_content (#31)

core/src/main/java/ai/z/openapi/core/token/HttpRequestInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public Response intercept(Chain chain) throws IOException {
4040
.newBuilder()
4141
.header("Authorization", "Bearer " + accessToken)
4242
.header("x-source-channel", source_channel)
43-
.header("Zai-SDK-Ver", "0.0.2")
43+
.header("Zai-SDK-Ver", "0.0.3")
4444
.header("Accept-Language", "en-US,en");
4545
if (Objects.nonNull(config.getCustomHeaders())) {
4646
for (Map.Entry<String, String> entry : config.getCustomHeaders().entrySet()) {

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</scm>
4646

4747
<properties>
48-
<revision>0.0.2</revision>
48+
<revision>0.0.3</revision>
4949
<java.version>8</java.version>
5050
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5151
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

0 commit comments

Comments
 (0)