AgentOps-AI / tokencost

Easy token price estimates for 400+ LLMs. TokenOps.
https://agentops.ai
MIT License
1.25k stars 41 forks source link

Make print optional in update_token_costs #35

Closed augustfr closed 3 months ago

augustfr commented 3 months ago

Right now the update_token_costs function in tokencost/constants.py has that print statement that always runs.

Makes me not want to use the package since whenever I run my program it prints that first.

Maybe there should be a way to set a verbose bool and have it only print if verbose is set to true. I'd suggest having it default to false unless some function is imported and run to set it to true.

areibman commented 3 months ago

Would a verbosity arg on the function fix this? To what degree do you expect there to be no prints whatsoever?

areibman commented 3 months ago

@augustfr Take a look-- should be a good fix. We also started getting annoyed by the logs haha

https://github.com/AgentOps-AI/tokencost/pull/36