We're on the home stretch.
This is the final step in the environment setup, and it's an easy one.
It's one that's easy to make mistakes as well.
But I'm going to guide you through it and there'll be no problems whatsoever.
I'm going to show it to you both on a mac and a PC all in one video, so you guys can see how it works
for both.
And it's pretty simple.
It's called creating a dot env file, which is a common way to store secrets in a way that you can access
in your project that don't get checked into source code control doesn't go into into git, which means
that your secrets are safe.
We're going to start with a mac.
Here I am, I am going to go into my projects folder that we set up into LM engineering.
So we are now in the project root directory, as I say.
Um, and what I'm going to do is create a file called dot env.
And the way that you create a file from, from the, the way you bring up an editor in here is you can
use nano, which is a very popular tool.
And the name of our file, the thing we're going to create is going to be called dot EMV, literally
a period.
And then the letters EMV.
Now here's the thing.
This is a fussy step.
The name of the file must be exactly dot EMV.
It can't be like my keys dot EMV or EMV and it can't be dot EMV, dot text or anything like that.
It's got to be exactly dot EMV, otherwise it doesn't find it.
So that's that's the rule.
And now that I've done that, up comes a new empty file called dot EMV.
And what I'm going to put in here is very simple.
And of course this is all laid out in the in the readme.
But I'm going to put in this file just open AI underscore API underscore key equals.
And now I put in here the key itself that that I have hopefully stored very safely from the last video.
And it begins scmproj dash blah blah blah.
Put that in the file and don't have any.
Don't have a space before the equals sign or after the equals sign.
And there's one other like really unpleasant.
Gotcha.
If you've if you use the notebook on the notes application on Mac, I use that a lot.
Sometimes if you paste something in there and then press enter and copy it out, it replaces hyphens
with long dashes if you're not careful.
So just make sure that that whatever.
If you haven't copied it straight from that website, that nothing has got mangled in your key.
That was a really hard problem.
That it took me a while to track down that one student had, but maybe it's just a rare situation that
that happens.
But anyways, if you've been careful, we've got the key just like this.
You've got the full key laid out there, and then you press, as it says on the on the bottom of the
screen on a mac, command O or control O to save, and X gets out of it.
Now there's one thing to look out for.
If I do an LHS, you'll see that there isn't a EMV file here, and you'll also not see one when we look
in JupyterLab.
And the reason is because any file that begins with a dot.
A mac considers to be a hidden file, a secret file, and if you want to see that, you'd have to do
ls minus A, and then you see all of the hidden files, and you'll now see included.
On the bottom left there is EMV.
And if I want to see what contents that has.
You'll see that it has the OpenAI API key.
And of course in your case hopefully you have a full key in there.
So that's it.
That's the Mac version.
Let's look on a PC.
Let me flip over to my emulator of PCs over here.
Here we have it.
So on a PC the thing to use is the program called notepad.
And you can press the windows and R to run and then type notepad and press okay.
And up comes notepad.
Uh, in this notepad we say open AI underscore API underscore key equals.
And then you paste in your key which should start scmproj dash blah blah blah blah blah.
That should go in here.
And then you go file and you go save as.
Now you then will have to navigate around to find your way to the LM engineering folder, which I've
already got set up right here.
And now.
There's like a little gotcha here, a little trick.
You have to know where it says save as type.
You have to change that to be all files.
And now in here you can type dot EMV.
And I will save this right now.
And that should be done.
Exit.
And now back over here.
If I do an LZ we do see that there is a dot EMV and it doesn't have any nasty name to it.
So that has been created successfully and that is the final step.
We are now finally ready to actually go and do a lab.
Congratulations!
I guess I should hold the congratulations until you see it working in the lab, but tentative.
Congratulations on getting it this far and I can't wait to see you for the next video.
When we're actually going to do something.
See you there.