Skip to content
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

refactor model parameter type to be enum #7

Open
trisha opened this issue Dec 15, 2023 · 0 comments
Open

refactor model parameter type to be enum #7

trisha opened this issue Dec 15, 2023 · 0 comments
Labels
good first issue Good for newcomers wontfix This will not be worked on

Comments

@trisha
Copy link
Collaborator

trisha commented Dec 15, 2023

We currently have error handling for when the model string input doesn't match our dictionary, but can eventually refactor to make it an enum that matches one of the below model names in our constants dictionary to make it even more explicit:

https://github.com/AgentOps-AI/tokencost/blob/main/tokencost/constants.py

Not too familiar with Python so I'm not sure if code editors have shortcuts for viewing definitions of enums like TypeScript does, but our code is easy enough to read that in our error messages as well as the code itself we just redirect people to the constants file

@trisha trisha added good first issue Good for newcomers wontfix This will not be worked on labels Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant