-: Hey, let me walk you through the GPT store.
So now I'll walk you through how to build a custom GPT
and why you might want to do that, as well as
what the benefits are for doing it.
So GPTs is the app store essentially, but for AI.
So OpenAI has been trying to get more
and more people to build these
and you have some really big names that are built,
stuff like Canva,
and then you have some of the official ones by ChatGPT,
like there's the Dall-E, the data analyst one, et cetera.
But then there's a lot that other people have made,
as you can have a look through these.
One particularly interesting one is Grimoire, which is one
of the popular ones that wasn't built by the ChatGPT team.
It's supposed to be really good for programming.
You can click into any of these,
like if we specifically wanted to see this, we can see
how many conversations it's had and the ratings.
You can click start chat.
You can say, yeah, here we go.
I want to create my first chat.
And what it does is it has a bunch of different things
that it can do in the background.
Basically anything ChatGPT can do, it can do too,
but it gives the creator full control over the custom
prompts that it uses in the background.
It can also write code, it can generate images,
it can take in images as well for vision,
but it can do some cool stuff with function calling as well.
I'm gonna show you an example there, so you can see
that this guy is coded up and away.
It's gonna start with, you know,
I guess a bit more of information.
It's sort of things that you wouldn't normally get from
ChatGPT or one of the things he's implemented here is he is
told it to always use hotkeys
and then to do what the user says, if you do,
if it does get a responses, N right,
it's he's recommending different tools like Netlify,
et cetera, and then giving you next steps.
Cool, so that is an example of a GPT.
Now I built a GPT, which is JokeGPT,
trying to get it to tell funny jokes.
So I'll show you an example of that.
Just click tell me a joke
and you can see it starting an action.
I'll explain why it does that later.
This is actually one issue that I have
for GTS in general, but here we go.
Let's see how it does with the joke.
Man dating nowadays is trying to download a movie in 1999,
you wait forever, it's never what was
advertised and you end up with a virus.
Okay, so that is not the sort of joke
that you normally get from ChatGPT.
So just to say here, tell me a joke.
It's pretty bad at jokes, right?
Like it doesn't want to tell anything interesting.
Actually you can see they're probably doing some prompt
prewriting in the background.
Here's a lighthearted joke for you, okay?
This is one of the favorites, right?
Why don't scientists trust atoms?
Because they make up everything.
If you ask ChatGPT to tell me a joke a hundred times,
I think something like
90% of the jokes will be one of 25 jokes.
And this is actually the most popular one that it tells.
So I wanted to get it to tell better jokes
and also I wanted to be able to tell jokes
that like are actually funny and not PC
and in the style of different comedians as well.
So tell me a joke in the style
Dave Chappelle about vegans.
So see what comes back with,
one of the things I find if you do normal ChatGPT,
when you ask it to do stuff like this,
it will sometimes refuse, sometimes it will say
that there's no, I'll give you a big
disclaimer at the beginning.
Super annoying because it doesn't want to offend anyone.
But here it actually does a pretty good job.
Man, you ever notice how vegans treat picking a restaurant
Like they're diffusing a bomb.
It's like easy.
Don't rush into anything we need
to consider the salad options, blah, blah, right?
So yeah, it's funny, it's pretty good
and you can keep going with it as well
and just generate as many jokes as you want.
Cool, so how does this work on the backend?
I'm just about to show you that and I'll show you why it's
doing this action thing every time as well.
Here we go.
Maybe this should stop being so delicious.
(man laughs)
Okay, all right, I dunno if you, this is your style
of humor, but you could actually program your
own here with this information.
So I'm gonna go in, I'm gonna go to EditGPT,
this is something I can do because it's my GPT
and I'll show you the internals of what it is.
So you just provide a name in the description,
but then you put some instructions in here.
So this is your system prompt, right?
And you can see that I've got, write an original joke,
you're a standup comedian on stage
and I'm saying
you should match the style of Dave Chappelle.
And I've also said don't use the n word, et cetera.
I've told it you can bleep things out,
right, it's bleeped out here.
You can, and then I have some instructions here, which is
where we're gonna get into why it's
calling an API every time.
So I'm telling you, you must call the clean joke action
every time before delivering the joke to the user.
And the reason I do that is
because this is what the joke actually looks like.
So I've got JokeGPT generating JSON with a comedian,
the disclaimer and then the actual joke.
So it actually generates that,
but then it sends that to an API that I made,
which just gets rid of the comedian and the disclaimer
and only provides the joke back.
If you look, this is the API,
I'm just using Python anywhere.
It's free as long as you refresh it every three months.
And I just used a basic flask.
In fact I asked ChatGPT to code this for me.
So you didn't even really need to know how to code.
But all this does is it takes the,
takes the data and then you name my API key
and then it figures out it gets the joke part
and then it just returns the joke.
I also have it returning a privacy policy
because that's a requirement, for ChatGPT.
So I've just included that in there.
But yeah, I even got ChatGPT
to generate this privacy policy for you.
I'm not a lawyer so no, don't worry.
Now I have a few different prompts in here.
So it gives you an example
of the types of jokes that I want.
So it's, they're not as PC, right?
There's a Ricky Gervais joke
and then I have some angry instructions at the bottom
in caps lock just to make sure
it always calls that clean joke thing.
So what is the clean joke thing?
So first of all, I have web browsing so I could tell it
to a good search for a joke as well.
That's another thing by the way, it can do.
But lemme just click on this.
So this is the schema for my API
and you can see it's a JokeGPT service.
And then there's a path called clean,
and it's called Clean Joke,
that's our operation ID.
And it says that this endpoint allows you
to for submitting a joke for cleaning with comedian's name
and a disclaimer and it's just given an example of
what goes in and what goes out.
But yeah, you can see that it gives a, you know,
it basically describes what my API does,
and this is passed into JokeGPT.
So it knows that this is an action it can do.
And again, this looks really complicated,
but I literally just asked Chat GPT, I said,
here's my API code, can you turn this into OpenAI schema?
And it did a really good job.
Cool, and that is how that works.
And you can see it's a post method.
You can also test it just to check that it works.
That is how you develop it.
One of the recommendations I have here, by the way is
to test and learn what prompts work in the playground first
and then just get that working
before you turn this into a, an actual tool.
The other thing is it does allow you to upload
different things for knowledge,
but it doesn't work that well to be honest.
Like it can only search these things.
It doesn't have, this is a big list of loads of funny jokes.
It doesn't actually have them in context
when it's telling you a joke.
So it can do a search
with these things and I left it in there
because it doesn't hurt anything,
but just know that basically you upload here
that's like not in the prompt.
It's probably not gonna do a great job at.
It's pretty good at things like if you have a company
documentation and you ask it,
can you search the company documentation for X
and then it can do that pretty well.
But that's about it.
The other thing is you want
to turn off things that you're not using.
So I've turned off code interpreter and image generation.
And then also I recommend don't click this create button.
This is an, very meta, it's a basically like a ChatGPT
that creates CustomGPTs.
But I find that whenever I use it, like it starts
to delete crap that I've already put in there.
So I just fill this form in normally.
Cool.
And you can hit save and you can publish just like anything.
Anyway, that is my custom JokeGPT.
One of the real problems I have with it is that it call,
it asks for permission to make the API calls
and it calls the API every time.
I think that's a bit of a pain
and probably why this hasn't got much usage.
But yeah, at the end
of the day this was just made for me to play around.
So yeah, hopefully this helps you
and you build your own custom GPT
and are more successful than what I have done with this one.
Right, hopefully that's useful for you.