File tree Expand file tree Collapse file tree 5 files changed +16
-11
lines changed
core/src/main/java/ai/z/openapi/core/token Expand file tree Collapse file tree 5 files changed +16
-11
lines changed Original file line number Diff line number Diff 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
4141dependencies {
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(" \n Stream error: " + error. getMessage()),
Original file line number Diff line number Diff 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
4141dependencies {
42- implementation 'ai.z.openapi:zai-sdk:0.0.2 '
42+ implementation 'ai.z.openapi:zai-sdk:0.0.3 '
4343}
4444```
4545
Original file line number Diff line number Diff line change 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 )
Original file line number Diff line number Diff 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 ()) {
Original file line number Diff line number Diff line change 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>
You can’t perform that action at this time.
0 commit comments