mirror of https://github.com/microsoft/autogen.git
fix: be compatible with custom model without full response (#222)
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
This commit is contained in:
parent
04319c968a
commit
3eda9ed74d
|
@ -1026,7 +1026,7 @@ class Completion(openai_Completion):
|
|||
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}")
|
||||
|
|
Loading…
Reference in New Issue