The API key for openai is no longer free. If you want to buy the api key you can follow on with the procedure in the video and everything will be ok. But if not you can use the google Gemini AI. I'll make a video on it soon
@RG-Tech_Industries Жыл бұрын
it is not working
@RG-Tech_Industries Жыл бұрын
please tell me
@RG-Tech_Industries Жыл бұрын
it is like this 15:00
@htmlcamp Жыл бұрын
Please make sure that the api code is the same as what i wrote. Where the code should be in quotation marks put it in. You can download the finished project to compare. Link in the video description
@MasoodAhmedKhan-y9q11 ай бұрын
still not working bro@@htmlcamp
@LancasteTech9 ай бұрын
Fantastic tutorial! It is almost impossible to find a nice, simple, follow along like this, thank you so much!
@SurajPandey-vi9gr7 ай бұрын
The open api is not free anymore
@TheAiBozz7 ай бұрын
Ohhh😢 so what we do now?
@hamzaShahid-x5i10 ай бұрын
Hey, does it cost at all to use the open ai api at all as used in this video?
@nohandlelmaoo5 ай бұрын
It costs $0.002 per 1k tokens. Google chatgpt api price
@mc.fly.86224 ай бұрын
Yeah, i guess i'll say it for everyone, the curl you we're using is abit different now, and me (the one who mostly copy your code) is stuck at the error where the only responce it shows is just "Oops! An error occurred. Please try again." If you could help, i'd be grateful.
@NormalyBS4 ай бұрын
Bro it acually working but chat-gpt is just loading ( can't answer )
@AbbanSadiq-ht5dy5 ай бұрын
So beautiful 😇⭐⭐⭐⭐⭐
@ayushi3336 ай бұрын
Code is not working please help me
@gamesmeeky8346 Жыл бұрын
i downloaded your code and it is not working bro
@antaryamigamingyt4676 ай бұрын
yes he is sharing the wrong code
@Samsoor972Ай бұрын
Is the api free or paid?
@gautamnaugai.iab949 ай бұрын
Bro please solve my problem
@alextalavera99267 ай бұрын
Can you helpme
@glowzoomer Жыл бұрын
i need this codes
@htmlcamp Жыл бұрын
Will provide link in description
@glowzoomer Жыл бұрын
@@htmlcamp i found, bunch of thank you bro🙂✊
@MohdAhmad-vl6wc7 ай бұрын
Script cannot work
@fun.tvchild6 ай бұрын
don't berry use this code const messageBar = document.querySelector(".bar-wrapper input"); const sendBtn = document.querySelector(".bar-wrapper button"); const messageBox = document.querySelector(".message-box"); let API_URL = "api.openai.com/v1/chat/completions"; let API_KEY = "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"; sendBtn.onclick = function () { if (messageBar.value.length > 0) { let message = ` ${messageBar.value} `; let response = ` ... `; messageBox.insertAdjacentHTML("beforeend", message); setTimeout(() => { messageBox.insertAdjacentHTML("beforeend", response); const requestOptions = { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${API_KEY}` }, body: JSON.stringify({ "model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": messageBar.value}] }) }; fetch(API_URL, requestOptions) .then(res => res.json()) .then(data => { console.log(data); // You can handle the response from the API here }) .catch(error => { console.log(error); }); }, 100); } };