Fix API call to create connector in ml-commons->conversational-search->rag-pipeline (#5614)

* Update conversational-search.md

Signed-off-by: Kalyan <kalyan.ben10@live.com>

* Update conversational-search.md

Signed-off-by: Kalyan <kalyan.ben10@live.com>

* fix connector create  json

Signed-off-by: kalyanr <kalyan.ben10@live.com>

---------

Signed-off-by: Kalyan <kalyan.ben10@live.com>
Signed-off-by: kalyanr <kalyan.ben10@live.com>
This commit is contained in:
Kalyan 2023-11-17 02:11:08 +05:30 committed by GitHub
parent bb269db70b
commit 72ef804197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 23 deletions

View File

@ -250,29 +250,29 @@ Use the following steps to set up an HTTP connector using the OpenAI GPT 3.5 mod
```json
POST /_plugins/_ml/connectors/_create
{
"name": "OpenAI Chat Connector",
"description": "The connector to public OpenAI model service for GPT 3.5",
"version": 2,
"protocol": "http",
"parameters": {
"endpoint": "[api.openai.com](http://api.openai.com/)",
"model": "gpt-3.5-turbo",
"temperature": 0
},
"credential": {
"openAI_key": "<your OpenAI key>"
},
"actions": [
{
"action_type": "predict",
"method": "POST",
"url": "[https://$](https://%24/){parameters.endpoint}/v1/chat/completions",
"headers": {
"Authorization": "Bearer ${credential.openAI_key}"
},
"request_body": "{ \"model\": \"${parameters.model}\", \"messages\": ${parameters.messages}, \"temperature\": $ {parameters.temperature} }"
}
]
"name": "OpenAI Chat Connector",
"description": "The connector to public OpenAI model service for GPT 3.5",
"version": 2,
"protocol": "http",
"parameters": {
"endpoint": "api.openai.com",
"model": "gpt-3.5-turbo",
"temperature": 0
},
"credential": {
"openAI_key": "<your OpenAI key>"
},
"actions": [
{
"action_type": "predict",
"method": "POST",
"url": "https://${parameters.endpoint}/v1/chat/completions",
"headers": {
"Authorization": "Bearer ${credential.openAI_key}"
},
"request_body": "{ \"model\": \"${parameters.model}\", \"messages\": ${parameters.messages}, \"temperature\": ${parameters.temperature} }"
}
]
}
```
{% include copy-curl.html %}