You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -440,3 +440,29 @@ npm run build
440
440
You can preview the production build with `npm run preview`.
441
441
442
442
> 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