project_openai_codex
project_openai_codex copied to clipboard
Server Error
I followed each step, but I always get a server error. Please help
same to me, it worked local, but get server error after deploy.
@Tanimou I would advise you go through the tutorial again but carefully this time around and then watch out for your capital and small letters. They might have been mixed up somewhere. Like in my own case, i misspelled "apiKey" with a small letter "k" and my code was showing error until i figured it out.
I hope this helps
I already did that teejaywurld. Here's a screeshot of what I get:

I think the problem is on the client side
@Alia2006 Did you follow the tutorial to the end?
I believe this issue was addressed there towards the end of the tutorial
@Tanimou I would still advise you go over your code again and compare it to the tutorial you watched.
There must have been a mix up somewhere down the line while writing your code.
@Alia2006 Did you follow the tutorial to the end?
I believe this issue was addressed there towards the end of the tutorial
Yes, I have followed to the end. I guess you are saying the updtae server url part. the deployed server can response the text 'Hello from CodeX!' and when fectch in client code get repsonse with 401

Exactly same for me but with status code 429. It's really weird. Did you fix this Alia? After some research on that, they said that this error occurs because the client sends too many requests in a short time, so the server sends this error to kind of say: "woowooo calm down buddy, you too fast".
@teejaywurld I forked his repo to try on my side and I still have the same 429 code error. I think now maybe it's the region I don't know
@Alia2006 Did you follow the tutorial to the end? I believe this issue was addressed there towards the end of the tutorial
Yes, I have followed to the end. I guess you are saying the updtae server url part. the deployed server can response the text 'Hello from CodeX!' and when fectch in client code get repsonse with 401
@Alia2006 I solve the issue of 429 getting an HTTP Error.... you have to sign up for OpenAI with your own email address (not sign up with google) and do phone verification then it will give you the free trial of $18 ..and then the code will perfectly work.
@teejaywurld I forked his repo to try on my side and I still have the same 429 code error. I think now maybe it's the region I don't know
@Tanimou I solve the issue of 429 getting an HTTP Error.... you have to sign up for OpenAI with your own email address (not sign up with google) and do phone verification then it will give you the free trial of $18 ..and then the code will perfectly work.
@crocmons I have to sign up where? 😅
@crocmons I have to sign up where? sweat_smile
Sign up here and get the secret/API key: https://beta.openai.com/signup
@Tanimou if you look this screenshot you have to make a new key then add it to .env and also add it into render => Environment paste the new key and save it

you are going to get that error because on the openai site they check if you use your key as public then you are not going to be able to use their api, so you have to make a new one and use it where you have been using them.
In the tutorial there is a point where the gitignore doesn't work, I solved it by deleting the document from my repository and the env to make a push and then add it one more time inside the server with the env and the new key, make the push to add it and that's how it worked for me.

I finally managed to resolve the issue by effectively signing up with my email and also getting a new API key and replacing it in environment variable as well. Thanks @RosaMoran and @ @crocmons

@Tanimou My pleasure.
Thank also @teejaywurld and @TidbitsJS