Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Cohere test. #2831

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ public class RestMLRAGSearchProcessorIT extends RestMLRemoteInferenceIT {
? BEDROCK_CONNECTOR_BLUEPRINT2
: BEDROCK_CONNECTOR_BLUEPRINT1;

private static final String COHERE_API_KEY = System.getenv("COHERE_API_KEY");
private static final String COHERE_KEY = System.getenv("COHERE_KEY");
private static final String COHERE_CONNECTOR_BLUEPRINT = "{\n"
+ " \"name\": \"Cohere Chat Model\",\n"
+ " \"description\": \"The connector to Cohere's public chat API\",\n"
+ " \"version\": \"1\",\n"
+ " \"protocol\": \"http\",\n"
+ " \"credential\": {\n"
+ " \"cohere_key\": \""
+ COHERE_API_KEY
+ COHERE_KEY
+ "\"\n"
+ " },\n"
+ " \"parameters\": {\n"
Expand Down Expand Up @@ -521,7 +521,7 @@ public void testBM25WithBedrockWithConversation() throws Exception {

public void testBM25WithCohere() throws Exception {
// Skip test if key is null
if (COHERE_API_KEY == null) {
if (COHERE_KEY == null) {
return;
}
Response response = createConnector(COHERE_CONNECTOR_BLUEPRINT);
Expand Down Expand Up @@ -573,7 +573,7 @@ public void testBM25WithCohere() throws Exception {

public void testBM25WithCohereUsingLlmResponseField() throws Exception {
// Skip test if key is null
if (COHERE_API_KEY == null) {
if (COHERE_KEY == null) {
return;
}
Response response = createConnector(COHERE_CONNECTOR_BLUEPRINT);
Expand Down Expand Up @@ -660,8 +660,6 @@ private Response performSearch(String indexName, String pipeline, int size, Sear
requestParameters.match,
requestParameters.llmModel,
requestParameters.llmQuestion,
requestParameters.systemPrompt,
requestParameters.userInstructions,
requestParameters.contextSize,
requestParameters.interactionSize,
requestParameters.timeout,
Expand Down
Loading