Skip to content

Commit

Permalink
fix: be compatible with custom model without full response (microsoft…
Browse files Browse the repository at this point in the history
…#222)

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
  • Loading branch information
jtsang4 and qingyun-wu committed Oct 13, 2023
1 parent 4617629 commit 0d748b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autogen/oai/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ def cost(cls, response: dict):
Returns:
The cost in USD. 0 if the model is not supported.
"""
model = response["model"]
model = response.get("model")
if model not in cls.price1K:
return 0
# raise ValueError(f"Unknown model: {model}")
Expand Down

0 comments on commit 0d748b5

Please sign in to comment.