I created an AI chatbot using python using the power of GPT-3.5

Question:
Can you guys test it and see if there are any bugs. I will make sure to give you guys the credit. If possible, tell me how I can fix the bug.

Repl link/Link to where the bug appears:
https://replit.com/@PrabhavSrivatsa/GTP-35-in-python?v=1

Screenshots, links, or other helpful context:

code snippet

You need to add your actual OpenAI API key, as the error says.

They likely did, but secrets are not available on cover page (that would be a security issue).

2 Likes

Not via os.environ, no. But their script having a call to get the Secret would would fine…lol

you’d need to insert your own openai api key or use a proxy (such as anirudhgpt api). I’d recommend asking TWA for that.

What do you mean? Secrets are usually pulled from os environ, where else would you call it from securely?

1 Like

:wave: Hey @PrabhavSrivatsa, welcome to the community!

I moved your topic out of Replit Help as you’re not seeking help on how to use the platform.

Unfortunately, we can’t test out your project as you’re using Secrets to hide your OpenAI API token and being able to access Secrets from the Cover Page would be a massive security risk as @Firepup650 said.

2 Likes

So all GPT-related Repls have never worked? They used to work for me…they probably still do

If they were not a website and didn’t put the token straight in the code then yes, they have never worked.

I swear/promise/recall that GPT Repls have worked before…I’m so confused?

Maybe they put the token in the code or something

Nope, I looked at the code it was in a Secret.

What would the point of Secrets be at this point anyway?

…so that people don’t take your api key and spend a bunch on it?

Yeah but if projects don’t work with them anyway…

You want people to spend all of your money on OpenAI just because your Repl won’t work for other people without it?

1 Like

@boston2029 if you run a non-webview repl, then it gets ghost forked and the secrets get deleted.