Hi everyone, welcome back to my YouTube channel. In one of our previous videos, we discussed how to interact with AI APIs using Postman. Today, we will continue that discussion and focus on using the ChatGPT model in a VBCS application.
In our last video, we explored the different interactive models available through the Open API. To obtain these models, we ran a GET service on the API. If you haven’t watched that video yet, I recommend checking it out as it will provide you with a better understanding of the Open AI APIs.
In this video, we will specifically look at using the ChatGPT model. The model we will be using is GPT 3.5 Turbo. I will demonstrate how to send a request and receive a response using this model.
Before we proceed, let me explain the three roles involved in this process: user, assistant, and system. The user is the end user who interacts with the ChatGPT. The assistant is the ChatGPT server that provides responses to the user. The system role allows developers to give instructions to the chatbot, which the assistant uses to generate responses.
To interact with the ChatGPT API, we need to prepare a payload. The payload includes the model name, the role (user, assistant, or system), and the content of the message. The content can be a user query or an instruction for the assistant.
Now, let’s use Postman to create a request and interact with the ChatGPT model. Set the request type to POST and enter the API URL for chat completion.
In the request body, select the raw option and enter the payload we prepared earlier. Make sure to specify the model, roles, and content.
Send the request and check the response. The response will be the generated output from the ChatGPT model based on the user query or instruction.
You can ask different questions or provide instructions to the assistant and observe the responses. The assistant will generate dynamic and entertaining responses based on the instructions given.
In this video, we demonstrated how to interact with the ChatGPT API using Postman. We will further integrate this API into a VBCS application and explore its capabilities.
I hope you found this video helpful. Please like, share, and subscribe to my channel for more content. Thank you for watching!