How To Use ChatGPT To Write Code (Visual Studio Code GPT 4 Writes Code Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial we'll explore how to use chat GPT for writing code in Visual Studio code vs code a free coding editor AI is shaping the future of coding so I invite you to join our AI for code Community where you can connect with other AI developers Link in the description generative AI like chat GPT predicts the next word based on massive amounts of code it was trained on this enables it to understand and explain code optimizing it for us let's get started with the tutorial first open your existing python project in vs code click file open folder and select your projects folder next install the chat GPT Genie AI extension by going to extensions searching for it and clicking install it's going to take some time okay sorry about that looks like it's installed let's take a look at this extension's capabilities I'm going to focus only on items that are relevant to this tutorial let's see you can use this chat GPT extension in problems window to explain and suggest fixes for compile time errors hmm that's nice you can see the difference between your code and GPT suggestion right within the editor with one click also you can create files or fix your code with one click or with keyboard shortcuts I really like that feature it will save time rewriting faulty code and finally you can use gpt4 GPT 3.5 gpt3 or codex models via your openai API key speaking of which we need to add our gpt4 API key to start writing code with this extension scroll down to where it says get your API key from here and click on open AI link to open your openai dashboard if you don't see your API key dashboard click on your username in upper right corner and select openai Keys option now click on create new secret key button to generate your gpt4 key any name is good but for this tutorial I'll name my key using GPT for writing code please note openai will only show you this key once right now so it's a good idea to save it some other place I'll copy and paste my key to notepad okay we're going to need it in the next step to use chat GPT for writing code or as in this example to explain the code use the mouse cursor to highlight the code right click on the code you just selected and find chatgpt Genie AI options to explain or optimize code here I am going to click on explain the code option if you're using chat GPT Genie AI extension for the first time you will see this drop down box saying please enter your openai key remember how I saved it earlier in my notepad well it's time to copy and paste it into this input remember every time you use chat GPT for coding it will deduct tokens from your openai account usually it's not much maybe as little as one to five cents but it's a good idea to keep an eye on your balance on the left hand side you will see gpt4 explaining what the code means this is a great way to learn how to code especially if you're just getting started with learning languages like python or JavaScript of course it will work for others like Java typescript or even react chat GPT has a large set of knowledge to help you write and learn how to code good luck out there oh and one more thing if you're still watching this tutorial please join our AI coding Community Link is in the description of this video it's basically just a place to meet other developers ask questions and help each other out
Info
Channel: Ghost Together
Views: 6,522
Rating: undefined out of 5
Keywords: chat gpt writing code reddit, gpt 3 write python code, gpt 4 can write code in, chatgpt writing code examples, chat gpt write code documentation, can gpt-3 write code, gpt-3 writing code, gpt codes, gpt writing code, can gpt 3 write code, how to use chatgpt for writing code, chatgpt prompts for writing code, chat gpt for writing python code, chat gpt alternative for writing code, gpt 4 writing code, gpt 3 writing code, chat gpt for writing code
Id: 5efrFmSsk68
Channel Id: undefined
Length: 3min 24sec (204 seconds)
Published: Sat Jul 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.