Skip to content

Commit

Permalink
Updates Cohere connector info in connectors.md (#6671)
Browse files Browse the repository at this point in the history
* Updates Cohere connector info in connectors.md

Addresses #1 in #6648

Signed-off-by: Heather Halter <[email protected]>

* Added link to github

Signed-off-by: Heather Halter <[email protected]>

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

Co-authored-by: Yaliang Wu <[email protected]>
Signed-off-by: Heather Halter <[email protected]>

* Fixed link formatting

Signed-off-by: Heather Halter <[email protected]>

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

Co-authored-by: kolchfa-aws <[email protected]>
Signed-off-by: Heather Halter <[email protected]>

---------

Signed-off-by: Heather Halter <[email protected]>
Co-authored-by: Yaliang Wu <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
  • Loading branch information
3 people authored Mar 14, 2024
1 parent 07b2eec commit a772802
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions _ml-commons-plugin/remote-models/connectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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"
}
Expand Down

0 comments on commit a772802

Please sign in to comment.