Member Login - User Registration - Set as Homepage - Add to Favorites - Website Map GenAI Essentials – Full Course for Beginners - Ep198!

GenAI Essentials – Full Course for Beginners - Ep198

Time: 2025-07-11 11:37:28 Source: Codora.ai Author: php Reading: 493 times
what's going on ai for content creatorshere so theidea is that we have uh PG Vector storeright and we have some sample documentsand so in here we have sometext um here I'm not sure I guess whatit's saying is that it's just randomlycreating the embedding so this is notthe real embedding but if we were tostore this in the database we'd actuallyneed an embedding Library so I guesswhat they're saying here is like this isthe text representation and this is theembeddingexample right um and then down belowhere you can see it's we're adding thedocuments and it says MPR random 3842list so replace with a real queryembedding okay and then doing asimilarity search and stuff like that somaybe there is a real embedding weingcan we use a real opsource uh uhembeddinglibrary because it's not really doingrealembeddings so here's talking about allminiuh L L6 V2 let's go take a look at thatbefore we go use it oh it's by sentenceTransformers okay so that's what I wasthinking that maybe something likesentence Transformers would be a usecase that we could utilize so we'll goahead over here I'm going to scroll upand we will place in sentenceTransformers whoops that's not what wewant we'll go back over to here to ourcode and we'll grab sentenceTransformers and then we will paste itin here assuch um then we'll go back over to hereand so now I'm just carefully looking atwhat it's changed so here it's passingthe modelname I guess the code looks more or lessthesame so grabthis looks like it added a lot moredocumentation I'm not surewhy um but here we seemodel so s Transformer is being loadedand then we're doing model and codeusing that particular model so it'sdoing that great and so then in here Iimagine that we might see some of thathere as well so we'll go downbelow um oh it actually updated the uhVectorstore so that's good like the connectionstring was not correct before and we'llgo down here we're getting differentkinds of data to insert which is totallyfine so we'll go ahead and paste this inhere and so now we have a bunch of textwe have Associated metadata with eachtext and so we're saying add the textand so it did create a new function uphere and so inhere it's going to encode each one andreturn back the documents and theninsert the documents for us so they'vekind of they've definitely refactoredthis in another way so instead of adddocuments they renamed to add text Idon't know why they renamed it and thenwe have our similarity search so let'sgo ahead and run this and then we'll runthat um um oh right right right we'll goall the way to the top so we'll go tothe top and actually we need to uhinstall sentence Transformers so let'sgo back over to sentence Transformersand grab this here and then we'll runthis great that we actually got to usesentence Transformers for embeddings sobecause we we talked about it beforeespert earlier in that that part of thevideo but I wasn't sure if we'd actuallyget to utilize it in this kind of mannerso we'll wait for this to finishinstalling there we go and then we'll goahead and runthis uh it's like highlighting as ifit's not utilizing it but hopefully itdoes we'll go ahead and runthis and then we'll runthis and there we go and so we've done asimilarity search we've used postgressas a vector store um postgress is okayearly on uh in terms of production youprobably don't want to use post grassbut again it depends on the scope ofyour project so it's up to you to figurethat outthat is our postgress example with PGVectorstore there wego and I will see you in the next oneokay[Music]ciao hey this is Andrew Brown I want totake a look at Ser API as this issomething that will be commonly used tosearch out to the internet and you willsee Sur there's another competing uh oneso there's like Ser versus Ser APIversusuh was it talvi talvi yeah that's theother one um so I honestly don't rarelyI rarely ever use these apis directlybut I'm sure we can figure it out solet's go jump into it uh do we have tosign up to utilize this let's go over topricing I mean there's a free tier solet's go ahead and sign up and I'm goingjust connect with my GitHub account hereactually I'm going to connect withGoogle because it'll beeasier github's going to make it a lotmore work for me here today and let'ssee if we can go utilize their API so wesuccessfully signed in with Google freeplan includes 100 searches per monthnon-commercial use only uh for freeplans you need to verify your accountcheck your inbox and verify your emailverify your phonenumber okay so I'm going to go ahead anddo that so I'll be back in just a momentall right so I've confirmed both we'regoing to go ahead and hit subscribe nowand so that should bring us into hereand so we have our account there's avery old photo of me but that's totallyokay and wow oh wow is there a lot ofdocumentation but um I already have anenvironment uh or developer environmentopen here in GitHubGitHub code spaces for our genEssentials I'm going to make a newfolder here called SerAPI and I'm going to just continue onwith using uh ironpythonipnb okay and so we should I no that'snot right it's IPipy iron python Jupiter notebook the Yis for Jupiter which is to me silly umso we have an API key here um I need tolearn how to start working this we'lltake take a look at the playground I'mnot sure if there's anything interestinghere I mean that's kind of cool uh butwhat I want to find out is how toprogrammatically work with thisso where is the Sur APISDK okay so here's anexampleum so it seems like that's a rubyexample I love Ruby but uh let's goswitch over toPython and so here we go all rightso we will go close this out that's mypersonal email uh we'll goand add Ser so say pip installSur API and then we'll also get python.EnV

(Editor in charge: java)

Related content
  • Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep106
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep94
  • XRP Ripple LIVE Senate Brad Garlinghouse - FROM WALL STREET TO WEB3 - Martyn Lucas Investor - Ep21
  • Web3 Developer in 2024 Roadmap_ Solidity, Smart Contract, and Blockchain Development [Full Course] - Ep1
  • Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep81
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep15
  • Web3 Developer in 2024 Roadmap_ Solidity, Smart Contract, and Blockchain Development [Full Course] - Ep47
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep12
Recommended content
  • XRP Ripple LIVE Senate Brad Garlinghouse - FROM WALL STREET TO WEB3 - Martyn Lucas Investor - Ep5
  • Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep16
  • Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep46
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep182
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep233
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep35