-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add context tokens from api response to cost calculation #78
base: main
Are you sure you want to change the base?
Conversation
hollup lemme fix the issue then you can review it |
@@ -153,7 +155,7 @@ await message.ReplyAsync(""" | |||
// NOTE: These numbers are hardcoded and not necessarily representative of the actual costs, as the model can change | |||
if (questionTokens != 0 && responseTokens != 0) | |||
answerMessage.AppendLine( | |||
$"Cost: ${Math.Round(questionTokens * 0.00000015 + responseTokens * 0.0000006, 10)}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really see why we remove the dollar sign. Does this somehow get rid of the scientific notation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it round to like 6 places or something and i put it in terms of cents, not dollars so theres less 0s. also multiplied every constant there by 100 to keep the value the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh nice. can you get rid of the "cents" and use ¢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was considering that, but idk if c# likes the cent symbol in strings or if I have to do some u/ bs so I went safe lol if that breaks it thats your fault L
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah you'll be fine. c# string interpolation works like python's rather than js's
L |
hold off on this for now, i wanna add a prompt token thing too |
k we good now |
if possible can we start using horizontal space more. the more we add vertically, the harder it is to read the message |
3fecd05
to
a4bcde1
Compare
k ill put 2 token counts on each line |
also changed the formatting of the cost display...the scientific notation was a little too funny