Skip to content

Commit a5e0400

Browse files
committed
fix: Synced with the main branch code and adjusted the import order according to checkstyle requirements.
Signed-off-by: Sun Yuhan <[email protected]>
1 parent 128edc6 commit a5e0400

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiFileApi.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@
1616

1717
package org.springframework.ai.openai.api;
1818

19+
import java.util.List;
20+
import java.util.function.Consumer;
21+
1922
import com.fasterxml.jackson.annotation.JsonInclude;
2023
import com.fasterxml.jackson.annotation.JsonProperty;
24+
2125
import org.springframework.ai.model.ApiKey;
2226
import org.springframework.ai.model.NoopApiKey;
2327
import org.springframework.ai.model.SimpleApiKey;
@@ -33,9 +37,6 @@
3337
import org.springframework.web.client.RestClient;
3438
import org.springframework.web.util.UriBuilder;
3539

36-
import java.util.List;
37-
import java.util.function.Consumer;
38-
3940
/**
4041
* OpenAI File API.
4142
*

models/spring-ai-openai/src/test/java/org/springframework/ai/openai/api/OpenAiFileApiBuilderTests.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,20 @@
1616

1717
package org.springframework.ai.openai.api;
1818

19+
import java.io.IOException;
20+
import java.util.LinkedList;
21+
import java.util.List;
22+
import java.util.Objects;
23+
import java.util.Queue;
24+
1925
import okhttp3.mockwebserver.MockResponse;
2026
import okhttp3.mockwebserver.MockWebServer;
2127
import okhttp3.mockwebserver.RecordedRequest;
2228
import org.junit.jupiter.api.AfterEach;
2329
import org.junit.jupiter.api.BeforeEach;
2430
import org.junit.jupiter.api.Nested;
2531
import org.junit.jupiter.api.Test;
32+
2633
import org.springframework.ai.model.ApiKey;
2734
import org.springframework.ai.model.SimpleApiKey;
2835
import org.springframework.http.HttpHeaders;
@@ -34,12 +41,6 @@
3441
import org.springframework.web.client.ResponseErrorHandler;
3542
import org.springframework.web.client.RestClient;
3643

37-
import java.io.IOException;
38-
import java.util.LinkedList;
39-
import java.util.List;
40-
import java.util.Objects;
41-
import java.util.Queue;
42-
4344
import static org.assertj.core.api.Assertions.assertThat;
4445
import static org.assertj.core.api.Assertions.assertThatThrownBy;
4546
import static org.mockito.Mockito.mock;

models/spring-ai-openai/src/test/java/org/springframework/ai/openai/api/OpenAiFileApiIT.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,22 @@
1616

1717
package org.springframework.ai.openai.api;
1818

19+
import java.io.IOException;
20+
import java.nio.charset.StandardCharsets;
21+
import java.util.UUID;
22+
1923
import org.junit.jupiter.api.Test;
2024
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
25+
2126
import org.springframework.ai.model.SimpleApiKey;
2227
import org.springframework.core.io.ByteArrayResource;
2328
import org.springframework.core.io.Resource;
2429

25-
import java.io.IOException;
26-
import java.nio.charset.StandardCharsets;
27-
import java.util.UUID;
28-
2930
import static org.assertj.core.api.Assertions.assertThat;
3031

3132
/**
33+
* Tests for {@link OpenAiFileApi}.
34+
*
3235
* @author Sun Yuhan
3336
*/
3437
@EnabledIfEnvironmentVariable(named = "OPENAI_API_KEY", matches = ".+")

0 commit comments

Comments
 (0)