jbilcke-hf/clapper

Allow using the server tokens instead of the user tokens

Closed this issue · 1 comments

  1. Add a client-side setting "Clapper API Key" (string)

The goal of this new field is to allow someone to use the server's own stored API keys instead of the user's tokens.

This is useful when deploying Clapper to a custom private server (eg. for team usage)

  1. Add an environment variable "Disable custom provider" (boolean)

This will prevent the use of custom user token (and thus guarantee that their individual API tokens for OpenAI, Replicate etc.. will never be logged or billed).

This should remove the API tokens from the API calls (when the frontend calls the backend) and hide the provider api key options in the user settings, to make things even more user-friendly.

  1. Read provider api tokens from the environment file (.env.local), and use them when performing API calls.

  2. Ensure that the server-tokens are only used if the Clapper API Key is defined

Notes:
For now there will be only one API key per server. This can be improved later (user account system, login page)

done