And now an exercise for you.
You've just hopefully gone in and run this for other web pages, and you've maybe tried tweaking it
for a different business purpose.
The exercise is now to come in here and see if you can make your own message to GPT from scratch.
So first of all, write a simple system prompt.
Now you should think about something completely different to do here, perhaps still related to to summarizing
information.
So as an example, you might want to summarize the contents of an email.
Or perhaps you might want to take an email and come up with a nice subject, a possible subject for
that email that might be an example of a business task.
So in the system prompt here, describe the task that you want it to do in the user prompt.
You'll want to put in here the contents of the email or the thing to be translated or whatever the is
going to be the prompt with the instruction.
Then you now have to do some typing, just like I did some typing.
It's your turn to do some typing.
Replace this messages equals you're going to want to put in here something which will describe your
messages to OpenAI.
So this is going to be a place where you're going to put in a list of dictionaries, two dictionaries.
And it's going to have some things in it like role and content, and cursor is determined to fill it
in for me.
But don't cheat.
Uh, try and see if you can't do it yourself and then cheat if you can't.
Of course, it's always good to use AI tools.
It's not cheating in the least.
And then you have to uncomment this line and have response equals and type in the the the command that
you're going to give, which I'll tell you very quickly, is OpenAI create.
And you pass in the model name and the messages, and then you're going to print the result.
And the result will be this word response .0. content.
And always look back up in this code and copy and paste to get that example.
And when you've done that you should find that that works.
And if you've built something like something that can give you the subject of an email or something
else, then please consider doing a PR.
The instructions are in the in the guide so that I can get to see it myself.
And I can share in your joy of your first commercial call to an LLM.
And then finally, there's this extra exercise I mentioned for people that are pros, people that already
know this stuff.
You'll be aware that, as I say, my my way of web scraping is super simplistic, but you could use
selenium or playwright or something similar to do proper web scraping with a web page that gets rendered
in the browser, and you'll see that other people have done that.
There's a playwright version there.
I know that there's several selenium versions.
You could look at how other students have done it.
But first, if you know this stuff, if you've used selenium or playwright before, have a shot at doing
it yourself as well to build a more industrial strength.
Web page summarizer.
And then afterwards, as I say one more time, please do consider sharing your code.
The guide will tell you how to do it.
Submit a PR.
I will gladly review it and I'd love to include it in the community contributions with 1 or 2 other
people that have done this too.
Okay, so with that, that's your mission.
Enjoy it.
Fill this in.
If if you if you find that you're struggling with it, please don't worry.
We're going to be doing this so many times over the next eight weeks that's going to become second nature.
Give it a shot.
Give it your best crack.
And if you can't get it this time, don't worry.
We'll be coming back to this tomorrow.
Wow.
You're probably thinking, whoa, this if this is if this day is what every day is like, this course
is going to go on forever.
No, today was a big, big day.
And it's longer than most of our days will be.
You've got through a ton of material.
You've made your first request to an LLM, and I'm hoping that you've also adapted it for a different
commercial task.
And maybe you've even submitted a PR.
So much has got done and and it's just just a great start.
Your environment is built and ready for prime time.
And tomorrow we're going to start getting a little bit deeper.
But already, even though your journey just started, your 2.5% of the way along your journey to the
to the path of being 100% a master of LM engineering.
You've already used a llama to run a model locally on your box.
Perhaps several models.
Seems like an age ago that we did that.
But we did that.
You've written code that calls OpenAI's frontier models.
You know the difference between a system prompt and a user prompt.
And you've built summarization.
You know how to apply to commercial problems.
Maybe you've built a couple yourself.
Tomorrow is going to be a little bit of a breather.
It's going to be an easier day, I promise.
We're going to talk about the steps it takes between now and being a master of LM engineering.
I'm going to set you up for success.
We're going to talk through some of the top frontier models out there, and we'll also do a little bit
of a dig into Olama and using Olama locally.
I kind of repeat of that lab, but using Olama locally on on our own computers, people that didn't
want to to get OpenAI.
That's your chance to use Olama instead.
So I'm super excited to see you on day two.
You survived all of day one that by far the biggest day of the whole course.
So tomorrow much gentler.
Can't wait.
See you then.