* fix .env.example
comment out DALLE_API_KEY by default and remove `user_provided` as default value since it is not supported
* 📚 docs update
5.5 KiB
PandoraNext Deployment Guide
If you're looking to use the ChatGPT Endpoint in LibreChat, setting up a reverse proxy is a essential. PandoraNext offers a robust solution for this purpose. This guide will walk you through deploying PandoraNext to enable the CHATGPT_REVERSE_PROXY for use with LibreChat.
Using this method you will only be able to use
text-davinci-002-render-shawith PandoraNext in LibreChat. Other models offered with theplussubscription do not work.
You can use it locally in docker or deploy it onthe web for remote access.
Deploy Online by Duplicating Hugging Face Space
To deploy PandoraNext online by duplicating the Hugging Face Space, follow these steps:
-
Get your PandoraNext license id here: PandoraNext Dashboard
-
Configure
config.json: Edit the followingconfig.json. Specify yourlicense_idandproxy_api_prefix. For theproxy_api_prefix, use at least 8 characters, avoid characters that can't be used in a URL and make sure it's unique.Here's the
config.jsonfor your reference:{ "bind": "0.0.0.0:8181", "tls": { "enabled": false, "cert_file": "", "key_file": "" }, "timeout": 600, "proxy_url": "", "license_id": "", "public_share": false, "site_password": "", "setup_password": "", "server_tokens": true, "proxy_api_prefix": "", "isolated_conv_title": "*", "captcha": { "provider": "", "site_key": "", "site_secret": "", "site_login": false, "setup_login": false, "oai_username": false, "oai_password": false }, "whitelist": null } -
Hugging Face Space: Visit the PandoraNext LibreChat Space on Hugging Face.
-
Duplicate the Space: Utilize the available options to duplicate or fork the space into your own Hugging Face account.
-
Fill the required secrets When asked for the
SECRETS,- for
CONFIG_JSONuse the whole content of theconfig.jsonyou just modified, - for
TOKENS_JSONuse the following defaulttoken.json:
{ "test-1": { "token": "access token / session token / refresh token", "shared": true, "show_user_info": false }, "test-2": { "token": "access token / session token / refresh token", "shared": true, "show_user_info": true, "plus": true }, "test2": { "token": "access token / session token / refresh token / share token", "password": "12345" } } - for
-
Configure LibreChat: In the .env file (or secrets settings if you host LibreChat on Hugging Face), set the
CHATGPT_REVERSE_PROXYvariable using the following format:CHATGPT_REVERSE_PROXY=http://your_server_domain.com/your_proxy_api_prefix_here/backend-api/conversation- Replace
your_server_domain.comwith the domain of your deployed space.- you can use this format:
https://username-pandoranext.hf.space(replaceusernamewith your Huggingface username)
- you can use this format:
- Replace
your_proxy_api_prefix_herewith theproxy_api_prefixyou have set in yourconfig.json. - The resulting URL should look similar to:
https://username-pandoranext.hf.space/your_proxy_api_prefix_here/backend-api/conversation
- Replace
Deploy Locally Using Docker
For local deployment using Docker, the steps are as follows:
-
Clone or Download the Repository: Get the latest release from the PandoraNext GitHub repository.
git clone https://github.com/pandora-next/deploy.git -
Get your PandoraNext license id here: PandoraNext Dashboard
-
Configure
config.json: Within the cloned repository, in thedatafolder, editconfig.json. Specify yourlicense_idandproxy_api_prefix. For theproxy_api_prefix, use at least 8 characters, avoid characters that can't be used in a URL and make sure it's unique.Here's the
config.jsonfor your reference:{ "bind": "0.0.0.0:8181", "tls": { "enabled": false, "cert_file": "", "key_file": "" }, "timeout": 600, "proxy_url": "", "license_id": "", "public_share": false, "site_password": "", "setup_password": "", "server_tokens": true, "proxy_api_prefix": "", "isolated_conv_title": "*", "captcha": { "provider": "", "site_key": "", "site_secret": "", "site_login": false, "setup_login": false, "oai_username": false, "oai_password": false }, "whitelist": null } -
Set Up the LibreChat
.envFiler: In the.envfile within your LibreChat directory, you'll need to set theCHATGPT_REVERSE_PROXYvariable:CHATGPT_REVERSE_PROXY=http://host.docker.internal:8181/your_proxy_api_prefix_here/backend-api/conversation- Replace
your_proxy_api_prefix_herewith the actual proxy API prefix.
- Replace
-
Start Docker Containers: From the PandoraNext directory, run the following command to launch the Docker containers:
docker-compose up -d
Final Notes
- The
proxy_api_prefixshould be sufficiently random and unique to prevent errors. - The default
token.jsondoesn't need to be modified to use with LibreChat - Ensure you have obtained a license ID from the PandoraNext Dashboard.