ChatGPT 

 

ChatGPT is a free-to-use AI system. Use it for engaging conversations, gain insights, automate tasks, and witness the future of AI, all in one place.
ChatGPT connector features:

ChatGPT Connector for MuleSoft offers seamless integration with OpenAI’s ChatGPT, a powerful natural language processing model. This connector empowers your applications to harness the capabilities of ChatGPT, enabling dynamic and intelligent conversational interactions within your Mule flows.

With the ChatGPT MuleSoft Connector, applications gain the ability to harness the full potential of ChatGPT’s language model. This includes functionalities such as generating human-like text by setting the behaviour of the assistant, understanding user inputs, and dynamically adapting responses. Developers can leverage ChatGPT’s capabilities to enhance chatbots, virtual assistants, and other conversational interfaces within their MuleSoft ecosystem.

Let’s start by creating API Key for ChatGPT in openAI

 

 

Click on Create new secret key

 

Use the Secret Key as API Key in Config

 

Connect with chatGPT using openAI API

Create HTTP REQUEST Config

 

Create Flow as below

 

HTTP Request:

 

Body:

%dw 2.0
output application/json
---
{
  "model": "gpt-3.5-turbo",
  "messages": [
    {
     "role": "user",
     "content": payload.question as String
    }
  ]
}

Headers:

%dw 2.0
output application/json
---
{
  "Content-Type": "application/json",
  "Authorization": "Bearer <<API-KEY>>"
}

 

Connect with chatGPT using Mulesoft Connector

chatGPT connector config

 

Flow Design

 

Chat Config

 

 


Post Submitted by:

Prerna Srivastava
Senior Developer | Condenast Technology Labs
LinkedIn Profile
  
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
 
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.


Share this:
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
siva
siva
5 months ago

excellent