Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep45
2025-07-11 11:51:31 [c] Source: ByteGenius
this I'mextracting a value of this particularkey you you can ai programming pythonsee over here let meshow you so this is what this is mydictionary now on top of this dictionaryif I will call this get method now uh byusing this uh key so get and over herewhat I will do I'm going to write it onthe key so the key name is what locationuncore origin now over here see if I'mgoing to run it now you will find outthis Delhi so this is my origin and hereyou will find out the destinationsimilarly I can get the destination alsonow it's not a big deal see now overhere I can call this a destination whyI'm doing it entire thing will be clearand I will give you the quick revisionalso just wait for some time just waitfor more 5 minute everything will befine so Delhi is there Delhi and Bombayis there so here we have origin anddestination now we got both origin anddestination right so parameter is uh weare able to get a parameter we are ableto get origin and destination now let'stry to find out the flight detail rightso let's try to fly find out the Fflight detail so for that basically whatI'm going to do here I'm going to callone uh so here I'm going to call onemethod that is a a right so what this awill do so here actually I'm going topass the name so let me show you thisparticular value what is happening overhere so just a wait let me copy andpaste over here so this is what this isthe name this name is what this is thefunction name get flight informationright now I'm giving this uh functionname uh this uh function name this GLget flight info which is a string as ofnow let me show you the type of thisfunction over here so over here what I'mgoing to do here I'm going to write itdown type of this function so this typeof the function is nothing it's a stringonly so let me uh keep it inside thebracket so this is what this is a stringnow if I'm passing this thing to my evalfunction eval method so you will get theactual function this eval is doingnothing this EV is giving you the actualvalue that's it this is what this is thefunction now we have defined get flightinformation it will give you the actualvalue that's it so here you can see itis giving me the function only this iswhat this is my function this get flightinfo is what it's a function now it'snot a string we have already defined itover here see this one so this is doingnothing it is just giving me actualvalue okay now let me show you oneexample very basic example let's say ifI'm going to write down and here if I'mgoing to write down two now tell me whatis this two if I'm going to write downlike this uh type and here I'm going towrite it down two just tell me what isthis it's a string but two is a stringno it's aninteger right it's a integer so if I'mI'm going to write it down like this nowif I'm passing to my so it will providean integer see this is what this is aninteger if you check with the type sotype the type will be an integer only soit is converting whatever value we arepassing into the well method now it isconverting into a original format into aoriginal form so here we are getting afunction so this is what this is myfunction which I collected over here nowI just need to call this particularfunction so here I'm going to call thisfunction now after calling thisparticular function I will be get seehere I'm going to pass the parameterkeyword argument keyword par like thisthis particular parameter params thisone okay location origin and locationdestination this two thing we want overhere this one right now once I will runit so here I will be getting my detailsso let me run it first of all uh whereis a perms here is a perms and here iswhat here is my flight details so namedate time is not defined let me Definethe date time overhere so from date time on of date timeimport date time and it is done I thinknow let me runit time Delta is not defined let mecheck what all import statement is therejust await time Delta also we can import fromhere itself so this is going to be atime Delta great now let me run it andover here you will find out a detail seeso actually what we are going to do uhthis function actually uh you can thinkit's a it is working as a API got it nowhere what we are going to do so we areextracting a information from the uhlike whatever prompt and all we arepassing now so from there basically weare extracting an information and we arecollecting a detail of the flight okayfrom U like this is the responseactually see first what I did I defineda function this is what this is myfunctionthis is what this is my function rightafter that we are calling the uh afterthat we are hitting to the uh like modelby by using this open API now afterhitting it so actually whenever we arechecking with a response so in argumentactually in a function argument we havethis two thing now by using this twothing now what we are going to do so weare uh like extrating the informationfrom here so as of now this is thisfunction actually you can think it's myAPI but you can call actual API by usingthis particular information that is whatI'm doing over here just just think overhere that is what I'm doing so now whatI did what I got tell me guys so I Icollected the information whatever see IDefine the thing inside my functioninside this particular function okaythis one this is the value this is thelike parameter which I defined now I uhI like called my model I called my openAPI and it is hitting the
(Editor: c)
Related content
GenAI Essentials – Full Course for Beginners - Ep62
Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep46
Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep66
Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep170
Artificial Intelligence Full Course _ Artificial Intelligence Tutorial for Beginners _ Edureka - Ep37
- Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep42
- Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep20
- Harvard CS50’s Artificial Intelligence with Python – Full University Course - Ep103
- [Hindi (auto-generated)] Machine Learning FULL Course with Practical (10 HOURS) _ Learn Free ML in 2025 _ Part-1 - Ep46
- Getting started with Web3 in 2025 _ Deep Dive Explainer - Ep5
- Harvard CS50’s Artificial Intelligence with Python – Full University Course - Ep104
- Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep229
- Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep198
Recommended articles
-
that there are stake tokens sowe'll check that the length is a greaterthan zero here if not we'll ju ...[Details]
-
Harvard CS50’s Artificial Intelligence with Python – Full University Course - Ep22
the fact that it is rainingand so p is going to repres be a symbolthat represents that idea and Q fo ...[Details]
-
whenever the road type is flatyou'll get fast right now the entropy ofthe right hand side is zero en ...[Details]
-
Harvard CS50’s Artificial Intelligence with Python – Full University Course - Ep33
is also true sothis is one way to turn an implicationinto just a statement about or inaddition to el ...[Details]
-
Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep154
going to go ah there was anissue we now have a staging test thatlooks really good here let's try thi ...[Details]
-
PPT and all each and everythingwill be there in a uh resource sectionso from there you can download ...[Details]
-
you will provide your data in termsof chunks what you will do tell me youwill provide your data in t ...[Details]
-
actually now what I will doafter doing this thing uh I have shownyou the chunks and all now let me s ...[Details]
-
GenAI Essentials – Full Course for Beginners - Ep138
our chat hereand um I don't expect it to work withDolly but if it does that would bereally great sou ...[Details]
-
youdon't need to worry about for the HTMLcode so this thing actually you candownload from the intern ...[Details]
Hot reading
Random content
Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep265
- Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep94
- Record turnout in South Korea election after failed martial law bid _ BBC News - Ep2
- Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep62
- Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep239
- The Basics of Web3 - Ep1
- [Hindi (auto-generated)] Machine Learning FULL Course with Practical (10 HOURS) _ Learn Free ML in 2025 _ Part-1 - Ep30
- Harvard CS50’s Artificial Intelligence with Python – Full University Course - Ep73