hahahumble / speechgpt

💬 SpeechGPT is a web application that enables you to converse with ChatGPT.
https://speechgpt.app
MIT License
2.73k stars 404 forks source link

【优化】增加访问密码或前端自填API KEY #44

Open WooyJen opened 1 year ago

WooyJen commented 1 year ago

Is your feature request related to a problem?

1、可以在vercel的环境变量里设置网页访问密码 2、可以在部署的网站前端自填openai的api key

Describe the solution you'd like

1、可以在vercel的环境变量里设置网页访问密码 2、可以在部署的网站前端自填openai的api key

Additional context

No response

stevenlee87 commented 1 year ago

I would also like to commit this request. Otherwise, if someone finds out about the page now, it will consume your token amount.

erbanku commented 1 year ago

You already can achieve your request 2 (Let the user bring their OpenAI API key when using the service). Please try to deploy with the button below to do that.

Deploy to Vercel (Without providing any environment variables)

Deploy with Vercel

hahahumble commented 1 year ago

目前已经支持设置网页访问密码 (v0.4.1)

stevenlee87 commented 1 year ago

目前已经支持设置网页访问密码 (v0.4.1)

@hahahumble @WooyJen I use this https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhahahumble%2Fspeechgpt&env=VITE_OPENAI_API_KEY,VITE_ACCESS_CODE&envDescription=If%20you%20do%20not%20want%20to%20provide%20a%20value%2C%20use%20REPLACE_WITH_YOUR_OWN.&project-name=speechgpt&repository-name=speechgpt to deploy vercel.

image

image

image

Access Code must be filled in. image

erbanku commented 1 year ago

If you don't want to fill access code, remove the VITE_ACCESS_CODE environment variable and redeploy it. Please note that, this also disables the site's password protection.