GenAI Essentials – Full Course for Beginners - Ep151
Time: 2025-07-11 11:49:20 Source: Codora.ai Author: cpp Reading: 835 times
this ishow we're going to initialize the clientor this is startup and aihow I prefer to initializethe client going to go ahead and do thatwhat's interesting is I don'tsee the client being called anywherehere at least not yet so I'm justcarefully looking throughhere so I see open AI here and it'susing the old the old information thatdoesn't look new at all so it looks likethe open AI API you areusing is old because that's not what itlooks likenow let's see if it can figure outwhat's wrong here definitely isincorrect okay and then we'll go downand let's go take a lookhereokay it's not using GPT 40mini let's tell that maybe he doesn'tknow about itit's interesting that I'm paying forthis and it's wrong I don't know it's abit frustrating but it's saying gp4that's not that's still not right butthat's okay so I'm going to go ahead andjust copy this part of thecontent I don't feel like uh replacingthe the top part here so I just don'twant to have problems with that so we'llgo back over to our file here I'm goingto go and grab this and it's notproducing the latest code it's a bitfrustrating so we'll go ahead and pasteit in here as such but that's okaybecause we have our own over here on theleft hand side so we'll go or right handside so we'll copy this part and I knowI want to bring this in here I'm notsure why it has chat histories now butit seemed to have made some revisionshere um also the Styles have greatlyreduced again not sure why that changedbut whatever so we'll go down here andthe API looks a little bitbetter but we want to use um40 mini which is over here so I'm goingto go ahead and copythat I'm not sure if it's going to needa Max tokens the other one has Maxtokens so I'm just going to save myselfsome trouble and bring thatover okay again not sure if we reallyneed it like if it's maybe there's likea default I'm notsure and I really really hate for spaceindentation but we're going to just livewith it in this video here um hereobviously they have like a try around itand this one doesn't so I mean it shouldbe no surprised that open AI can writebetter or sorry chat GPT can writebetter open AI code as that would beexpected uh but the question is willthis work right so here we have the divmessage user message do have assistantand then it hasCLS I'm not sure what CLS stands for butobviously this does something we couldjust look these uphere oh these are all HTM h X okay aturbo allows you to specify that somecontent in a response should be swappedinto the Dom somewhere else out of bandokay so that'd be really interesting tosee if this worksum but to me like the code just doesn'tlook very good so I'm not confidentabout the code that's here but that'sokay we're going to make our way over touh openaai and we're going to goover here to the theum thelogin and nope that's not what I wantedI want to get overto the APIlogin and so from here I need togenerate out a newtoken I actually already have a projectcalled Fast HTML I must have created itearlier if you don't have you just gocreate one there it's not a big dealthen once we have our project we'regoing to manage our projects I'm goingto go over to oh show me projects herewe go so I've already created thisproject before just go create it andname it if you don't have an open AIaccount go create one they have a freetier if you if the free tier is gonethen you'll just have to watch here butwe'll learn as we go here so I'm goingto go ahead and paste this into theproject here and then the next thingwe'll do is go over to General I'm goingto grab my or IDand I'm going to paste that in here assuch and then I need my open API key sohere I have open API key I've alreadycreated one previously as you see I madeone attempt herebefore I think what happened is I forgotto unpause thevideo going to call fast HTML fast HTMLwe'll give it all permissions here wehave our key we'll bring this back overup tohere we'll paste it in save it I'm goingto scroll up here we're going to go toover the terminal I'm going to stop theserver we need to do another pip installour requirements and so this is all setup whether it works as a differentstory so do pythonmain.py so I thought maybe like fast htlwould have some kind of more Magic onthe front end but it's just using um HTMX okay so here it has hello world Ithink the reason why it's doing that isbecause I did not specify chat so we'regoing to go here and change this over tochat let's see if this loads nope wehave an issue here did you mean open AIlet's go take a look at our codehere um I think our import'sincorrect so I'm looking at our previousexample fromstreamlet and we'll paste that in assuch now we don't have any errors it'sopening on Port5001 soit's weird that like this is a textfield but we'll go down here so hello umcanyou hello uh can you teach uh teach metop 10 Japanese verbs let's see if thatworks here we're going to go ahead andandsend and I see nothing working here I'mgoing to go down below it looks like Igot it came back okay so I just wasimpatient there and it actually did workthis is kind of I guess this is fine Ithought for some for some reason I couldlike type in text in here but I guessnot of course here here are the mostused verbs along with their meanings andexamples one thing I might want to do islike uh you know is there a way dependsif that actually comes back is markdowndoes this come back as markdown let mego back here and take alook uh is there a way
(Editor in charge: rust)
Latest content
- ·GenAI Essentials – Full Course for Beginners - Ep84
- ·Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep26
- ·One On One Interview With Abisoye Bello _ Host_ Patricia Nkwane - Ep3
- ·The Basics of Web3 - Ep10
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep57
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep243
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep209
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep60
- ·Web3 Developer in 2024 Roadmap_ Solidity, Smart Contract, and Blockchain Development [Full Course] - Ep59
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep142
Hot content
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep250
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep153
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep245
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep48
- ·GenAI Essentials – Full Course for Beginners - Ep7
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep246
- ·Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep29
- ·XRP Ripple LIVE Senate Brad Garlinghouse - FROM WALL STREET TO WEB3 - Martyn Lucas Investor - Ep18
- ·Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep55
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep145