From 7f9a06120d99fb30fc141996e2e8324e75897233 Mon Sep 17 00:00:00 2001 From: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> Date: Fri, 25 Aug 2023 09:27:11 -0500 Subject: [PATCH] Add new Cohere connector blueprint (#4894) * Update connectors.md Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Fix local connector example Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> --------- Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> --- .../extensibility/connectors.md | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/_ml-commons-plugin/extensibility/connectors.md b/_ml-commons-plugin/extensibility/connectors.md index 09646f5e..3d361e9b 100644 --- a/_ml-commons-plugin/extensibility/connectors.md +++ b/_ml-commons-plugin/extensibility/connectors.md @@ -126,11 +126,6 @@ POST /_plugins/_ml/models/_register "function_name": "remote", "model_group_id": "lEFGL4kB4ubqQRzegPo2", "description": "test model", - "connector": { - "name": "openAI-gpt-3.5-turbo", - "function_name": "remote", - "model_group_id": "lEFGL4kB4ubqQRzegPo2", - "description": "test model", "connector": { "name": "OpenAI Connector", "description": "The connector to public OpenAI model service for GPT 3.5", @@ -431,24 +426,28 @@ The following example request creates a standalone Cohere connection: ```json POST /_plugins/_ml/connectors/_create { - "name": "Cohere Connector: embedding", - "description": "The connector to cohere embedding model", - "version": 1, - "protocol": "http", - "credential": { - "cohere_key": "..." - }, - "actions": [ - { - "action_type": "predict", - "method": "POST", - "url": "https://api.cohere.ai/v1/embed", - "headers": { - "Authorization": "Bearer ${credential.cohere_key}" - }, - "request_body": "{ \"texts\": ${parameters.prompt}, \"truncate\": \"END\" }" - } - ] + "name": "YOUR CONNECTOR NAME", + "description": "YOUR CONNECTOR DESCRIPTION", + "version": "YOUR CONNECTOR VERSION", + "protocol": "http", + "credential": { + "cohere_key": "ADD YOUR Cohere API KEY HERE" + }, + "parameters": { + "model": "embed-english-v2.0", + "truncate": "END" + }, + "actions": [ + { + "action_type": "predict", + "method": "POST", + "url": "https://api.cohere.ai/v1/embed", + "headers": { + "Authorization": "Bearer ${credential.cohere_key}" + }, + "request_body": "{ \"texts\": ${parameters.texts}, \"truncate\": \"${parameters.truncate}\", \"model\": \"${parameters.model}\" }" + } + ] } ``` {% include copy-curl.html %}