Skip to content

Commit 659a836

Browse files
authored
Fix Cohere test. (opensearch-project#2831)
Signed-off-by: Austin Lee <austin@aryn.ai>
1 parent f64e3f3 commit 659a836

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

plugin/src/test/java/org/opensearch/ml/rest/RestMLRAGSearchProcessorIT.java

+4-6
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ public class RestMLRAGSearchProcessorIT extends RestMLRemoteInferenceIT {
149149
? BEDROCK_CONNECTOR_BLUEPRINT2
150150
: BEDROCK_CONNECTOR_BLUEPRINT1;
151151

152-
private static final String COHERE_API_KEY = System.getenv("COHERE_API_KEY");
152+
private static final String COHERE_KEY = System.getenv("COHERE_KEY");
153153
private static final String COHERE_CONNECTOR_BLUEPRINT = "{\n"
154154
+ " \"name\": \"Cohere Chat Model\",\n"
155155
+ " \"description\": \"The connector to Cohere's public chat API\",\n"
156156
+ " \"version\": \"1\",\n"
157157
+ " \"protocol\": \"http\",\n"
158158
+ " \"credential\": {\n"
159159
+ " \"cohere_key\": \""
160-
+ COHERE_API_KEY
160+
+ COHERE_KEY
161161
+ "\"\n"
162162
+ " },\n"
163163
+ " \"parameters\": {\n"
@@ -521,7 +521,7 @@ public void testBM25WithBedrockWithConversation() throws Exception {
521521

522522
public void testBM25WithCohere() throws Exception {
523523
// Skip test if key is null
524-
if (COHERE_API_KEY == null) {
524+
if (COHERE_KEY == null) {
525525
return;
526526
}
527527
Response response = createConnector(COHERE_CONNECTOR_BLUEPRINT);
@@ -573,7 +573,7 @@ public void testBM25WithCohere() throws Exception {
573573

574574
public void testBM25WithCohereUsingLlmResponseField() throws Exception {
575575
// Skip test if key is null
576-
if (COHERE_API_KEY == null) {
576+
if (COHERE_KEY == null) {
577577
return;
578578
}
579579
Response response = createConnector(COHERE_CONNECTOR_BLUEPRINT);
@@ -660,8 +660,6 @@ private Response performSearch(String indexName, String pipeline, int size, Sear
660660
requestParameters.match,
661661
requestParameters.llmModel,
662662
requestParameters.llmQuestion,
663-
requestParameters.systemPrompt,
664-
requestParameters.userInstructions,
665663
requestParameters.contextSize,
666664
requestParameters.interactionSize,
667665
requestParameters.timeout,

0 commit comments

Comments
 (0)