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:
parent
bb269db70b
commit
72ef804197
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue