Skip to content

Commit

Permalink
ignore testOpenAIEditsModel as it's deprecated
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Jan 9, 2024
1 parent 0a59fd1 commit 48ac39d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.apache.hc.core5.http.HttpHeaders;
import org.apache.hc.core5.http.message.BasicHeader;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.rules.ExpectedException;
import org.opensearch.client.Response;
Expand Down Expand Up @@ -251,6 +252,7 @@ public void testOpenAIChatCompletionModel() throws IOException, InterruptedExcep
assertNotNull(responseMap);
}

@Ignore("text-davinci-edit-001 been deprecated on 2024-01-04 and replaced by /v1/chat/completions")
public void testOpenAIEditsModel() throws IOException, InterruptedException {
// Skip test if key is null
if (OPENAI_KEY == null) {
Expand All @@ -265,7 +267,7 @@ public void testOpenAIEditsModel() throws IOException, InterruptedException {
+ " \"endpoint\": \"api.openai.com\",\n"
+ " \"auth\": \"API_Key\",\n"
+ " \"content_type\": \"application/json\",\n"
+ " \"model\": \"gpt-3.5-turbo\"\n"
+ " \"model\": \"text-davinci-edit-001\"\n"
+ " },\n"
+ " \"credential\": {\n"
+ " \"openAI_key\": \""
Expand All @@ -276,7 +278,7 @@ public void testOpenAIEditsModel() throws IOException, InterruptedException {
+ " {\n"
+ " \"action_type\": \"predict\",\n"
+ " \"method\": \"POST\",\n"
+ " \"url\": \"https://api.openai.com/v1/chat/completions\",\n"
+ " \"url\": \"https://api.openai.com/v1/edit\",\n"
+ " \"headers\": { \n"
+ " \"Authorization\": \"Bearer ${credential.openAI_key}\"\n"
+ " },\n"
Expand Down

0 comments on commit 48ac39d

Please sign in to comment.