Closed andzejsp closed 1 year ago
Are you on a mac?
It definitely works with free OpenAI account, I have free one and able to run this with only one issue - my GPU RAM capacity. Just keep in mind that free account is limited in requests.
Where do you get the API key from then? Can you Link The Pag? I just generated mine and I have never used it before but it threw me this error
Could you please help me, where and how shall I iput my OPENAI KEY?
I have the following error:
"ValidationError: 1 validation error for OpenAI
root
Did not find openai_api_key, please add an environment variable
OPENAI_API_KEY
which contains it, or pass openai_api_key
as a named
parameter. (type=value_error)"
I use MACOS
אני גם לא יודע מה ה-API של החשבון שלך, המקור תקין או לא...
Could you please help me, where and how shall I iput my OPENAI KEY?
I have the following error: "ValidationError: 1 validation error for OpenAI root Did not find openai_api_key, please add an environment variable
OPENAI_API_KEY
which contains it, or passopenai_api_key
as a named parameter. (type=value_error)"I use MACOS
Add this in the visual_chatgpt.py:
os.environ["OPENAI_API_KEY"] = "{your_openai_key}"
I hope this will help you.
@andzejsp @ind1-go @FoehnWorknet I got my key here: https://platform.openai.com/account/api-keys But make sure you still have some requests available here: https://platform.openai.com/account/usage
And because I use Windows 10 for my AI learning, I had to change command to set API from
export OPENAI_API_KEY={Your_Private_Openai_Key}
to internal Anaconda env varibale:
conda env config vars set OPENAI_API_KEY={Your_Private_Openai_Key}
I believe that should work for any OS, because it is internal variable for conda environment.
@Comdriver thank you, yes i got the key from that page too, but i didnt check the usage. Turns out i have zero. How so? I have never used the API before. I have spent my dalle credits before, but other than that i never used the API
@andzejsp It is available for a limited time, like a few months, may be your account is too old
My api key with free account was disabled after committing it on Github. Does this mean it's not possible to deploy and test a chatgpt program in a production environment?
hi all can someone help me with that, when im local, the chatgpt works well, and when i export it to private github it works , but when i push it to public github, it automatically deletes the API key from my openai account, i tried many solutions for example config.py and .gitignore so it dont push the config file but stills, and my computer is not reading the environment variable of the OPENai
it did the same to me, you're deploying it on public thats why , you can deploy on private and it will work, but you can't share it with others unless you give permission to another github user, im searching for a solutions so i can hide the API key then it should work
It will work with your free openai acconut unless its rate limit is reached.
It will work with your free openai acconut unless its rate limit is reached.
Stop these lies! I told you i never used any api from openai and my account did not have this enabled
@andzejsp Please do not label other users' advice as "lies". Everyone here is only trying to help you in resolving your problem. Please be respectful.
You are definitely able to generate an API key from OpenAI on a free account. However the free credits are only valid for 3 months starting from the day you created your OpenAI account. This is automatically behaviour and that timer starts counting down even if you never went on the OpenAI Playground or even opened the API key page.
It is likely the 3 months time had passed by the time you got to using this.
OpenAI does not make it that obvious that you are given the credits the day you create an account. They really should make that clear because I encountered the same problem.
DALL-E credits are a separate system. The usage there won't affect your OpenAI usage with GPT.
In order to use the OpenAI API you need to setup a pid account
Openai API keys are valid for up to 3 months or until you run out of usage of $5. If you have completed 3 months of trial, your usage will be 0 and hence the keys can no longer be used. If you want, create a new account and generate new keys.
In order to use the OpenAI API you need to setup a pid account
You can create a new account and it will give you $5 usage.
@JUSTSUJAY Just so you know, creating a new account and verifying with the same phone number will not give you more free API credits. I tried that a while ago and it just considers your API account to be the same.
@JUSTSUJAY Just so you know, creating a new account and verifying with the same phone number will not give you more free API credits. I tried that a while ago and it just considers your API account to be the same.
I created my account in 2021, ig they didn't take my number back then so it works for me now.
I have created a new account and was unable to use my free credits as it was always showing ratelimiterror but then I saw a video that rather than saving it in your environment variables you can store it in your code itself import os os.environ['OPENAI_API_KEY']='yourAPIkey'
and all set then you can you use your free credits
I have created a new account and was unable to use my free credits as it was always showing ratelimiterror but then I saw a video that rather than saving it in your environment variables you can store it in your code itself import os os.environ['OPENAI_API_KEY']='yourAPIkey'
and all set then you can you use your free credits
Yeah, you can do that but it will expose your keys when you share your code.
I have created a new account and was unable to use my free credits as it was always showing ratelimiterror but then I saw a video that rather than saving it in your environment variables you can store it in your code itself import os os.environ['OPENAI_API_KEY']='yourAPIkey' and all set then you can you use your free credits
Yeah, you can do that but it will expose your keys when you share your code.
Definitely that's why it's recommended to hide it or remove it while sharing the code.
I solved this with these steps: Step 1: Comment out your API Key in .env. Step 2: Run your app with the commented out API and the app will throw error that no oepnai key found Step 3: Stop your server (Control C) Step 4: Uncomment your OpenAI Key Step 5: Start your server and this should work if indeed your plan is still valid
Not an issue but to let people like myself not waste 4h of their time downloading 60GiBs of data just to get to the point where, the API key you thought you had on your free account, does not work:
Turns out you cant use openAI API on your free account.
Well, atleast i got to the gradio page. Good luck to all of you bois!