This is How Professionals Use ChatGPT (Advanced Course)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today we will take chargeipity to the next level you will learn step by step how to build your own customized version of charging PT by combining the power of python scripting with Advanced charge EPT prompts this will help you do things you never thought about even GPT 4 and the latest charge epd plugins can do this free course is designed in a way that total beginners can follow up and advanced users can learn something new so it's for anyone who wants to take their skills the next level this course is divided into two main parts in part one we will learn python scripting in a new way you will see in a few minutes you'll become a python developer and in part two we will apply scripting with Advanced prompts to build a real world example something that will blow your mind the course has time stamps so you can jump between such questions but I prefer not to skip anything even if you already know some Concepts please some patients stick with the course because I will share with you a lot of tips and tricks that will save you a lot of time achieving a lot of tasks before we dive in maybe you are wondering why should I learn python coding or scripting and charge EPT and language models can do this now you can ask charging to write a python script and we'll do this in seconds so why you should learn this I think there are two simple reasons to do this number one is even though charge EPT can write python code or any programming language and maybe in the near future it will become better than many programmers if you want to use this code and your own applications or to do something you need to understand it so this is why you need to learn basic python scripting to understand the codes at least the second reason is by learning this skill you will notice a mind shift that will help you see a lot of opportunities to develop a lot of things you never thought about before this skill will help you a lot in different fields even in machine learning and AI in the analysis and building custom Solutions in custom scenarios like in our case building custom charge GPT versions and so on believe me this will help you a lot in your career in your life so I think that's enough let's start with step number one and download the application that allows us to write python code you know we are writing python so we need an application to write python inside and one of the best is Visual Studio code simply go to Google and search for visual studio code and click on the download link here and then simply select your operating system in my case it's Windows just click here download it super simple and install the application I don't want to waste time now just calling the wizard it's simple and then open the application and here we are you will see something like this this is called Visual Studio code the application where we write our Python scripts step number one done step number two we need to install python on our computer on our PC so again go here and search for python download anything and go and go to the first link on Google then simply click on download python if you have Mac OS or Linux or something and change the operating system here in my case it's windows I click on download python I already did this again it's simple just install it just make sure while installing to tick the check box that adds python to environmental variables this will help you save a lot of time make sure to do this and we are ready and to ensure that python is working on your PC just go here to terminal new terminal and simply write python Dash capital V enter and you can see now we have python 3.11 so python is installed and we are ready to start coding and learning python scripting as I mentioned this course is somehow different I structured it in a way to Learn Python as fast as possible to let all the concepts needed in few minutes with the help of chargept and AI let me explain here I am inside chargpt look at this simple prompt I prepared for you I will paste it here you can see here act as a computer science teacher create tutorial for me blah blah blah the language is python the topic is and we have here two empty square brackets so what we can do simply is use this prompt anytime in charge EPT to learn and review any concept and python you want let's say you want to explain and get some examples about variables in Python don't worry now I will tell you what this variables in a little bit but just an example now variable enter and now charging PT will explain the concept for you and give you some examples so anytime if you want to review something you can simply just change the topic here and review it and get the examples directly inside charge EPT I will stop it for now create a new chat and let's start with the first concept in Python scripting which is variables so what is a variable to make things simple for you it's simply like think about it as a box a container that you can put data inside that's it the data can be taxed can be images can be numbers anything any type of data can be put inside this box which is the variable it holds any variable data and this variable in your computer is stored in the memory in the ram let's do a simple example I will go here to visual studio I will click on open folder I will create a new folder Learn Python whatever open and select folder and here we are click now on new file select python file I will save it inside this folder and I will call it app.py py stands for the python extension so click on Save and now we have a file inside our folder and we are ready to start writing python code how to define a variable in Python how to create a variable how to create this box and insert that inside the first step is to give a name to your container to your variable to your box any name you want for example my first box that's it equals what do you want to put inside this box inside this variable for example for now I will put a number like number five we defined a variable that's it let's define a new variable and I will put inside it and other number like my second box is equal to again five that's simple so now we have two containers containing two numbers let's make this six let's define a new variable and now I will put inside it some text my third box is equal and to add text now we can't simply write the text like this we need to put inside a code and now we have a third variable with text inside it's that simple usually we give friendly names for our variables to understand what's inside it so here I will say my first number and here I will say my second number and here I will say my name in this way the variable will point you what's inside it a number text a name anything I tried my best to explain the ID and the easiest way I can so this is the first concept in the programming which is variables now this variable can hold one thing in our case one number or one tax what if you want to build a big box of variables containing multiple numbers or multiple texts or multiple names whatever multiple things in Python we have something called a list so let's define a list let's create a list but this time I will use the help of Judge PT I want to teach you how to fish How to Learn Python so I will open charge Equity again I will write this simple comment and I will go here and say lists the topic is lists enter just wait a little bit now and charge GPT will be your AI teacher a list is a collection of values stored in a single variable so it's a variable that holds multiple values and this is how you can define a list let's get it I will copy this code copy go here and paste it so this is how you can define a list I will call it list of numbers so this is a list of numbers containing multiple numbers I will copy the same now and say list of names and now I will change this to text so in this way we have one list containing multiple values multiple tags we call text in programming strings so this is a string this is a string and there's a string so you learned now the first two concepts and programming on python which is variables and lists let's now move on to something called conditions or what we call if conditional statements what's a condition it's simply telling your computer or the python script to run a specific code in case the condition is met that's simple I will give you a direct example now with the help of charging PT again let's go back and copy the same prompt paste it and I would say here con conditions enter and here is the basic example of a condition statement I will copy it I will go here I will paste the same code and you can see we are saying if it's pure English if this variable is called num we don't have it here I will just replace with my own variable if my first number is greater than 0 I will print on the screen so this is the piece of code that we will execute or run if the condition is met right the number is positive else if it's not greater than 0 right is negative I will delete everything for now I will keep only this piece of code and now if I execute it must try the number is positive because the variable is positive let's test it I will open here a new terminal and simply say to run the code just say Python and the name of the file which is app or app.py app dot py so this is how you can run the python script enter and you can see now it Row the number is positive so this is what we call a conditional statement you just set the condition you add this colon here and you write the code that you want to write or you want to execute or run if the condition is met that concept is done let's move on now to concept number four what we call a loop l-o-oop you see these O's remember a loop is simply repeating a specific piece of code a lot of times maybe three maybe five and maybe one billion times in some cases so how to create a loop in Python let me first show you a weird example I want to print on the screen numbers from 1 to 10. so I can say print one then I will copy the same code print 2 and so on so here I have repeated the same function or the same code 10 times to print numbers from 1 to 10. whenever you see something like this you should think about a loop we can replace this with a simple Loop that counts from 1 to 10. how to create a loop how to write a loop in Python let's see again you can always use chargpt to help you learn python so copy the code again paste it and say here instead of conditions say Loops enter it will Define Loops repeat a block of code multiple times it's that simple so our prompt will give you three examples one easy example one medium example and one somehow hot example it's not very hard but somehow Advanced so the first example of Loops is to Loop inside a list remember list a list containing multiple variables you can do this by saying for name and this list names print name and to print the output like that super simple medium example calculating the sum of numbers inside a list forget about it I want to get this one I will copy I will delete all these weird sentences I will say here delete the variable also and for I in range from 1 to 10 simply print I look at this I will save a new terminal run the code and you can see now it writes from one to nine y nine not ten simply because encoding in Python especially when you run in a Range you are going from the first index or number to the last minus one so if you want to go to 10 we say simply 11 and clear run again and here we are one to ten so we are saying here simply is telling python on our computer to go inside the range from 1 to 11 and print the number I so I is going from one then two then three then four then five and so on we are looping let's do another example I will Define a list of numbers I will say less of numbers is equal to one two three four and five that's simple and now I want a loop inside this list and print the numbers I will say for number and list of numbers simply print number so pretty easy we are saying for each number inside this list just print the number terminal new terminal goal and one to five so I will printed all the values inside this list this concept number four which is Loops let's now move on to concept number five which has functions and methods let's delete everything here I will go back to charge EPT now I will do a small change to this prompt look at this I think you will love it a new chart paste and at the end of this prompt I will add this simple statement and make sure to explain all this for a seven years old child so in this way charging PT will help you learn coding and Python and scripting as if you are a seven years old child I will go here and say functions enter and look now at the example a function is a block of code that performs a specific task we use functions to break up large programs into smaller manageable pieces this makes our code easier to read how to create a function and you can see now explanation for a seven years old a function is like a recipe just like we use a recipe to make our favorite dish we can use a function to perform a specific task in our code you can see now the examples is for little children's so if you are finding something difficult to understand you can simply tell charge APD to explain it as if you are a child and you will see the interesting and funny examples that will help you understand complex topics and easy and simple way so how to create a function I will copy this code go back here and paste it so my explanation what's the function it's simply a piece of code that you can run anywhere in your code so this is a function we say def for Define we are defining a function and this is the name of the function and we add these two parentheses this is how we can create a function and this function simply prints this string or text hello world let me show you this if you open now the terminal and run the script nothing will happen we have a function but we didn't use it to use it we just we just simply copy the name of the function like this we call it and now it printed the output let me now combine what we learn in a simple example so close this I will Define a simple function that calculates the sum of two numbers sum and now inside the function we can Define what we call a parameters something that we pass this function we give to this function and the function can use them I will say num1 and num2 so I want to get the sum of number one plus number two and now I will tell this function to calculate the sum I will say sum is equal to num1 plus num2 that's simple you can see how easy it is I think it's very clear we are just calculating the sum using this plus of operation if you want to multiply you can add an asterisk if you want to divide you can divide and so on now I want to get the sum we are using a simple operation and then I will tell the function to return the value so I will say return sum and that's it now we have a function that Returns the sum of any two numbers how we call it we say sum and we pass the numbers we want like 5 and 10. so what's the output let's see if we go here terminal new terminal run the code and nothing why because simply it calculates the value which is 15 the answer but we forgot to print the value on the screen so simply you can say print which is a function by the way built in inside python somewhere and now it will print the sum on again and here we are we have 15. so this is what we call a function we Define a function to use it anywhere in our code we still have only one concept are you tired let's see the last Concept in this mini course mini python course fast course is what we call a model think about a model as a python file like this one python script that holds multiple python functions and you can read this file from any script you want let me show you an example I think it will become very simple so I will go here and create a new file I will call it my model sorry model dot p y and now I will copy this function to this file that's simple now here if we save and go and run the code again it will give you an error this function doesn't exist you see so how to fix this what is the function it is in this file in this model so we go here and we tell python to import our model my model like this as you simply say as and enter your friendly name in my case I will say MD which stands for model and now copy this MD and paste it here and say dot now we are accessing the functions inside our model let me show you this if we say MD dot you will get the sum function you see it's simple now if I run the code terminal run it and here we are we got the value so in this way if you have somehow large applications multiple scripts you can create your own models or import models from other developers like you're seeing a little bit in part two and then you can use all the functionalities inside these models so these are the main concepts of python if you understood this you are ready to start coding you can call yourself a python scripter or a python coder since you reach this part I think you deserve a gift what I did is I packaged a full free python course with examples and some charge epd prompts to help you learn more in an ocean template a free template for you you can simply go to this link on the screen and get your template you'll find a lot of examples to help you learn python easily and don't forget if you have any questions I'll be waiting for you in the comment section below let's now move on to part two but before that I want to answer an important question maybe you are wondering again why I should do this Learn Python and build custom charge EPT versions while charging PT build plugins if you didn't know that chargeipity announced some new plugins where you can now search the web analyze data like by uploading files and connect a lot of services online so chargeupti has a lot of more powerful functionalities why we are learning this and open Ai and charge apt is building plugins I'm sure a lot of people ask me this question even though I'm answering it now I will get this question from some people with weird mentalities so simply the first reason to learn this is open Ai and charging PT can't and it will never handle everything on this planet every single scenario so in order to build your own custom solution to your own custom problem you need to use your own apis your own data and sometimes in some cases you need to use something that charging PT doesn't build a plugin for so you need to learn this the second thing is I think that in the near future when charging paterial is the plug ends we may have a Marketplace for GPT plugins maybe charge a PT or open AI will allow you to create your own plugins and sell them like in WordPress and Shopify and other services where you can build custom plugins and users can use or buy and so on so learning this skill will help you build custom charge epd plugins the third reason is the built-in plug and the charge EPT that will come soon or closed you don't know how they work what they are doing in the back end so maybe the output or the results of these plugins are not good for you you want something better something more accurate some something different again you need to develop your own custom solution to your own custom problem where these plugins can solve and number four and I think it's the most important by learning these skills and these techniques you will change the way you think you're widen your view and this will help you discover new ideas opportunities so please shift your mindset and invest in yourself learning these skills and improving yourself will change your life forever let's now move on to the second part in our course and build something special something mind-blowing so what we will build let me show you the output what you will build now with me if you follow up and then dive in and start scripting and building this custom version of charging PT so this is our custom application for today it's an advanced chargpt version allows you to analyze live crypto prices it's simple we have this one button here if we click on it now it will get live Bitcoin prices and analyze them and will give you in-depth analysis for these prices it will give you price overview for the latest data moving averages RSI macd advice and suggestion if you want to buy or not and so on please big disclaimer don't use this prototype to buy or sell Bitcoin it's a simple prototype and we are learning prompt engineering here and Python and not Bitcoin trading maybe in different courses you will learn something about trading but for now we are talking about prompt engineering charge apt and python so focus on the topic but this example just to show you the power of connecting charge EPT with python scripting with Advanced prompts you can get live data and then analyze this data okay so this is the application that we will build right now in few minutes let's close it and go back to or work and start coding our custom charge GPT version the first step is to understand how to connect python with chargpt API if you don't know what's an API think about it like a connector a broker that allows you as a developer to connect with services for example if you are on Twitter and you want to post a tweet usually you open Twitter and you click on you write your post and click on tweet you use the interface what if you want to post on Twitter using your own application like building social media automation software you need something that allows you to access services so Twitter will give you an API that allows you to access Twitter the same for charge apt if you want to use charging PT as any user you go here charging PT website and you start entering your prompts yes what if you want to access the power of chargeability inside your own custom applications like in our case and on Python scripts you need to use chargpt API what you do simply is you import you remember models are going to import open AI what's the open AI it's the company behind chat GPT now for the first time you need to install openai so what you do is go here to terminal again and you write this comment pip or pip install open AI enter it will download and install all the packages and models everything and install on your PC the second step is to set the authentication API key you can simply set it like this open ai.api key and set the key where do you find the key in your account just go to open AR if you don't have an account sign up I don't want to waste now time signing up simply go to account then view API keys and you'll find your keys here and you can click on create a new security key copy it and paste it here now just small node it's not the best way to enter API and secret keys and applications it's better to use something called OS environmental variables but for now to keep things simple for you I'm using this as a simple clear text or string so we set the key now we are ready to connect with the API and communicate with chargpt let me show you the simple function I created for you that you can use anytime to communicate with chargpt so I will paste it and here we are it's called basic generation you can call it whatever you want and you remember the parameters we learned in the first part this is the user prompt it's your prompt and here we are simply creating a new variable and we are filling this variable from the charge GPT API by using this open AI model and calling this function then the create function and passing the model we want which is Jeep GPT 3.5 turbo the AI model we want and here is the messages this is the role which is the user and this is the content which is your prom the user prom then when you call this we will get the charge EPT completion the response and we can read it let's test this so we have a function just paste in your code and now we can simply run it I will say prompt anything I will Define it I will tell charging PT to explain Python Programming in two sentences for example so this is my prompt now I will say I will call the function response is equal call the function and pass the prawn I'm splitting it to make things easier for you to understand that I will print the response that's it so what we are doing here we are calling chargpt passing this prompt and then reading the response and printing on in our application Let's test it go to terminal new terminal run wait a little bit we are contacting with charge epd and here is the response Python Programming is a high level programming language blah blah blah you can see so now we are communicating with charging PT but with our code this is the basic example you can just copy this the same code and use it in the way you want just change that prompt and you are communicating with chargpt now let's move on to the next level we want to analyze Bitcoin prices so for example if we go here and say analyze the last seven days of Bitcoin prices Let's test this I will go here terminal I will run look at the response as an ally language model I don't have real-time access to Market data however based on the last available data which is maybe two years or three years ago it will give you a simple analysis so we don't have access or charge apt you don't have access to real live data so what we are going to do before calling this function we are going to give real data real life data to charge EBT how to do this let's see so step number two is to read live data from where to get this live data we are going to communicate with third-party apis let's go open our browser again I will go to website called rapid aepi please Focus this website is a Marketplace of apis so now you can access a lot of services and things with this website I will go here and search for Bitcoin for example or crypto so I want an API that allows me to access crypto prices I tested a lot of apis and I found this one coin ranking which is verified and it's free you can see it's freemium they have this basic free version with 10 000 monthly calls which is more than enough for us so this is an API that you can access from your python code to read Bitcoin live data prices if you go here to get coin price history and then go down here and select the time period for example 7D for seven days and click on a test endpoint now it will give you the last seven days history for this coin price so now we can connect with this API to read live Bitcoin prices and what's nice about rapid API they have these code Snippets in our case we are using python I'll click on requests and it will give you the code you can see this is the full code it can use to read this data you can just copy this code and paste inside your application to read the data but I want to make things easier for you I prefer another function that reads data from this API and returns back a list of price of Bitcoin price Let's test it let's check it so I will delete this I will go here and paste my function and you can see it's called get Bitcoin prices without parameters we are getting the last seven days you can see this code here let's minimized a little bit so this is the URL you can see this code here is the code inside rapid API where we are this code here just copied and pasted and I added some comments so you can understand each sentence or each line of code what does it mean and you can notice we have these yellow lines on requests and Json we need to import them in our code to use them so go back here to models again you need to import them or set import Json and import quests and if we go now down you can see now everything is perfect what is request it's a model that has this request function that allows you to communicate with apis that's simple what does Json it's simply a library or a model that allows you to read Json data what does Json data if you go back here to Rapid API and execute this test endpoint you can see now this is the response from the API we call this a Json it's like a text file you need to read it to parse it and read it so this library or this model here helps you read this file easily I want to access the history I will say Json result data history what this means if you go back here to Rapid API you can see here we have the history we have data and then we have history and we have the prices inside so we have data or data history then we Loop you can see the loop here we are looping inside history to read all the prices let's go back to show you this you can see we have a lot of of values here so we are looping inside the history variable or the history list to read all the prices and we created a list of price to return to the user so this is the function that returns Bitcoin prices for the last seven days live data now we need to combine this function with an advanced charge GPT prompt to analyze and give you in-depth analysis to the latest Bitcoin prices so I will paste now my Advanced chargpt prompt it's a simple string you can see it here you're an expert crypto Trader with more than 10 years of experience I'll provide you with a list of Bitcoin prices for the last seven days can you provide me with a technical analysis of Bitcoin based on these prices here's what I want price of review moving averages relative strength index advice suggestions do I buy or sell and please be detailed as you can as much as you can and explain in a way any beginner can understand and here is the price list and you'd pass the Bitcoin prices inside this string so I will Define this variable Bitcoin prices and simply I will call this function to get the prices now we have the prices we have our Advanced prompt we can call chargpt to analyze the data I will say analysis for example I will call this function here basic generation and then I will pass the chargpt prompt you can see how we combine things we got the prices we have the connection with charge apt and we have the advanced prom we combine them here together to get the analysis based on live prices and don't forget we want to print the analysis at the end so we can read it let's run it and test what we did let's wait a little bit and here we are the in-depth and analysis based on our own New Life prices you can see this is the price of review moving averages and so on do I buy or sell and so on again don't forget this is a prototype please don't use it to buy or sell Bitcoin we are learning Python and charge DPT Advanced prompt engineering and not Bitcoin trading so our application is almost done but the question now how we can build a nice interface that you saw at the beginning of this section easily let me show you some magic I will go here and import a model or a package called stream lit and I will name it St for example we need to install it so I will copy around the terminal what do we say install streamlit enter just wait a little bit and simply now go here and say St dot title is equal to charge EPT Advanced prompting with python anything you want we can say Bitcoin analyzer with charge GPT and the sub header of this page is example sub heading or maybe subscribe to my channel for example so I will delete this code and now I will go to terminal new terminal and instead of saying python app I will say dreamlit run and the file name enter and you can see now it opened the browser and we have the heading and the subheading subscribe to my channel so I will close it close the Powershell again and now we need to create a button with a loading to run these functions and to do that I will change the code from this to this again I'm using streamnet library or model to create a button and the text in the button is analyze and then I will use a spinner to show a loading to get the Bitcoin price first so I call the function here and when it's done it will show a success message done then it will start analyzing Bitcoin prices using charge EBT then it will show you again done and show you the result tax area streamlit is a very powerful library or model that allows you to build interfaces very easily as you can see if you go to streamline.i oh you can see here a faster way to build and share data apps it's super simple you can see the gallery a lot of examples charts building graphs a lot of things you can build with this awesome Library so anyway you can check it if you want we finished our code let's try running it again new terminal and run and here we are this is our application click on allies getting Bitcoin prices we got the live price and now it's analyzing it and it will show the result inside this text area you can see I used exactly the same method to build my own custom Char GPT Max Edition that not only analyze Bitcoin prices it can generate images and a lot of other stuff I show you this in detail in this video how I created chargpt Max you can check the video here if you have any questions I'll be waiting for you in the comment section and don't forget to get all the details the codes description below see you later
Info
Channel: H-EDUCATE
Views: 144,027
Rating: undefined out of 5
Keywords: chatbot tutorial, chatgpt, chatgpt examples, chatgpt explained, chatgpt prompt engineering, dall-e, generative ai, gpt 4, learn prompt engineering, midjourney, openai, prompt crafting, hasan aboul hasan
Id: -C4FCxP-QqE
Channel Id: undefined
Length: 39min 45sec (2385 seconds)
Published: Tue Apr 04 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.