Creating Custom GPTs: No-Auth Actions for OpenAI App Store | Complete Guide β
Other Videosπ
2023-11-11
Transcript β
[00:00] welcome back everyone today we're going to be jumping into GPT but this time we're going to be using the actions tab here as you see we have three different options when it comes to authentication as nun API key or oo today we're going to be learning how to do the nun version on top of that I'm going to explain what authentication is in this context what API is in this context so you can start making more complex gbts for this open AI API store that is coming now one thing I want to point out real quick and trust me I don't always do this for all my videos but we' begin to get a lot of new viewers so let me introduce myself
[00:30] my name is Corbin I'm a full stack AI engineer the type of content I do on this channel is I give pragmatic ways to actually leverage AI as a lot of content that I see in this space is very much surface level doesn't really show you actually how to use it and that's kind of the point why I'm here is I'm going to show you real value real ways to start applying AI in your personal or business life so today today's video if I can speak is going to be authentication type and it's going to be for none I plan on making a playlist here and I've probably already made it where we're going to be jumping into another video that's going to go over
[01:00] the API key and another video that's going to go over oo and the reason I'm splitting it up is because of the fact that each one has their own complex ways of approaching I'm going to explain the nuances for none API key and ooth and why you would choose it and overall I'll probably put a playlist up there that essentially just going to be something about gbts we already did two other videos on this topic one video showing you how to create in a private and a public context but for today's video we're going to show you how to Leverage The authentication type of none okay so let's go ahead and jump back over to our gbt's dashboard here we're going to go ahead and create a new gbt here if you
[01:33] see that Tom ai's business we went ahead and showed you how to make gbts based off train data so if you're interested in that video you can check it out in the playlist here but let's go ahead and see if I can click this real quick okay so we're jumped over to our Builder here we're going to go ahead and do two different use cases when it comes to calling upon API with no authentication but let me go to explain what even this is and the process behind it so the reason this exists is this allows us to access data outside of gbt so as you see right now if you weren't going to do any actions we are limited to the ecosystem open AI has which is going to be web
[02:03] browsing delay image generation and code interpreter these are you know obviously have their own specific use cases such as searching the uh internet for most recent data da image create some cool images and code interpreter this is for like a math context this doesn't have to always to do with code but for actions this allows us to access software that's outside of gbt's and open AI ecosystem so for example writing an email in Gmail U maybe publishing a post on Instagram you know doing something on Twitter this is where it can get way more complex and
[02:34] as you know we can provide more value if you plan on adding this to the gbt uh app store or alternatively if you want to have more abilities and capabilities within your own private gbt so knowing this knowing how to leverage uh actions is actually pretty important so let's go Ahad and begin here first thing you want to do is we want to hit add actions here and let me go a and explain a little bit of what's incurring here so first thing we need to understand is that your schema is going to be the code provide in order for it to access the underlying API so for us I get a nice little example here I go to Untitled here and
[03:06] this is kind of like the structuring open AI request here don't worry if it looks confusing we're going to figure it out together um but this is kind of how the structuring works together um when dealing with the type of calls that incur within your app so knowing this or sorry gbt knowing this I'm going to go ahead and just fill in a real quick privacy policy from our website uh this would probably be correlated to whatever the API you're using or the underlying U if you run a business you would want to put your privacy policy here as well so for now I'm just going to put our business website here so what we need to
[03:38] understand about this is a couple things because of the fact that as you see they have identified open AI here um do I have to move let me see if I put myself right here I do not want to cover stuff okay so as you see here we got open AI right here with the version um or and then we get the version over here for the underlying info of the API you're trying to access um first off this is important to unkn know because I am not too sure with in their documentation whether they automatically update this but if an open AI does incur a future update you would need to come in here and manually update this um second thing
[04:09] you need to understand is the URLs if you're familiar with web Hooks and how they work essentially this is where we're going to put in our web hook URL so before we even jump into that let me go ahead and just explain what a web Hook is so we can kind of start on a ground level okay so right now I got it generating out so we just have like a nice little thing to look at while I talk about it essentially web hooks have very specific examples in the context of passing software and you got to love it when gbt freezes but um one of the first contexts that we can do with a web hook think of web hooks like uh passing the
[04:41] ball around but each person you pass the ball around is a different software so maybe I'm passing I'm from I'm in Chad gbt right now but I'm passing the ball to Instagram the Instagram person or I'm in gbt right now and I'm passing the ball to Google Drive so this is how you want to think of web hooks let me go aad and regenerate this so we're not just kind of BL blank here um but there is ways in which we can pass this data around which I'll explain if this wants to load all right so as you see here the web hook has a lot of capabilities but the ones that we really have to care about in most context is going to be
[05:12] either post get or delete this I this is how I want you to think of them post is I'm passing data I'm passing the ball get is I'm receiving the ball I'm receiving data from Instagram I'm receiving data from Twitter and then finally delete is deleting uh data either within internally or deleting it outside to another software so now that we kind of get a general idea of how softwares communicate with each other that is where this comes into play so on top of the fact that we're passing data around through these URLs which we'll do today understand the reason that authentication exists so the reason
[05:43] authentication exists is because in some context in order for me to receive or pass that data it requires no type of Authority or uh no type of password there's no key it's like a think of it like a public space I go to a public park I don't need to pay anyone now in the context of an API key this is where it gets a little bit more gatekeeping and same with OA so the way I want to think of an API key is that in order to access that data or in order to receive that data you'll need to create some type of key or some type of you know you know way of proving that you essentially
[06:15] have access or the rights to that data so what do I mean by that yeah in the context of an API key this would be like if I wanted to receive data from Google Maps I would need an API key now just to take a couple steps back don't worry we're going to go in depth and all this so make sure you subscribe here and you check out that playlist as I'm going to show you how to do that but in today's video we don't have to worry about API key we don't and we don't have to worry about oo today we're just going to worry about none and this going is going to give you a good perspective on what this even means and how we can leverage it in the context of a gbt okay so I went ahead and got an API that requires no
[06:46] access token and it generates random uh quotes but instead of me just pasting the code there and then proceeding from there I'm going to actually show you how to use gbt so you can educate yourself and therefore when you try to approach this for whatever Contex you may be approaching it you're not just stuck on a dead end here and trying to you know copy and paste so let me go ahead and show you how to do this we're going to take this schema here we're going to go to command a command C this and we're going to go ahead and start proctoring gbt little here we're going to say we are using or we are building a gbt that allows
[07:18] us to pass data with uh web hooks here is our example structuring we need to abide by do semicolon we'll paste that structuring please let me know if you understand I will now be providing the
[07:50] URL which in this context requires no authentication so the reason I'm identifying that is that's very important you need you need to identify whether it requires authentication or not because the processes for either one is drastically different for now though I know that this URL I'm about to provide here not that one let me going to grab it real quick does not require authentication so there is some use cases here where this is pretty powerful as when you access some URLs that do require authentication there may be some type of usage cost
[08:20] associated with it not with all of them but some for this is completely free so here we go thank you for sharing the structure of your open AI specification it is clear you're aiming to create an API okay perfect okay we want to do an action where when we call upon this schema we receive a random quote I'm going to go ahead and just provide the schema again and let's see what it comes up with so as you see this
[08:51] is the power of underlying chbt here so this is a lot of code I could have Rock U hardcoded myself and typed out but you know I don't feel like it today so we're going to go let Chad gbt do this plus this is going to really help you out if you're not familiar at all of coding this is going to be extremely important as what it's doing here is it's giving me an overall structuring of how to approach this and as you see here it's obviously not using the correct one right here but what we're going to do here is we're going to make sure that it uses the correct one here so what I'm going to do is I'm going to tell it to read the documentation here and make
[09:22] sure that we are being very specific on the way we're approaching this code okay so as you see here I went ahead and made sure to ask it to make it specific to this API call here so you might be asking yourself right after bat okay what is that link typically with any type of documentation when it comes to API they'll have a master link like this so for this it's just very simply you know presented like this um and then from here though what we can do is is see what's coming out this generation again but it was wrong again the reason it was wrong is because it was giving me yourdomain.com I made it very clear that actually we want to make sure that we're pointing to this one and then as you see
[09:53] here we got the entire output right here let's go ahead and copy this bring it over to our gbt and see see what it can do so I'm going to go ahead and paste it in here see if there's any errors okay so far so good no errors um as you see here the action is called get random quote on top of that I want to point out the um underlying available actions notice how it says it's plural what this means is that we're able to set up gbts that can do multiple actions within an API context of receiving data
[10:24] so that's cool to know in this video we're just going to do you know our one action here of random quote but in theory we could have multiple actions here notice how I said earlier all the different functions of a web hook such as post get delete we have our first method here which is get so what are we do in this context we're receiving data so this specific context we're receiving a random quote knowing this we got our privacy policy here authentication can stay at none and I'm going to go ahead and just start off by doing only me here can't confirm yet because actually need to configure a little bit so let's come over to GPT Builder here we're going to
[10:55] say the purpose and I'm going to go ahead and move myself W all right the purpose of this uh gbt and actually I forgot one thing y'all make sure when you do this you go and come over here and you copy the available actions this how we're going to reference it in the front end okay so the purpose of this gbt is to give us a random quote use this action to do so and I'm
[11:30] going to go and paste the exact name of the action that we just created there this is going to ensure that gbt knows to call upon that action if you're familiar with this channel we've done tutorials with zapier and plugins and you'll know that when we do zapier automations in the context of CAD gbt we have to call upon the specific action in order for to work same thing applies here so it's updating it knows that basically its purpose is to give me a Rand quote and on top of that it's going to use that specific action we just created you through an API with no off knowing this um can we get a a profile
[12:01] picture here can I get a profile pitch let's see what it comes up with all right so we got a super dope profile picture here we're going to say can we also name it quote uh quote maker enter here again let's get a name here and then let's go and save it and we're going to go and test in the front end so just to show to you and prove to you that this is not accessing the internet when it's giving my answer I'm going to go and turn off web browsing here that can stay on I'm going to go ahead and publish this for only me sorry y'all you cannot get the quote um I'm going to go
[12:33] ahead and just say can I get a random quote and then in theory this should hit our action here we should see it accessing the underlying API we just connected here it does so the way they structure this is that they're going to have decline always allow allow this is important for you to know what this can do in the future or it can do now it just requires a little bit more complex work is in theory I can set up a payment process here I could set up some really complex flows that basically require you to say allow and then we can kind of proceed from there but it's always always cool that you can always do always allow so it doesn't keep repr proctoring I going to say allow here and as you see we are talking to that underl
[13:04] API here and let's see our response we did get an err so let me gohe and check and make sure I did it correctly okay y'all this is super important and it's actually really good I caught this live we actually do need to enable web browsing not because we're searching the internet for the quote and whatever the you know the output is we're actually doing it so we can just send this to the internet as a web hook like that's crazy I honestly it makes a lot of sense I'm glad I caught it live here because there's probably a ton of people that are trying to develop gbts and are
[13:35] getting super frustrated that's important enable web browsing so let's go to see this on the live front end I'm going to jump over there right now I'm going to go ahead and confirm this again and let's just go ahead and just see it live okay so we're over in the front end here can I get a random quote come on baby show me the money let's go this should work here all we're going to hit allow here and we should get our quote here granted this is a very simple use casee I know but this is just giving you an idea of how this is going to communicate also take note it's right
[14:06] now making it so it shows talking to API quotable doio therefore any type of API you access in the context of gbts it will show you the exact root domain which isn't a bad thing but just for reference understand that also one other thing I want you to know is that if I click this um it shows what the potential request body is that's important to know last thing here is that you know we got a nice quote here uh he is taught to live upon little owes more to his father's wisdom than he who has a great deal left him him does to
[14:36] his father's care I cannot speak okay one thing I want to show you if you're debugging and you're running into issues try this um can you show me the Json payload for this action in theory I would say this can you show me the Json payload for the air that happened I'm not going to say here because there's no air but that Json payload that is basically our way of saying if there's an error what did it say in the code that was you know what
[15:07] was bad that happened basically here as you see nothing bad happened the Json playload was correct and we got the relevant information but in theory if you do have an issue with your code or with your pay or the API not working that is a good quick little tip there where it will actually show you the payload and then the payloads typically are correlated with errors such as bad request for one50 if you don't know what those mean you can just ask Chad GBC to help you further um also let me know in the comments down below if you there's something very specific you want to talk to me or want me to talk tell you about
[15:38] when it comes to API and these kind of functions as I know this is a little complex but Ian we can do a lot of cool stuff with it so I was going to do another example of this but due to the fact that noo is not that nuanced in this context I kind of wanted to leave it here but what I will tell you though understand a sh I'll point this out real quick to let me just move over here um if you don't want supposedly open AIA claims that if you don't want your data to be you know used in their training you can go ahead and uncheck this box right here so that's really nice to know but this kind of goes over noo this is
[16:09] how noo Works um if you want more tutorials on this topic make sure to subscribe here check out that playlist I know basically we're the only Channel doing this right now I'm getting a ton of momentum from this content ton of people want this um I've read the comments I see that we also W a video on zapier's new AI task so I'm going to do a video on that I'm going to show you how to integrate that also we're going to be jumping into for the authentication versions so the API key and the ooth I'll probably make them a little bit longer the reason I made this one kind of short and brief is I
[16:39] kind of wanted to give people uh just an idea of what even is authentication what even is uh custom action like this um on top of that uh there's it's very limited um in the context of releasing a public app here I don't really see the noof API being that very fundamental providing value I mean in theory we could have done a quote maker with just Chad DBT itself right but that just kind of showed you the code uh knowing that the API keys and the OA is going to be a pretty big tutorial here so make sure you stay tuned for that if you like what you saw in today's video make sure to leave a like um for the value you got
[17:11] and yeah without further Ado I'll see you in the next video thanks for tuning in and yes surprise I'm an AI Avatar make sure to explore more here at Corbin AI where we demystify AI for your personal and business life until next time