Skip to content

Commit

Permalink
feat: Set balance (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis531 authored Dec 3, 2024
1 parent 7a27b95 commit ba4151d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/docs/configuration/dotenv.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,8 @@ see: **[Token Usage](/docs/configuration/token_usage)**
#### Managing Balances

- Run `npm run add-balance` to manually add balances.
- You can also specify the email and token credit amount to add, e.g.: `npm run add-balance [email protected] 1000`
- You can also specify the email and token credit amount to add, e.g.: `npm run add-balance [email protected] 1000`
- Run `npm run set-balance` to manually set balances, similar to `add-balance`.
- Run `npm run list-balances` to list the balance of every user.

> **Note:** 1000 credits = $0.001 (1 mill USD)
Expand Down
10 changes: 10 additions & 0 deletions pages/docs/configuration/token_usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ npm run add-balance
npm run add-balance [email protected] 1000
```

Additionally, you can set a balance for a user. An existing balance will be overwritten by the new balance.

```bash filename="To manually set balances, run the following command (npm required):"
npm run set-balance
```

```bash filename="You can also specify the email and token credit amount to set, e.g.:"
npm run set-balance [email protected] 1000
```

This works well to track your own usage for personal use; 1000 credits = $0.001 (1 mill USD)

## Listing of balances
Expand Down

0 comments on commit ba4151d

Please sign in to comment.