Updates Cohere connector info in connectors.md (#6671)

* Updates Cohere connector info in connectors.md

Addresses #1 in https://github.com/opensearch-project/documentation-website/issues/6648

Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>

* Added link to github

Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>

* Update _ml-commons-plugin/remote-models/connectors.md

Co-authored-by: Yaliang Wu <ylwu@amazon.com>
Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>

* Fixed link formatting

Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>

* Update _ml-commons-plugin/remote-models/connectors.md

Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>

---------

Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>
Co-authored-by: Yaliang Wu <ylwu@amazon.com>
Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
This commit is contained in:
Heather Halter 2024-03-14 08:02:01 -07:00 committed by GitHub
parent 07b2eecc9a
commit a772802afd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 8 deletions

View File

@ -214,20 +214,21 @@ The `parameters` section requires the following options when using `aws_sigv4` a
### Cohere connector
You can use the following example request to create a standalone Cohere connector:
You can use the following example request to create a standalone Cohere connector using the Embed V3 model. For more information, see [Cohere connector blueprint](https://github.com/opensearch-project/ml-commons/blob/2.x/docs/remote_inference_blueprints/cohere_connector_embedding_blueprint).
```json
POST /_plugins/_ml/connectors/_create
{
"name": "<YOUR CONNECTOR NAME>",
"description": "<YOUR CONNECTOR DESCRIPTION>",
"version": "<YOUR CONNECTOR VERSION>",
"name": "Cohere Embed Model",
"description": "The connector to Cohere's public embed API",
"version": "1",
"protocol": "http",
"credential": {
"cohere_key": "<YOUR COHERE API KEY HERE>"
"cohere_key": "<ENTER_COHERE_API_KEY_HERE>"
},
"parameters": {
"model": "embed-english-v2.0",
"model": "embed-english-v3.0",
"input_type":"search_document",
"truncate": "END"
},
"actions": [
@ -236,9 +237,10 @@ POST /_plugins/_ml/connectors/_create
"method": "POST",
"url": "https://api.cohere.ai/v1/embed",
"headers": {
"Authorization": "Bearer ${credential.cohere_key}"
"Authorization": "Bearer ${credential.cohere_key}",
"Request-Source": "unspecified:opensearch"
},
"request_body": "{ \"texts\": ${parameters.texts}, \"truncate\": \"${parameters.truncate}\", \"model\": \"${parameters.model}\" }",
"request_body": "{ \"texts\": ${parameters.texts}, \"truncate\": \"${parameters.truncate}\", \"model\": \"${parameters.model}\", \"input_type\": \"${parameters.input_type}\" }",
"pre_process_function": "connector.pre_process.cohere.embedding",
"post_process_function": "connector.post_process.cohere.embedding"
}