From 72ef80419794039fd2097221f0c657eb1e0b6f65 Mon Sep 17 00:00:00 2001 From: Kalyan Date: Fri, 17 Nov 2023 02:11:08 +0530 Subject: [PATCH] Fix API call to create connector in ml-commons->conversational-search->rag-pipeline (#5614) * Update conversational-search.md Signed-off-by: Kalyan * Update conversational-search.md Signed-off-by: Kalyan * fix connector create json Signed-off-by: kalyanr --------- Signed-off-by: Kalyan Signed-off-by: kalyanr --- _ml-commons-plugin/conversational-search.md | 46 ++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/_ml-commons-plugin/conversational-search.md b/_ml-commons-plugin/conversational-search.md index b56c29bf..8f0b4a01 100644 --- a/_ml-commons-plugin/conversational-search.md +++ b/_ml-commons-plugin/conversational-search.md @@ -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": "" - }, - "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": "" + }, + "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 %}