Skip to content

Commit 1f32c77

Browse files
committed
fix test cases
1 parent d54b7bb commit 1f32c77

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>io.github.alexcheng1982</groupId>
99
<artifactId>spring-ai-dashscope-client-parent</artifactId>
10-
<version>1.2.2</version>
10+
<version>1.3.0</version>
1111
</parent>
1212
<artifactId>spring-ai-dashscope-client</artifactId>
1313
<packaging>jar</packaging>

client/src/test/java/io/github/alexcheng1982/springai/dashscope/DashscopeChatOptionsTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ class DashscopeChatOptionsTest {
1414
void testChatOptions() {
1515
var options = DashscopeChatOptions.builder()
1616
.withModel(DashscopeModelName.QWEN_TURBO)
17-
.withTemperature(0.2f)
17+
.withTemperature(0.2)
1818
.withFunctions(Set.of("add"))
1919
.build();
2020
assertEquals(DashscopeModelName.QWEN_TURBO, options.getModel());
21-
assertEquals(0.2f, options.getTemperature());
22-
var anotherOptions = DashscopeChatOptions.builder().withTemperature(0.7f)
21+
assertEquals(0.2, options.getTemperature());
22+
var anotherOptions = DashscopeChatOptions.builder().withTemperature(0.7)
2323
.build();
2424
var updated = options.updateFromChatOptions(anotherOptions);
2525
assertEquals(DashscopeModelName.QWEN_TURBO, updated.getModel());
26-
assertEquals(0.7f, updated.getTemperature());
26+
assertEquals(0.7, updated.getTemperature());
2727
assertFalse(CollectionUtils.isEmpty(updated.getFunctions()));
2828
}
2929
}

client/src/test/java/io/github/alexcheng1982/springai/dashscope/DashscopeEmbeddingModelTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package io.github.alexcheng1982.springai.dashscope;
22

3-
import static org.junit.jupiter.api.Assertions.assertFalse;
43
import static org.junit.jupiter.api.Assertions.assertNotNull;
4+
import static org.junit.jupiter.api.Assertions.assertTrue;
55

66
import org.junit.jupiter.api.Test;
77

@@ -13,6 +13,6 @@ void smokeTest() {
1313
var model = new DashscopeEmbeddingModel();
1414
var result = model.embed("hello");
1515
assertNotNull(result);
16-
assertFalse(result.isEmpty());
16+
assertTrue(result.length > 0);
1717
}
1818
}

client/src/test/java/io/github/alexcheng1982/springai/dashscope/FunctionExampleMain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ String runFunction() {
6969
.build();
7070
var options = DashscopeChatOptions.builder()
7171
.withModel(DashscopeModelName.QWEN_PLUS)
72-
.withTemperature(0.2f)
72+
.withTemperature(0.2)
7373
.withTools(List.of(
7474
ToolFunction.builder()
7575
.type("function")

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github.alexcheng1982</groupId>
88
<artifactId>spring-ai-dashscope-client-parent</artifactId>
9-
<version>1.2.2</version>
9+
<version>1.3.0</version>
1010
<packaging>pom</packaging>
1111

1212
<name>Aliyun Dashscope Spring AI Client :: Parent</name>

spring-boot-autoconfigure/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.github.alexcheng1982</groupId>
88
<artifactId>spring-ai-dashscope-client-parent</artifactId>
9-
<version>1.2.2</version>
9+
<version>1.3.0</version>
1010
</parent>
1111

1212
<artifactId>spring-ai-dashscope-spring-boot-autoconfigure</artifactId>

spring-boot-starter/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.github.alexcheng1982</groupId>
88
<artifactId>spring-ai-dashscope-client-parent</artifactId>
9-
<version>1.2.2</version>
9+
<version>1.3.0</version>
1010
</parent>
1111

1212
<artifactId>spring-ai-dashscope-spring-boot-starter</artifactId>

0 commit comments

Comments
 (0)