File tree Expand file tree Collapse file tree 6 files changed +51
-3
lines changed Expand file tree Collapse file tree 6 files changed +51
-3
lines changed Original file line number Diff line number Diff line change 4343 </parent >
4444
4545 <artifactId >coze-api</artifactId >
46- <version >0.3.2 </version >
46+ <version >0.3.3 </version >
4747
4848 <scm >
4949 <connection >scm:git:git://github.com/coze-dev/coze-java.git</connection >
193193
194194
195195 <build >
196+ <resources >
197+ <resource >
198+ <directory >src/main/resources</directory >
199+ <filtering >true</filtering >
200+ <includes >
201+ <include >**/version.properties</include >
202+ </includes >
203+ </resource >
204+ </resources >
196205 <plugins >
197206
198207 <!-- Javadoc plugin -->
Original file line number Diff line number Diff line change @@ -77,6 +77,12 @@ public class CreateChatReq extends BaseReq {
7777 @ JsonProperty ("parameters" )
7878 private Map <String , Object > parameters ;
7979
80+ /*
81+ * Response content type whether to return the card type.
82+ * */
83+ @ JsonProperty ("enable_card" )
84+ private Boolean enableCard ;
85+
8086 public void enableStream () {
8187 this .stream = true ;
8288 }
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public Response intercept(Chain chain) throws IOException {
2424 return chain .proceed (request );
2525 }
2626
27- public static final String VERSION = "0.3.2" ;
27+ public static final String VERSION = VersionUtils . getVersion () ;
2828 private static final ObjectMapper objectMapper = new ObjectMapper ();
2929
3030 /** 获取操作系统版本 */
Original file line number Diff line number Diff line change 1+ package com .coze .openapi .service .utils ;
2+
3+ import java .io .InputStream ;
4+ import java .util .Properties ;
5+
6+ import org .slf4j .Logger ;
7+ import org .slf4j .LoggerFactory ;
8+
9+ public class VersionUtils {
10+
11+ private static final Logger logger = LoggerFactory .getLogger (VersionUtils .class );
12+
13+ private static final String VERSION = readVersion ();
14+
15+ private static String readVersion () {
16+ Properties prop = new Properties ();
17+ try (InputStream input =
18+ VersionUtils .class .getClassLoader ().getResourceAsStream ("version.properties" )) {
19+ if (input != null ) {
20+ prop .load (input );
21+ return prop .getProperty ("sdk.version" , "" );
22+ }
23+ } catch (Exception e ) {
24+ logger .error ("Failed to read version.properties: {}" , e .getMessage ());
25+ }
26+ return "" ;
27+ }
28+
29+ public static String getVersion () {
30+ return VERSION ;
31+ }
32+ }
Original file line number Diff line number Diff line change 1+ sdk.version =${project.version}
Original file line number Diff line number Diff line change 1616 <dependency >
1717 <groupId >com.coze</groupId >
1818 <artifactId >coze-api</artifactId >
19- <version >0.3.2 </version >
19+ <version >0.3.3 </version >
2020 </dependency >
2121 </dependencies >
2222</project >
You can’t perform that action at this time.
0 commit comments