dynamically get pricing and context length for openrouter models

This commit is contained in:
JV 2023-08-15 04:04:02 +12:00 committed by Joshua Vial
parent 041f3a4a38
commit a0d6efc13c
2 changed files with 11 additions and 2 deletions

View file

@ -901,6 +901,5 @@ class Coder:
def check_model_availability(main_model):
available_models = openai.Model.list()
print(available_models)
model_ids = [model.id for model in available_models["data"]]
return main_model.name in model_ids