📃 feat: add list-balances, remove-user, and improve User scripts (#1418)

* Refactoring opening of DB to config/helpers.js

* Adding two user scripts:

- 'delete-user' to remove a user definitely
- 'list-balances' to show the balances of all the users
This commit is contained in:
Linus Gasser 2023-12-30 19:25:12 +01:00 committed by GitHub
parent 8735db0980
commit 1a95bef677
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 137 additions and 82 deletions

View file

@ -30,6 +30,14 @@ npm run add-balance danny@librechat.ai 1000
This works well to track your own usage for personal use; 1000 credits = $0.001 (1 mill USD)
## Listing of balances
To see the balances of your users, you can run:
```bash
npm run list-balances
```
## Notes
- With summarization enabled, you will be blocked from making an API request if the cost of the content that you need to summarize + your messages payload exceeds the current balance