Introduction
In today's digital age, the abundance of information can be overwhelming. With the constant stream of news, research papers...
For further actions, you may consider blocking this person and/or reporting abuse
Good work. You are exposing your API key in JS, tho. Meaning anyone can abuse it and your billing will go through the roof. FYI
What is the best way to handle the API key on the front end? @kakauandme
If you use Nextjs instead of react and store your key in .env file ( gitignored ), and chatGPT api call maded on server side.
pages/api/chatGPT.ts
then your key will safe.Yes! This works for Nextjs. But How do you handle it in React ? @pengeszikra
You can either ask for a key as user input or use .env in React. When using .env, anyone who downloads your repository can fill in the environment values. However, front-end solutions are never secure as the key can be seen when monitoring the API request.
thanks @pengeszikra env file was created and that was where the key was stored
Thank you for finding this Article helpful @abhaysinghr1 . I appreciate it. OpenAI is awesome. Please give it a try
Once I entered the text to be summarised, and clicked on the summarise button its just loading for a long time and summarised text is being shown. What do I do?
did you use your API KEY ?
Yes I did. Is it okay?
can you reach out to me via akinfemi46@gmail.com so we can look at it together and see what you're not doing right
yes yes sure. Thank u so much. Mailed u!
Thank u so much Femi, its working now.
what was the issue? I am facing something similar
Did you check the console to see the error you're getting? Also, check your API Usage to be sure you have not exceeded your normal Quotal @hady68
Hey yes, that was the case, figured it out and built some fun projects following this during my internship!
Interesting! Glad it helped
Wow, fantastic article Femi!
Loving how detailed this tutorial is - ChatGPT is really exciting and I love seeing what everyone's building with it :~) I've only used the ChatGPT interface on OpenAI but I'd love to mess around with the API next time I'm building a side project to incorporate it into my own apps. Thank you for the tutorial!
Glad you found the article Interesting and well detailed😊. Yeah! ChatGPT is really exciting😀 Go ahead and build with the Api✌🏽@chrisgreening
this is gold! Thanks for sharing. 😊
Thanks for finding it helpful. @kawazackie307
A really nice tutorial, could really use this step by step to enhance my learning :)
Definitely👌 @divyanshukatiyar