refactor: Extract model info handling into a dedicated class

This commit is contained in:
Paul Gauthier 2024-10-30 13:17:47 -07:00 committed by Paul Gauthier (aider)
parent 267872b7e4
commit a899b0e27e

View file

@ -636,7 +636,8 @@ model_info_url = (
"https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json"
)
#ai refactor get_model_flexible & get_model_info into a class!
# the class should load the cache_file once, on __init__
def get_model_flexible(model, content):
info = content.get(model, dict())
if info: