mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix: perplexity return both delta and message cause OpenWebUI repect text (#9081)
This commit is contained in:
parent
65ef65d360
commit
42b7921ca1
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
Reference in a new issue