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:
parent
e907d90fcc
commit
7f9a06120d
|
@ -126,11 +126,6 @@ POST /_plugins/_ml/models/_register
|
||||||
"function_name": "remote",
|
"function_name": "remote",
|
||||||
"model_group_id": "lEFGL4kB4ubqQRzegPo2",
|
"model_group_id": "lEFGL4kB4ubqQRzegPo2",
|
||||||
"description": "test model",
|
"description": "test model",
|
||||||
"connector": {
|
|
||||||
"name": "openAI-gpt-3.5-turbo",
|
|
||||||
"function_name": "remote",
|
|
||||||
"model_group_id": "lEFGL4kB4ubqQRzegPo2",
|
|
||||||
"description": "test model",
|
|
||||||
"connector": {
|
"connector": {
|
||||||
"name": "OpenAI Connector",
|
"name": "OpenAI Connector",
|
||||||
"description": "The connector to public OpenAI model service for GPT 3.5",
|
"description": "The connector to public OpenAI model service for GPT 3.5",
|
||||||
|
@ -431,12 +426,16 @@ The following example request creates a standalone Cohere connection:
|
||||||
```json
|
```json
|
||||||
POST /_plugins/_ml/connectors/_create
|
POST /_plugins/_ml/connectors/_create
|
||||||
{
|
{
|
||||||
"name": "Cohere Connector: embedding",
|
"name": "YOUR CONNECTOR NAME",
|
||||||
"description": "The connector to cohere embedding model",
|
"description": "YOUR CONNECTOR DESCRIPTION",
|
||||||
"version": 1,
|
"version": "YOUR CONNECTOR VERSION",
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
"credential": {
|
"credential": {
|
||||||
"cohere_key": "..."
|
"cohere_key": "ADD YOUR Cohere API KEY HERE"
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"model": "embed-english-v2.0",
|
||||||
|
"truncate": "END"
|
||||||
},
|
},
|
||||||
"actions": [
|
"actions": [
|
||||||
{
|
{
|
||||||
|
@ -446,7 +445,7 @@ POST /_plugins/_ml/connectors/_create
|
||||||
"headers": {
|
"headers": {
|
||||||
"Authorization": "Bearer ${credential.cohere_key}"
|
"Authorization": "Bearer ${credential.cohere_key}"
|
||||||
},
|
},
|
||||||
"request_body": "{ \"texts\": ${parameters.prompt}, \"truncate\": \"END\" }"
|
"request_body": "{ \"texts\": ${parameters.texts}, \"truncate\": \"${parameters.truncate}\", \"model\": \"${parameters.model}\" }"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue