mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
fix: perplexity return both delta and message cause OpenWebUI repect text (#9081)
This commit is contained in:
parent
e2d0a3061d
commit
91b9142378
1 changed files with 4 additions and 0 deletions
|
@ -836,6 +836,10 @@ 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