ChatGPT API Walkthrough



In this tutorial we use OpenAI’s Chat GPT API to create a web application similar to Chat GPT. The new model is called ‘gpt-3.5-turbo’. They also created a new completions endpoint for their Rest API, which can take an array of messages to retain context when generating completions. We use HTML CSS & Javascript to build the client application.

Source code: https://github.com/cjgammon/chatgpt-demo

0:00 – Intro
0:13 – HTML
1:07 – Javascript
2:15 – Chat GPT Rest API
5:31 – Styling the UI
8:49 – More Polish
16:27 – Keeping Context
17:59 – All Done

Music:
– softy x no one』s perfect – The Beaty Around Us
– Provided by Lofi Records
– Watch: https://www.youtube.com/watch?v=7jOiZsMlPpc
– Download/Stream: https://fanlink.to/TheBeautyAroundUs

16 comments
  1. im afraid to use APIs and get charged a bunch of money during tests cause im still learning to code… Is this a valid fear or am i being worried for nothing? anyone here know how much money i can expect to pay?

  2. Well I made the samething myself it didn't work, And tried to use your project and it didn't work aswell. I opened the site in local host , I replaced the api key correctly, is there something I'm missing?

  3. Hi, thanks for this amazing tutorial! can you please explain how to give it format to the notes tag {{notes}} to look similar as the ChatGPT web? there are also notes enclosed in three backticks. Thanks!

Comments are closed.