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>
This commit is contained in:
Naarcha-AWS 2023-08-25 09:27:11 -05:00 committed by GitHub
parent e907d90fcc
commit 7f9a06120d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 23 deletions

View File

@ -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 %}