mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(utils.py): fix streaming chunks to not return role, unless set
This commit is contained in:
parent
76f053f85b
commit
d46df34ff5
2 changed files with 7 additions and 6 deletions
|
@ -233,7 +233,8 @@ class Delta(OpenAIObject):
|
|||
def __init__(self, content=None, role=None, **params):
|
||||
super(Delta, self).__init__(**params)
|
||||
self.content = content
|
||||
self.role = role
|
||||
if role is not None:
|
||||
self.role = role
|
||||
|
||||
def __contains__(self, key):
|
||||
# Define custom behavior for the 'in' operator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue