Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get-apikey-from-env-var #462

Merged
merged 4 commits into from
May 23, 2024
Merged

get-apikey-from-env-var #462

merged 4 commits into from
May 23, 2024

Conversation

XMCyber
Copy link

@XMCyber XMCyber commented May 21, 2024

No description provided.

@XMCyber XMCyber closed this May 23, 2024
@XMCyber XMCyber reopened this May 23, 2024
@XMCyber
Copy link
Author

XMCyber commented May 23, 2024

@Niek Could you please review and approve this PR?
This feature should give us the ability to use the API KEY directly from the env file instead of configuring for each user.
It simplifies the deploy process for bigger companies that uses this chatgpt-web as main FE and not all people have the access to the token - so in this case it will be distributed directly from the UI

@Niek
Copy link
Owner

Niek commented May 23, 2024

@XMCyber this is a good addition, but IMHO this should be optional. So comment OPENAI_API_KEY in .env and only if set, use that.

@XMCyber
Copy link
Author

XMCyber commented May 23, 2024

@Niek Make sense, I made the change accordingly - let me know if that is Ok now. Thanks!

src/lib/Storage.svelte Outdated Show resolved Hide resolved
@XMCyber XMCyber requested a review from Niek May 23, 2024 10:42
@Niek Niek merged commit af10178 into Niek:main May 23, 2024
@Niek
Copy link
Owner

Niek commented May 23, 2024

Merged, thanks!

@AurimasNav
Copy link

hey, how do you exactly use this? I've added OPENAI_API_KEY to my container env, but the UI still asks to set OpenAI API key?

@XMCyber
Copy link
Author

XMCyber commented Jun 13, 2024 via email

@AurimasNav
Copy link

Please pull the latest version, there was a bug, the env should be named VITE_OPENAI_TOKEN (also in the code)

On Thu, Jun 13, 2024, 08:57 'Aurimas Navardauskas' via Devops < @.> wrote: hey, how do you exactly use this? I've added OPENAI_API_KEY to my container env, but the UI still asks to set OpenAI API key? — Reply to this email directly, view it on GitHub <#462 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOOM24WV34GFTPFPI56KZTLZHEYEPAVCNFSM6AAAAABIBRE5WWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRUGQ4TENBUGU . You are receiving this because you were mentioned.Message ID: @.>

thanks it works, for anyone else reading this it is actually VITE_OPENAI_API_KEY to save you some time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants