File tree Expand file tree Collapse file tree 3 files changed +18
-13
lines changed
models/spring-ai-openai/src
main/java/org/springframework/ai/openai/api
test/java/org/springframework/ai/openai/api Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 1616
1717package org .springframework .ai .openai .api ;
1818
19+ import java .util .List ;
20+ import java .util .function .Consumer ;
21+
1922import com .fasterxml .jackson .annotation .JsonInclude ;
2023import com .fasterxml .jackson .annotation .JsonProperty ;
24+
2125import org .springframework .ai .model .ApiKey ;
2226import org .springframework .ai .model .NoopApiKey ;
2327import org .springframework .ai .model .SimpleApiKey ;
3337import org .springframework .web .client .RestClient ;
3438import org .springframework .web .util .UriBuilder ;
3539
36- import java .util .List ;
37- import java .util .function .Consumer ;
38-
3940/**
4041 * OpenAI File API.
4142 *
Original file line number Diff line number Diff line change 1616
1717package 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+
1925import okhttp3 .mockwebserver .MockResponse ;
2026import okhttp3 .mockwebserver .MockWebServer ;
2127import okhttp3 .mockwebserver .RecordedRequest ;
2228import org .junit .jupiter .api .AfterEach ;
2329import org .junit .jupiter .api .BeforeEach ;
2430import org .junit .jupiter .api .Nested ;
2531import org .junit .jupiter .api .Test ;
32+
2633import org .springframework .ai .model .ApiKey ;
2734import org .springframework .ai .model .SimpleApiKey ;
2835import org .springframework .http .HttpHeaders ;
3441import org .springframework .web .client .ResponseErrorHandler ;
3542import 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-
4344import static org .assertj .core .api .Assertions .assertThat ;
4445import static org .assertj .core .api .Assertions .assertThatThrownBy ;
4546import static org .mockito .Mockito .mock ;
Original file line number Diff line number Diff line change 1616
1717package org .springframework .ai .openai .api ;
1818
19+ import java .io .IOException ;
20+ import java .nio .charset .StandardCharsets ;
21+ import java .util .UUID ;
22+
1923import org .junit .jupiter .api .Test ;
2024import org .junit .jupiter .api .condition .EnabledIfEnvironmentVariable ;
25+
2126import org .springframework .ai .model .SimpleApiKey ;
2227import org .springframework .core .io .ByteArrayResource ;
2328import org .springframework .core .io .Resource ;
2429
25- import java .io .IOException ;
26- import java .nio .charset .StandardCharsets ;
27- import java .util .UUID ;
28-
2930import 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 = ".+" )
You can’t perform that action at this time.
0 commit comments