Skip to content

Commit 69c0464

Browse files
authored
Add doc section about updating HuggingChat (#683)
* Add doc section about updating HuggingChat config * lint
1 parent cdb33a9 commit 69c0464

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,3 +440,29 @@ npm run build
440440
You can preview the production build with `npm run preview`.
441441

442442
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
443+
444+
## Config changes for HuggingChat
445+
446+
The config file for HuggingChat is stored in the `.env.template` file at the root of the repository. It is the single source of truth that is used to generate the actual `.env.local` file using our CI/CD pipeline. See [updateProdEnv](https://github.com/huggingface/chat-ui/blob/cdb33a9583f5339ade724db615347393ef48f5cd/scripts/updateProdEnv.ts) for more details.
447+
448+
> [!TIP]
449+
> If you want to make changes to model config for HuggingChat, you should do so against `.env.template`.
450+
451+
We currently use the following secrets for deploying HuggingChat in addition to the `.env.template` above:
452+
453+
- `MONGODB_URL`
454+
- `HF_TOKEN`
455+
- `OPENID_CONFIG`
456+
- `SERPER_API_KEY`
457+
458+
They are defined as secrets in the repository.
459+
460+
### Testing config changes locally
461+
462+
You can test the config changes locally by first creating an `.env.SECRET_CONFIG` file with the secrets defined above. Then you can run the following command to generate the `.env.local` file:
463+
464+
```bash
465+
npm run updateLocalEnv
466+
```
467+
468+
This will replace your `.env.local` file with the one that will be used in prod (simply taking `.env.template + .env.SECRET_CONFIG`).

0 commit comments

Comments
 (0)