diff --git a/cypress/integration/plugins/ml-commons-dashboards/overview_spec.js b/cypress/integration/plugins/ml-commons-dashboards/overview_spec.js index a2e339512..ca01e3ddd 100644 --- a/cypress/integration/plugins/ml-commons-dashboards/overview_spec.js +++ b/cypress/integration/plugins/ml-commons-dashboards/overview_spec.js @@ -143,28 +143,35 @@ if (Cypress.env('ML_COMMONS_DASHBOARDS_ENABLED')) { version: '1.0.0', description: 'test model', connector: { - name: 'sagemaker: embedding', - description: 'Test connector for Sagemaker embedding model', + name: 'OpenAI embedding Connector', + description: + 'The connector to public OpenAI model service for GPT 3.5', version: 1, - protocol: 'aws_sigv4', - credential: { - access_key: '...', - secret_key: '...', - session_token: '...', - }, + protocol: 'http', parameters: { - region: 'us-west-2', - service_name: 'sagemaker', + endpoint: 'api.openai.com', + auth: 'API_Key', + content_type: 'application/json', + max_tokens: 7, + temperature: 0, + model: 'text-embedding-ada-002', + }, + credential: { + openAI_key: 'xxx', }, actions: [ { action_type: 'predict', method: 'POST', + url: 'https://${parameters.endpoint}/v1/embeddings', + pre_process_function: 'connector.pre_process.openai.embedding', + post_process_function: + 'connector.post_process.openai.embedding', headers: { - 'content-type': 'application/json', + Authorization: 'Bearer ${credential.openAI_key}', }, - url: 'https://runtime.sagemaker.us-west-2.amazonaws.com/endpoints/lmi-model-2023-06-24-01-35-32-275/invocations', - request_body: '["${parameters.inputs}"]', + request_body: + '{ "model": "${parameters.model}", "input": ${parameters.input}}', }, ], },