I literally connected my brain to GPT-4 with JavaScript

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today I'm going to put this weird thing on my head and communicate with gpt4 using nothing but my thoughts growing up my dad would always tell me damn it son you need to use your brain more but I never fully understood what he meant until now the human brain is the most complex machine in nature and how it really works is still a mystery what we do know is that it's always emitting measurable electrical impulses called brain waves scientists have been measuring these waves for decades using electroencephalograms or eegs that connect tons of electrodes to your Dome you've likely seen them in movies Like Clockwork Orange but I was able to get my hands on this futuristic device called the crown a compact and stylish electroencephalogram that you could totally wear on a Tinder date without looking weird it's the same basic idea as elon's neuraling except you won't need to drill a hole into your skull and best of all it's got a JavaScript SDK that we can use to hack into our own brain waves naturally my first thought was to connect my brain to gpt4 you give myself superhuman intelligence and that's what I did which makes me the smartest man in the world you're about to get a glimpse into the future a transhuman cyborg future where every human while every Rich human anyway will have all the knowledge in the world not just at their fingertips but at their brain tips the Poors will have these as well but they'll be used by the CIA to make you dumber like the moment you get thirsty you'll be served in advertisement for overpriced sugar water that will slowly kill you the crown device has a price tag of about one thousand dollars it sits on the back of your head and has a bunch of tiny electrodes that measure your brain waves it hooks up to a mobile app via Bluetooth or Wi-Fi then streams your brain's data Into The Ether the app also provides helpful utilities like how to improve focus but I don't care about that I want access to the raw data which we can easily get in Json format via its JavaScript SDK But first you need to know a little bit more about brain waves when you're asleep your brain emits low frequency delta waves around 2 Hertz these waves increase their frequency when you're awake and relaxed as they become Alpha Waves around 10 Hertz and then finally when you become highly focused like when solving a coding problem or playing chess they increase to 35 Hertz and these are gamma waves and that's what we care most about measuring because they're useful for actually controlling things things brainwave patterns are highly Dynamic and can rapidly change depending on a person's cognitive state mental processes and external stimuli however neurosity the company that makes the crown provides a dashboard where you can train algorithms to recognize your own custom thought patterns like currently I'm training it to understand when I'm thinking about biting into a lemon I just imagine biting into a sour ass lemon and then relax when it tells me to after doing this about 30 times it will learn how to recognize that thought pattern So currently I am not thinking about biting into a lemon and the chart's not moving but now as I start thinking about biting into a lemon the chart goes wild that's pretty crazy and it's accurate to the point of being somewhat frightening it is somewhat time consuming but you can train all kinds of different patterns like I also did right hand pinch and tongue based on my wife's recommendations now that it knows how to understand my brain waves let's write some code that can do something useful like communicate with gpt4 here I have a basic node.js project created with npm net from there I can install the neurosity SDK then in the code I'll go ahead and import it and first step is to initialize it with your device ID the device ID can be found in the mobile app next we log in with our email and password because a crown can have multiple users and now I can start reading my brain with JavaScript by simply calling neurosity brainwaves raw then subscribe to a stream of that data well technically it's an observable because it uses rxjs under the hood if we console log it it spits out an overwhelming feat of data it has a sampling rate of 256 Hertz which means we'll get 256 samples per second they're batched into 16 samples that emit approximately every 62.5 milliseconds in addition the brain waves are broken down into eight different channels so you get these huge objects with tons of numbers that look like this if you went to brain college you might be able to take this data and analyze it yourself but luckily neurosity provides a better way it provides observables for specific States like calm and focus that means we can subscribe to those mental States and then run code as a side effect but the coolest thing is that we can also recognize those thought patterns that we trained earlier like if we want to listen to left hand pinch we can call neurosity Kinesis followed by the name of the event and it's this feature that allows me to turn myself into a cyborg what I'm able to do now is install the open AI SDK where I can authenticate and access gpt4 the API is dead simple to use all we need to do is call create chat completion specify the model as gpt4 and then send it an array of messages the result is no different than what you would get from chat GPT in the browser once I have that message I can do whatever I want with it like what I can do next is use a text to voice model to convert the text into voice as an audio file this is your president speaking subscribe to fireship on YouTube before I drone strike your ass and then transmit it directly to a Bluetooth earpiece the implications of this are huge because now when I show up late to my daily stand-up meeting all I have to do is think about right hand pinch to ask chatgpt to come up with an excuse for why I was late for work or if I'm taking a test like the bar exam and there's a question I don't know the answer to all I have to do is think about biting a lemon which will transmit a signal to my camera enabled glasses which will then upload that image to GPT 4 and provide an answer that's guaranteed to get me in the top eighty percent or maybe I could become a super soldier then stick out my tongue to blow up a village of innocent civilians the possibilities are endless when you start thinking like a JavaScript program cyborg thanks for watching and I will see you in the next one
Info
Channel: Fireship
Views: 1,381,060
Rating: undefined out of 5
Keywords: webdev, app development, lesson, tutorial
Id: -HYbFm67Gs8
Channel Id: undefined
Length: 5min 15sec (315 seconds)
Published: Mon Mar 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.