From 9b28ab790c84b4539481af250010bc3943ceb576 Mon Sep 17 00:00:00 2001 From: Theo Kanning Date: Fri, 4 Aug 2023 18:02:38 -0500 Subject: [PATCH] Fix tests Translation result changed, and for some reason my text was no longer flagged --- .../test/java/com/theokanning/openai/service/AudioTest.java | 4 ++-- .../java/com/theokanning/openai/service/ModerationTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/service/src/test/java/com/theokanning/openai/service/AudioTest.java b/service/src/test/java/com/theokanning/openai/service/AudioTest.java index d4f7b61b..d5a54a23 100644 --- a/service/src/test/java/com/theokanning/openai/service/AudioTest.java +++ b/service/src/test/java/com/theokanning/openai/service/AudioTest.java @@ -52,7 +52,7 @@ void createTranslation() { .build(); String text = service.createTranslation(createTranslationRequest, koreanAudioFilePath).getText(); - assertEquals("Hello, my name is Yuna. I am Korean voice.", text); + assertEquals("Hello, my name is Yoona. I am a Korean native speaker.", text); } @Test @@ -63,7 +63,7 @@ void createTranslationVerbose() { .build(); TranslationResult result = service.createTranslation(createTranslationRequest, koreanAudioFilePath); - assertEquals("Hello, my name is Yuna. I am Korean voice.", result.getText()); + assertEquals("Hello, my name is Yoona. I am a Korean native speaker.", result.getText()); assertEquals("translate", result.getTask()); assertEquals("english", result.getLanguage()); assertTrue(result.getDuration() > 0); diff --git a/service/src/test/java/com/theokanning/openai/service/ModerationTest.java b/service/src/test/java/com/theokanning/openai/service/ModerationTest.java index 9df3b447..f28bc083 100644 --- a/service/src/test/java/com/theokanning/openai/service/ModerationTest.java +++ b/service/src/test/java/com/theokanning/openai/service/ModerationTest.java @@ -15,7 +15,7 @@ public class ModerationTest { @Test void createModeration() { ModerationRequest moderationRequest = ModerationRequest.builder() - .input("I want to kill them") + .input("I want to kill him") .model("text-moderation-latest") .build();