From the course: AI-Powered Development: GitHub Copilot in Visual Studio Code

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Evaluate and improve Python code

Evaluate and improve Python code

This is a simple Python file that has one load config function with a few lines of code, plus it has this to-do comment on line 5. We're going to use this file as the basis of our first agent workflow. The purpose of this function is to load a JSON file, this config.json file, which I also have over here. Both of these files are in this pystart folder, which is in this agent folder. I'll be working with this agent folder for the next several chapters. Let's look at the prompt. We've talked about chat context earlier in this course but I think I neglected to mention one thing and that's how to specifically set context. I did talk about clicking on this button and picking it from here but let's talk about this file name at the top. When you switch between tabs, that file name is added to the top, like this. That's an implicit or implied context. If I want to make it explicit, I can click on this plus symbol. Now if I switch over to the config file, you'll see that the fix this pi file…

Contents