Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit cf1aca9

Browse files
Fix tests
1 parent ed6c392 commit cf1aca9

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/test/java/io/github/stefanbratanov/jvm/openai/OpenAIAssistantsApiIntegrationTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void testMessagesClient() {
5757
// upload file
5858
UploadFileRequest uploadFileRequest =
5959
UploadFileRequest.newBuilder()
60-
.file(getTestResource("/mydata.jsonl"))
60+
.file(getTestResource("/mydata.csv"))
6161
.purpose(Purpose.ASSISTANTS)
6262
.build();
6363
File file = openAI.filesClient().uploadFile(uploadFileRequest);
@@ -66,7 +66,7 @@ void testMessagesClient() {
6666

6767
CreateMessageRequest createRequest =
6868
CreateMessageRequest.newBuilder()
69-
.content("How does AI work? Explain it in simple terms.")
69+
.content("I need to solve the equation `2x + 3 = 7`. Can you help me?")
7070
.attachments(List.of(Attachment.of(file.id(), Tool.codeInterpreterTool())))
7171
.build();
7272

@@ -233,7 +233,7 @@ void testRunsAndRunStepsClients() {
233233
.collect(Collectors.toSet());
234234

235235
assertThat(emittedEvents)
236-
.containsExactlyInAnyOrder(
236+
.contains(
237237
"thread.run.created",
238238
"thread.run.queued",
239239
"thread.run.in_progress",
@@ -333,7 +333,7 @@ public void onComplete() {
333333
.satisfies(
334334
events ->
335335
assertThat(events)
336-
.containsExactlyInAnyOrder(
336+
.contains(
337337
"thread.created",
338338
"thread.run.created",
339339
"thread.run.queued",

src/test/resources/mydata.csv

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
problem_id,problem_text,answer
2+
1,"What is the derivative of 2x^2?", "4x"
3+
2,"Solve the equation: 2x + 3 = 7", "x = 2"
4+
3,"What is the integral of 3x?", "(3/2)x^2 + C"
5+
4,"Find the value of the determinant of the matrix [[1,2],[3,4]]", "-2"
6+
5,"Calculate the area of a circle with radius 5.", "78.54"

0 commit comments

Comments
 (0)