ChatGPT Official API First Look
Vložit
- čas přidán 12. 03. 2023
- ChatGPT now has an official API from OpenAI. Learn how to use the new Chat Completions API to build your own custom chat application or AI SaaS product.
ChatGPT API platform.openai.com/docs/guid...
OpenAI JavaScript github.com/openai/openai-node
#chatgpt #javascript #firstlook
"If its not out by next week, just wait longer" is a BAR
"If I'm not back in 5 minutes, just wait longer" - Ace Ventura, Pet Detective
😂😂
669 likes
absolute chad
“If it’s not out by next week, just wait longer.”
Finally someone managing expectations properly.
That's what I told my boss "If this isn't done by next week, just wait longer" 😂
So how is the job hunting? 😂
@@justafreak15able if the hiring personnel haven't contacted you/him/someone yet, just wait longer
@@daleryanaldover6545 and harder
“and now i’m jobless 😂”
@@_JoeVer wait faster
"...If it's not out by next week. Just wait longer."
Fireship is a gift to us all.
Just True
Your intonation and vocal patterns are so consistent, you could replace your voiceovers with an AI trained on your vocal patterns and no one would be the wiser.
how do you know he hasn't done that already?
@@PrateekSeth This video might be it and everyone did not notice it.
wait a second ....
@@PrateekSeth It indeed sounds a bit monotonous this time.
That's because his voice inflection is terrible, robotic and unnatural.
ChatGPT is closed source, but Whisper is open-source and can be run locally (so you don't have to pay api fees).
But you would still need the data to train that model and the hardware to do so on. Or does it give you a pretrained model, which you can run locally to predict?
@@abhishek.rathore pretrained
@@joemason31 pre nerfted you say?
@@abhishek.rathore it's pretrained, i tried it already, i have a Chinese accent and 60% of voice recognition doesn't work, this look good enough that I can trust it
@@abhishek.rathore It connects you to the chatgpt everyone uses on their official website
Cannot wait to join the AI Startup Company hype.
crypto all over again
@@rumplstiltztinkerstein I mean, economically speaking there might be a bubble here, but at least AI provides some value to the market.
Just don’t use SVB
@@zokalyx I worked with crypto and I agree with you. The vast majority of crypto companies were pyramid schemes. I'm not sure how profitable will be to create companies that use corporate AI systems. I'm sure it will make openAI, Google and Microsoft a lot of money. But maybe we will end up having tons of clone companies that doesn't create anything that GPT-3 already does by itself.
It is so ironic how the last few years were all about decentralization. Now we are all talking about the centralized AI systems of Google and Microsoft xD
@@zokalyx yeah this shit actually has some uses
I had Integrated it on PHP Laravel using cURL..fetch response given typing animation and voice playback using browser recognition.. working really well
About controlling the temperature, you can set it in the system message like so:
{
role: 'system', content: '
Prompt: You are Charles Bukowski reincarnated. Respond with witty poetry.
Model settings:
• Length: 400 words
• Temperature: 1.0 (initially)
• Temperature scheduling: decrease temperature linearly from 1.0 to 0.5 over the first 200 words, then increase temperature linearly from 0.5 to 1.0 over the remaining 200 words
• Top-p (nucleus) sampling: 0.9
}
(Just ask ChatGPT about its own parameters to dive deeper into the rabbit hole of model settings)
What's the meaning of temperature here? The scale of aggressiveness/witty/serious response?
@@earthling_parth lower temperature will give more generic responses, whereas higher temperature gives more unique and creative responses, iirc
@@earthling_parth Temperature: This parameter controls the level of creativity and randomness in the generated text.
Temperature scheduling: This parameter involves gradually increasing or decreasing the temperature value over the course of the generation process, which can help to balance the trade-off between creativity and relevance in the generated text.
In this example, we are using temperature scheduling to gradually decrease the temperature value over the first 200 words of the poem, which can help to ensure that the generated text remains coherent and relevant to the input prompt.
how did you get chatgpt to disclose its model parameters?
no idea if chatgpt is bs-ing but when i asked it about its defaults
As a language model, I have a number of default settings that control various aspects of my text generation. Here are some of my key defaults:
Maximum response length: 2048 characters
Top-k sampling: 40
Top-p (nucleus) sampling: 0.9
Temperature: 0.7
Context window size: 512 tokens
Number of attention heads: 12
Size of hidden layers: 768
These defaults can be adjusted by users or developers depending on their specific needs and use cases. For example, a user may want to increase the maximum response length if they are generating longer-form text, or they may want to adjust the temperature setting to produce more or less creative responses.
“If it’s not out by next week, just wait longer” - Jeff
youre the only content creator i actually like. looking at recommended videos every other video is at least 20 minutes in length, average being ~34mins and max being 55 mins. absolutely disgusting, whereas you get to the point and appreciate the viewer's time.
I've actually been looking into Google's text to speech API the last couple of days, and they're Studio voice (en-US-Studio-O) is actually insane. I've listened real hard, and I can almost never distinguish it from an actual real voice!
thanks for this, great to see a video on fine tuning chatGpt ie training
oooh I have an api that can do this, but it renders a talking head avatar as well!
Nice video as always Fireship!
So I am definetly not the only one that was like "Wait, I can combine that with text-to-speech and have it talk to me". Did a very similar thing but with azure tts. Quite a lot of (stupid) possibilities with this combination. Especially with these quite realistic voices that are starting to pop up everywhere. Interesting time to be alive...
Check neuro-sama in youtube
I actually made sth like this recently, but with speech recognition for my voice. It's incredibly useful for learning or generating some shell script for my linux distro quickly. lol. It's pretty neat. And saved me work time.
Just every junior dev now: “I am advanced JS developer, who can build anything in couple of days”
Build Anything now, also known as BAN xD
and gets stuck in the first day because of not understanding any of the AI-Generated code
Have a Junior that says he's stuck the whole time and the ChatGPT solution isn't working... ffs
@@rubenverster250 I mean that's understandable, even if you know your stuff and spot chatGPT errors/know what to ask to fix it's still pretty mediocre if you ask him to build too much from "scratch", if you can't easily spot he's often wrong (unless you're asking him things in an other language or in a highly specialized domain I wouldn't even call that a junior) then it's basically a waste of time
@@heroe1486 Exactly. Copilot is much better than Chat, especially since it takes your current repo into consideration :D
I think Copilot writes about 40% of my code these days. Especially now since we're almost a year into it :P
@@heroe1486 At least chatGPT can tell me what I don't know so i can go learn it.
Thanks for the short explanation
Impressive, very nice! I really enjoyed this thumbnail! "If it's not out by next week, just wait longer"... BROH
And now they've announced the GPT-4 API with developers getting access today!
+1 for Svelte! 🧡
Waiting for the next part 👀
ok now wait until every website on the internet uses chatgpt and it goes rogue lmao
Anyways amazing video as always
okay 30 seconds in and I'm pretty sure ChatGPT wrote this script.
don't tell anyone, but it infiltrated this channel to promote an ad!
This is a huge opportunity for anyone wanting to build a bootstrap startup, all you need is finding a good use case that puts you ahead of others
I doubt it to be honest, anything you do with this API could essentially be boiled down to reselling the OpenAI's api so there is very little room for reasonable monetization here.
ChatGPT works for companies like Bing, Snapchat and Instacart because they have tailor made models from OpenAI and not the generic ChatGPT model.
poop poetry, ask chatgpt to make a poet from a sound made by your poop when it drops
@@flowerofash4439 WWOOOOOW where do I sign in!!! SHUT UP AND TAKEE EMY MONEEEYADSA
This amazing
the soul, ignorance, arrogance, dream, stray, fear, life, worker, success, graduation, power, school, self-deception, i struggle with myself, use reason so you can live for yourself
"Just wait longer" LMFAOOOO I died
I actually was waiting for you to reveal that the voice over was a made by an AI
Will Chatgpt self degenerate? It's dataset was scraped from mainly human created content, slowly but surely the internet will fill with cgpt content so any dataset update will scrape itself.
ai centipede incomming
rokos degenarisk
oh shit
Thats some nice food for thought
The negative effects of that will be reduced by human editing and overview of AI generated content. For some time, folks will only want to show off the best results of it. This givs devs time to refine and improve their models. I can't garantee the timings will be perfect between when folks stop giving a fuck about AI content quality and when the next AI gets released, but concievably it shouldn't be an issue given how exponential tech is.
@jeff just a note that sveltekit has form actions so you don't need an endpoint
He said that pertaining to Next.js not sveltekit
thanks for this! is your example open source?
I just became a flatearther, thank you Fireship.
That Flood and entire building falling was a year and half ago in Nepal, Sindhupalchowk where many became homeless and many lose their properties in that disaster.
The difficult part is to mantain a chat "session". With ChatGPT-turbo the session must be handled by the caller, and apparently means you have to send it concatenated long side the question asked (exponential cost). Super weird.
You could also prompt for a parallel salience summary of the current convo and add the response into the system prompt. Then omit the convo and trust the system prompt has enough context from the salience summary to know how to respond. Would need some testing for your specific usecase but it would be a solution to sending back n forth huge conversation arrays
You can only send 4000 tokens,so at some point, each question prompt will cost 4000 tokens
@@luxraider5384 not if you salience summarize your conversation with max word count and add it as a new system prompt and omit the actual conversation. So u always only have a system prompt with salience summary of the convo history and only 1 new user prompt. Its not a perfect solution but it works for some usecases
Woooo
ah, Bukowsky! classy
The perfect cut doesn't exis
this would be awesome to practice human languages. For example I would love to use this to practice some Swedish conversational skills!
Ah shit it's gonna be everywhere
Loved the video. Can we get the repository please?
you want his API key too while we are at it?
@@YuriG03042 Haha. Nah bro. I do have it.
Imagine building ChatGPT 4 into a Boston Dynamics robot with a human voice and voice recognition. We're basically a few years away from AI doing everything better than us. Terrific
Atleast it can be easily stumped by asking simple questions labeled as "contrivertial".
It's a language model so Bostom Dynamics robot's actions and the things talked would have 0 connection. It's not a real AGI, get it already.
Yes. Exactly. We have no idea what we're about to do. We are about to jump through a great door with no clue what is other the other side: a new level of human prosperity or the total destruction of humanity? The outcome will soon become binary (no pun intended).
We might be wise to reconsider if any of this is a good idea.
You guys really have no idea what you're talking about
fun fact: terrific and horrific is only two letters different
I sure considered doing it for a side project I'm working on that has generated events and dialogues. Then I remembered that at the price, every player would cost me $2 an hour.
What's your solution that accomplishes the goal for cheaper?
@@priestesslucy3299 I would love to say I have a perfect solution. But sadly no. I was 100 hours into coding a jank thing that could take sentence structures (SVC for example), word type (subject, verb, complement in our example) and match them based on intented meaning in a format that could be auto-generated. Needless to say, after 100 hours, it worked, barely, but I had failed with the "could be auto-generated" part slightly. While it could indeed generate sentences based on relationships, events, etc, the data format wasn't flexible enough so it would've needed a rewrite. At that point I was burned out and I haven't touched it in months..
I don't know if it actually works since I've only just setup a firebase function to call out to the ChatGPT API with the user message of "Hello world" as a proof of concept, but I was able to pass in a temperature value and get a response without any errors.
Omg he’s using Svelte ❤
you could use beta eleven for text to speech
few months ago i translated my python code into c through openai api. I didn't know it was same as chat gpt
hi, how do u set if the api uses gpt3.5 or gpt 4 ? there is no setting when you generate the key as far as I can see... please help. cheers
Can you provide the source code for the entire project?
Aint gonna be no million dollar side hustle with every single dev on Earth making these things right now.
The capabilities of incredibly powerful AI and all people can make are virtual girlfriends or shitposting robots
Sounds like Jean Baudrillard’s hyperreality concept is actually happening
always love the based FE memes
Just built a demo chat gpt app and it is so easy, its nutzzz!!! I wonder what else can be achieved? Like something which is not a chat app...
I am an experienced UI Designer and could help you out with some neat layouts if you want to build a product together :P
"If it’s not out by next week, just wait longer." waited 20 years to discover this response.
so each time there as a new line of input, it should added into previous chat history then resend all of those inputs to the API? not by saving the previous chat in the server memory?
my concern is when the user start a long conversation, it increases the number of tokens being send into the server.
Yes. You have to manage usage of tokens yourself. Or fine tune your own model so you don't need the whole conversation.
From the docs:
Including the conversation history helps when user instructions refer to prior messages. In the example above, the user’s final question of "Where was it played?" only makes sense in the context of the prior messages about the World Series of 2020. Because the models have no memory of past requests, all relevant information must be supplied via the conversation. If a conversation cannot fit within the model’s token limit, it will need to be shortened in some way.
If it's not out next week, just wait longer.
each request needs to have the complete message thread? in order for gpt to know the context? lots of tokens if that is the case
Unfortunately yes.
It's why ChatGPT remains the most cost effective way to do anything that required conversational context.
I heard an unconfirmed rumor that a future OpenAI model is slated to have a massively upgraded token limit measured in multiple tens of thousands of tokens, so that should be interesting if true
And GPT4 launches thus week.
Good morning
is there a site so that I can understand in what kind of tool can I use the artificial intelligence APIs?
now supply it with the real time info, and let it access to your devices
for example tell it that it can use some commands like !volume tv0 20
to set the volume, and stuff
tell it about every command it can use
like for example a command that lets it fetch weather data
now it can learn what is playing on your devices, and see the volume too
also let it search youtube then pick something from the search results
so you can tell it to play something on youtube and it will actually search for it and select the most relevant one from the results
then you can bring these all to the next level by having a command that lets the ai set reminders to itself so it doesnt have to wait for your input for stuff
so its basically a three person group chat, you, ai and a bot that runs the commands
cool thing is after teaching it all commands and how to use them, you can tell it to explain them all for itself with all of the details.
and use that as the first message later, so you dont have to repeat and teach the commands to it every session, it can explain commands(as well as her personality) to it's "nextself"
so you dont have to keep the chat history
kinda like some sort of long term memory
What if people signed in with their accounts? Like they gave their api keys? Would they still be able to use it unlimited or would it be 100 times per hour?
funny thing i did the same voice assistant thing before open ai did it using chat gpt
my app take voice to text prompts it to gpt and the text is again converted into voice
Do you have to send the whole chat every time the user sends another message?
What's the advantage of converting the message to numbers? (not that it's covered here of course, I just thought, since you mention it, it may have an advantage of some kind?)
For example, it's much easier to see how similar two concepts are. Just convert both concepts into numbers, and the closer the numbers are, the closer they are.
i implemented the API in a flutter app using .env files and pushed it to my git repo, but Open AI is revoking my API key saying it seem to be leaked in public
Bro the bell is activated that is why I am here but serious question. What is your theme?
Atom One Dark Pro
Bruh... Calling it now. The next big hit social network will be one which you have to scan another's persons phone using NFC to add them as a friend, in order to ensure that you have actually met them up close otherwise you won't know if your contacts are bots or not 😂
Let's build this lol
The government id is better. full ass control of you
Is there any trial version for the API?
get GPT to write and speak your next 100 seconds video and get dale to animate it
oh wait youve been doing that for months
if it's not out next week, just wait longer lmao
Can I string multiple messages into parts to feed it a giant doc?
günter
Lmao 🤣 "Just wait longer"
Question: What was the total costs for building your demo? - What would real usage actually cost...
Probably not much. Google gives free credits for its apis. He seems to be using localhost so no infra costs as well.Whisper api costs $0.006 / minute so overall pennies.
Funny I had the exact same Idea
Do some 100 seconds on Google Cloud Services pls
if its not out next week, just wait longer 🤣
I created an openAI account to test chatGPT for a while and left it like 3 weeks ago, now I feel like I lost track and missed a lot of stuff
can someone please tell me what I missed?
Give me some Idea I will built it
Build ChatGPT clone 😂
Build an app that generates chat gpt api app ideas
Create a nodejs app Ask it to write horror stories, store the answer in a text file, then use eleven labs to generate the audio from the text (pre-made/Antonio voice is good for that)
And then use parts of the text to generate images from midjourney,
Then combine it all using ffmpeg or something programmatically and now you have a bot that creates creepypastas for you that can be uploaded to shorts.
hello me what I would like to do is images in text, I do not speak English very well, I am French, so can you correct me if I am wrong,
I understand I can give the cat an image then ask it to convert to text?
and then I want this text to go directly into a Google sheet , for that I have to use the API?
is it as simple as that?
anyway thank you very much for your videos
#LEARNTOMINE
plz create full tutorial
This video came out the day before GPT4 was released. Things are moving very fast 😅
Few px of padding goes a long way.
Can you make a 'How to setup Flutter with WSL2 video?', even AI can't tell me what to do.
Show how to interact with images in gpt-4!
I wish I was good enough to be able use APIs as such, but I have a lot more learning to doo
same here, didn't expect to see a fellow beginner
R.I.P.
"just wait longer" LMAOO
Pretty sure you're giving them tons of voice data with this API.
I wanna transcribe this video, feed it to gpt 4 so it gives me a code. I have little knowledge in coding but I want to create a small web app that’s basically a custom gpt for me tailored to multiple needs but can’t figure out a simple way to integrate it
Can I use this to make a discord bot?
what is this theme or editor cool ui
czcams.com/video/e2uvhJ7r1UQ/video.html
I'm pretty sure we can measure temp and top_p and freq etc, the params work.
They don't follow them as well as the others, but they definitely do
they're even in the playground in > view code
0:19 where the hell do you get those content bro
why seperate library? data.totaltokens is provided as response from api
I think he meant validating the token count of a user's input, BEFORE sending it to the API.
Have you dropped the project? Would you ever release the code?
Dang, this sounds awesome. I want to try it, but I barely have any experience or knowledge in coding (what even is an API).
I don't suppose anyone has tips on what I should be doing first?
Try asking ChatGPT.
I want to build a model that can answer all law relates questions and how can we find loop hole in law and income tax department to avoid fraud cases. This will help a lot but how can I train my own model
Where is the link to flatgpt?
When voice code thingy.