📝 docs: clarifications - override file & balance/token count (#1783)

* 📝 docs: override file clarification

* 📝 docs: override file clarification

* 📝 docs: balance & token count clarification
This commit is contained in:
Fuegovic 2024-02-12 15:03:56 -05:00 committed by GitHub
parent d8d79aba16
commit 7ff2418d87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 63 additions and 8 deletions

View file

@ -48,6 +48,42 @@ npm run list-balances
![image](https://github.com/danny-avila/LibreChat/assets/110412045/78175053-9c38-44c8-9b56-4b81df61049e)
## More details
source: [LibreChat/discussions/1640](https://github.com/danny-avila/LibreChat/discussions/1640#discussioncomment-8251970)
> "rawAmount": -000, // what's this?
Raw amount of tokens as counted per the tokenizer algorithm.
> "tokenValue": -00000, // what's this?
Token credits value. 1000 credits = $0.001 (1 mill USD)
> "rate": 00, // what's this?
The rate at which tokens are charged as credits.
For example, gpt-3.5-turbo-1106 has a rate of 1 for user prompt (input) and 2 for completion (output)
| Model | Input | Output |
|-----------------------|----------------------|----------------------|
| gpt-3.5-turbo-1106 | $0.0010 / 1K tokens | $0.0020 / 1K tokens |
Given the provided example:
"rawAmount": -137
"tokenValue": -205.5
"rate": 1.5
![image](https://github.com/danny-avila/LibreChat/assets/32828263/c71139f2-da3f-4550-bbd1-aa51ad52dfaa)
And to get the real amount of USD spend based on **Token Value**:
![image](https://github.com/danny-avila/LibreChat/assets/32828263/757e1b65-acb1-40d8-986e-8d595cf45e08)
The relevant file for editing rates is found in `api/models/tx.js`
## Preview
![image](https://github.com/danny-avila/LibreChat/assets/110412045/39a1aa5d-f8fc-43bf-81f2-299e57d944bb)