mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 10:14:26 +00:00
fix_delta_get_default
This commit is contained in:
parent
baa528a102
commit
a10106cd7b
1 changed files with 2 additions and 1 deletions
|
@ -543,7 +543,8 @@ class Delta(OpenAIObject):
|
|||
|
||||
def get(self, key, default=None):
|
||||
# Custom .get() method to access attributes with a default value if the attribute doesn't exist
|
||||
return getattr(self, key, default)
|
||||
value = getattr(self, key, default)
|
||||
return default if value is None else value
|
||||
|
||||
def __getitem__(self, key):
|
||||
# Allow dictionary-style access to attributes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue