The blend of AI into ERP is going wild these days, as organizations are looking for ways to enhance productivity, improve customer experience, and streamline operations. OpenAI’s ChatGPT has developed an excellent performance, making it a powerful language model that generates answers in the form of human-like text. Below, we explore the capabilities of ChatGPT in the SAP Ecosystem.
Connecting to ChatGPT API
- Create a user account at https://beta.openai.com/signup/
- Once you sign up, you can explore the API documentation, Libraries, Models, Error handling, Security, and Compliances.
- Create your API Key by selecting your profile in the top right corner >> ‘View API Keys’.
- Click ‘Create new secret key’ as shown in the image below.
- A new dialog box will appear. Enter the name of your secret key, and then click on the ‘Create Secret Key’ button.
- Copy your secret key and keep it safely in your vault. Your secret key has now been generated. In this case, you can see my generated secret key in the image below.
- Our secret key is ready with us. Now it’s time to test the ChatGPT API. We will need the Postman tool or any other API testing tool for this. Here I am going with the Postman tool.
- Click on the API Reference tab >> then click the ‘Making Request’ option.
- Copy the API URL and body as marked in the image and paste the URL and body section into the Postman tool.
- Select the operation as POST.
- In the body object, replace the value of the content property with your query text to ChatGPT. I have put my query text as “Write an email to my manager for a leave request.” See the image below.
- In the Authorization tab in Postman, select the authorization type as Bearer Token and paste your secret key in the input box.
- Now hit the Send button in the post to run your ChatGPT API. You receive the response in JSON format. Below is my response.
Cool! Isn’t it? Give it a try. It’s easy.
This is how we can test and try the ChatGPT API endpoint. You can also use this API directly in any programming language application. In my next blog, I will show how you can integrate your ChatGPT service with SAP.
View our LinkedIn, here.