mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
fix(utils.py): fix linting error
This commit is contained in:
parent
f899b828cf
commit
574f5056c8
1 changed files with 4 additions and 4 deletions
|
@ -829,6 +829,9 @@ class StreamingChoices(OpenAIObject):
|
|||
enhancements=None,
|
||||
**params,
|
||||
):
|
||||
# Fix Perplexity return both delta and message cause OpenWebUI repect text
|
||||
# https://github.com/BerriAI/litellm/issues/8455
|
||||
params.pop("message", None)
|
||||
super(StreamingChoices, self).__init__(**params)
|
||||
if finish_reason:
|
||||
self.finish_reason = map_finish_reason(finish_reason)
|
||||
|
@ -836,10 +839,7 @@ class StreamingChoices(OpenAIObject):
|
|||
self.finish_reason = None
|
||||
self.index = index
|
||||
if delta is not None:
|
||||
# Fix Perplexity return both delta and message cause OpenWebUI repect text
|
||||
# https://github.com/BerriAI/litellm/issues/8455
|
||||
if 'message' in params:
|
||||
del self.message
|
||||
|
||||
if isinstance(delta, Delta):
|
||||
self.delta = delta
|
||||
elif isinstance(delta, dict):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue