Open SpringBootReactTypescriptTailwindMaster opened 4 months ago
Did you go into the settings wheel and hit edit and paste your gpt api and save?
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
response = client.models.list()
for model in response.data:
if model.id.startswith("gpt-4"):
print(model.id)
run this code to check how many models are available for you.
Did you go into the settings wheel and hit edit and paste your gpt api and save?
Yes i saved the settings Maybe i should change the openAI api endpoint ?
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY")) response = client.models.list() for model in response.data: if model.id.startswith("gpt-4"): print(model.id)
run this code to check how many models are available for you.
Where i have to add this script ?
the last message indicates that Settings are not logged
i just wanna precise that my version of python is 3.12.2 and not < 3.12
Version's requirements
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY")) response = client.models.list() for model in response.data: if model.id.startswith("gpt-4"): print(model.id)
run this code to check how many models are available for you.
Where i have to add this script ?
the last message indicates that Settings are not logged
make a test.py, copy this code and run that file (replace your api key).
I did this : setx OPENAI_API_KEY ""
And i runned python test.py but it show nothing :
I did this : setx OPENAI_API_KEY ""
And i runned python test.py but it show nothing :
It should be OpenAI(api_key="sk-....")
And print the response.
exactly the same thing.
Hello
I bought GPT premium, but this bug has appeared. What should I do?