[Enhancement]: Check balance function #7675
superphao4
started this conversation in
Feature Requests & Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What features would you like to see added?
It seems that the current checkBalance function only checks whether the user has enough tokens for promptTokens, but does not check whether the output tokens might exceed the user's balance.
More details
I need to also check whether the user's balance is sufficient for both the prompt tokens and the model's output tokens. I suggest adding a max token output parameter to calculate the tokenCost in the checkBalance function. This way, it can calculate the maximum cost the user might have to pay for the current message.
Which components are impacted by your request?
No response
Pictures
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions