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

Option to configure API key for instance #21

Open
zekker6 opened this issue Mar 22, 2023 · 7 comments · May be fixed by #32
Open

Option to configure API key for instance #21

zekker6 opened this issue Mar 22, 2023 · 7 comments · May be fixed by #32

Comments

@zekker6
Copy link

zekker6 commented Mar 22, 2023

For my use-case I'd like to host chatpad in a private space for several users who will have access.
Current implementation is great for privacy and shared deployments for different users, but it's a bit hard to explain non-technical users how to insert their key and configure model for usage.

It would be great if there would be an option to configure an API key which will be used for all users.
For the docker deployment(hoping #8 is getting merged soon :) ) it would be great to have option to define an env variable which will be used for this.

Since this is a static front-end applications I can suggest 2 options to implement this atm:

  • to use some bash scripting for docker container startup and embed key value in some special placeholder.
    This option would require to define some variable in code and set a unique value which could be replaced when container will start. While I've used similar approach in the past, and it worked, but it seems to be very hacky way for this.
  • to write a key into some file and read it with regular HTTP request served by nginx. Application than can just request key and use it.

Option 2 seems to be less secure than option one, but both options will have a key in plaintext when just browsing source. For my use-case it is safe to have key in plaintext without any authentication since it will only be reachable inside my network, so there is no risk of leaking key to public.

I will be happy to help with scripting/docker setup if this will be implemented and any help will be needed.

@Supernova3339
Copy link
Collaborator

hey there 👋
I've been thinking about this for awhile - however I don't have the time to implement it.
The multi user part - not the API key setting.

@GOvEy1nw
Copy link

ah that's a shame. That would be fantastic.

@flowjzh
Copy link

flowjzh commented Mar 27, 2023

Similar use case here (dealing with a bunch of recruiters) and this feature would be a big help.

@jremick
Copy link

jremick commented Apr 18, 2023

Having a method of saving the API key for the instance, not in the browser, would be great. I'd like to run instances of this on my local server for family/friends as well as use a personal instance across multiple systems/browsers (entering an API key each time is a hassle).

@Supernova3339
Copy link
Collaborator

Supernova3339 commented Apr 19, 2023 via email

@nrgbistro
Copy link

nrgbistro commented Apr 20, 2023

It would also be nice to save chats and prompts to the instance rather than the browser. This would let me access my previous chats I wrote on my desktop from my laptop, similar to how the actual chatGPT frontend works. I guess this also involves user auth in some way to separate each person's chats. Perhaps SSO could be implemented to start?

@Supernova3339
Copy link
Collaborator

This is accessable from your data export. Adding accounts adds a database. Chatpad has one, however its browser side and not server side. Feel free to make a PR if you wan to implement this yourself.

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 a pull request may close this issue.

6 participants