Skip to content

Commit

Permalink
updating integration tests
Browse files Browse the repository at this point in the history
Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
  • Loading branch information
dhrubo-os committed Aug 18, 2023
1 parent 542023f commit a48dba5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public void testIsJsonCompatibleWithInvalidCases() {
Assert.assertFalse(connector.isNotPlainString("{\"key\": \"value\""));
Assert.assertFalse(connector.isNotPlainString("not_an_integer"));
}

@Test
public void testApplyCustomSubstitution() {
HttpConnector connector = createHttpConnector();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class RestMLRemoteInferenceIT extends MLCommonsRestTestCase {
+ " \"headers\": {\n"
+ " \"Authorization\": \"Bearer ${credential.openAI_key}\"\n"
+ " },\n"
+ " \"request_body\": \"{ \\\"model\\\": \\\"${parameters.model}\\\", \\\"prompt\\\": \\\"${parameters.prompt}\\\", \\\"max_tokens\\\": ${parameters.max_tokens}, \\\"temperature\\\": ${parameters.temperature} }\"\n"
+ " \"request_body\": \"{ \\\"model\\\": ${parameters.model}, \\\"prompt\\\": ${parameters.prompt}, \\\"max_tokens\\\": ${parameters.max_tokens}, \\\"temperature\\\": ${parameters.temperature} }\"\n"
+ " }\n"
+ " ]\n"
+ "}";
Expand Down Expand Up @@ -221,7 +221,7 @@ public void testOpenAIChatCompletionModel() throws IOException, InterruptedExcep
+ " \"headers\": { \n"
+ " \"Authorization\": \"Bearer ${credential.openAI_key}\"\n"
+ " },\n"
+ " \"request_body\": \"{ \\\"model\\\": \\\"${parameters.model}\\\", \\\"messages\\\": ${parameters.messages} }\"\n"
+ " \"request_body\": \"{ \\\"model\\\": ${parameters.model}, \\\"messages\\\": ${parameters.messages} }\"\n"
+ " }\n"
+ " ]\n"
+ "}";
Expand Down Expand Up @@ -279,7 +279,7 @@ public void testOpenAIEditsModel() throws IOException, InterruptedException {
+ " \"headers\": { \n"
+ " \"Authorization\": \"Bearer ${credential.openAI_key}\"\n"
+ " },\n"
+ " \"request_body\": \"{ \\\"model\\\": \\\"${parameters.model}\\\", \\\"input\\\": \\\"${parameters.input}\\\", \\\"instruction\\\": \\\"${parameters.instruction}\\\" }\"\n"
+ " \"request_body\": \"{ \\\"model\\\": ${parameters.model}, \\\"input\\\": ${parameters.input}, \\\"instruction\\\": ${parameters.instruction} }\"\n"
+ " }\n"
+ " ]\n"
+ "}";
Expand Down Expand Up @@ -348,7 +348,7 @@ public void testOpenAIModerationsModel() throws IOException, InterruptedExceptio
+ " \"headers\": { \n"
+ " \"Authorization\": \"Bearer ${credential.openAI_key}\"\n"
+ " },\n"
+ " \"request_body\": \"{ \\\"input\\\": \\\"${parameters.input}\\\" }\"\n"
+ " \"request_body\": \"{ \\\"input\\\": ${parameters.input} }\"\n"
+ " }\n"
+ " ]\n"
+ "}";
Expand Down Expand Up @@ -415,7 +415,7 @@ public void testOpenAITextEmbeddingModel() throws IOException, InterruptedExcept
+ " \"headers\": { \n"
+ " \"Authorization\": \"Bearer ${credential.openAI_key}\"\n"
+ " },\n"
+ " \"request_body\": \"{ \\\"model\\\": \\\"${parameters.model}\\\", \\\"input\\\": \\\"${parameters.input}\\\" }\",\n"
+ " \"request_body\": \"{ \\\"model\\\": ${parameters.model}, \\\"input\\\": ${parameters.input} }\",\n"
+ " \"pre_process_function\": \"text_docs_to_openai_embedding_input\",\n"
+ " \"post_process_function\": \"openai_embedding\"\n"
+ " }\n"
Expand Down Expand Up @@ -477,7 +477,7 @@ public void testCohereGenerateTextModel() throws IOException, InterruptedExcepti
+ " \"headers\": { \n"
+ " \"Authorization\": \"Bearer ${credential.cohere_key}\"\n"
+ " },\n"
+ " \"request_body\": \"{ \\\"max_tokens\\\": ${parameters.max_tokens}, \\\"return_likelihoods\\\": \\\"NONE\\\", \\\"truncate\\\": \\\"END\\\", \\\"prompt\\\": \\\"${parameters.prompt}\\\" }\"\n"
+ " \"request_body\": \"{ \\\"max_tokens\\\": ${parameters.max_tokens}, \\\"return_likelihoods\\\": \\\"NONE\\\", \\\"truncate\\\": \\\"END\\\", \\\"prompt\\\": ${parameters.prompt} }\"\n"
+ " }\n"
+ " ]\n"
+ "}";
Expand Down

0 comments on commit a48dba5

Please sign in to comment.