|
15 | 15 | */
|
16 | 16 | package com.alibaba.cloud.ai.dashscope.chat;
|
17 | 17 |
|
| 18 | +import java.io.IOException; |
| 19 | +import java.net.URI; |
| 20 | +import java.time.Duration; |
| 21 | +import java.util.ArrayList; |
| 22 | +import java.util.List; |
| 23 | +import java.util.concurrent.atomic.AtomicReference; |
| 24 | + |
18 | 25 | import com.alibaba.cloud.ai.dashscope.api.DashScopeApi;
|
19 | 26 | import com.alibaba.cloud.ai.dashscope.api.DashScopeApi.ChatCompletion;
|
20 | 27 | import com.alibaba.cloud.ai.dashscope.api.DashScopeApi.ChatCompletionChunk;
|
|
29 | 36 | import org.junit.jupiter.api.Test;
|
30 | 37 | import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
|
31 | 38 | import org.mockito.Mockito;
|
| 39 | +import reactor.core.publisher.Flux; |
| 40 | +import reactor.test.StepVerifier; |
| 41 | + |
32 | 42 | import org.springframework.ai.chat.messages.UserMessage;
|
33 | 43 | import org.springframework.ai.chat.model.ChatResponse;
|
34 | 44 | import org.springframework.ai.chat.prompt.Prompt;
|
|
39 | 49 | import org.springframework.http.MediaType;
|
40 | 50 | import org.springframework.http.ResponseEntity;
|
41 | 51 | import org.springframework.util.MimeTypeUtils;
|
42 |
| -import reactor.core.publisher.Flux; |
43 |
| -import reactor.test.StepVerifier; |
44 |
| - |
45 |
| -import java.io.IOException; |
46 |
| -import java.net.URI; |
47 |
| -import java.time.Duration; |
48 |
| -import java.util.ArrayList; |
49 |
| -import java.util.List; |
50 |
| -import java.util.concurrent.atomic.AtomicReference; |
51 | 52 |
|
52 | 53 | import static com.alibaba.cloud.ai.dashscope.common.DashScopeApiConstants.MESSAGE_FORMAT;
|
53 | 54 | import static org.assertj.core.api.Assertions.assertThat;
|
@@ -419,12 +420,11 @@ void integrationTestVideoWithMultipleFrames() throws IOException {
|
419 | 420 | */
|
420 | 421 | @Test
|
421 | 422 | @Tag("integration")
|
422 |
| - @EnabledIfEnvironmentVariable(named = "AI_DASHSCOPE_API_KEY", matches = ".+") |
| 423 | + @EnabledIfEnvironmentVariable(named = "AI_DASHSCOPE_API_KEY", matches = "sk.+") |
423 | 424 | void integrationTestAudioWithMultipleFrames() throws IOException {
|
424 | 425 | // Create real API client
|
425 | 426 | String apiKey = System.getenv("AI_DASHSCOPE_API_KEY");
|
426 | 427 | DashScopeApi realApi = DashScopeApi.builder().apiKey(apiKey).build();
|
427 |
| - ; |
428 | 428 |
|
429 | 429 | // Create real chat model
|
430 | 430 | DashScopeChatModel realChatModel = DashScopeChatModel.builder().dashScopeApi(realApi).build();
|
|
0 commit comments