mirror of
https://github.com/open-webui/pipelines
synced 2025-05-11 08:01:08 +00:00
Fix non-streaming response
This commit is contained in:
parent
b82d902185
commit
e9cedbfca8
@ -121,9 +121,7 @@ class Pipeline:
|
|||||||
|
|
||||||
if body["stream"]:
|
if body["stream"]:
|
||||||
print("Streaming response")
|
print("Streaming response")
|
||||||
for chunk in response:
|
return (chunk.text for chunk in response)
|
||||||
yield chunk.text
|
|
||||||
return ""
|
|
||||||
else:
|
else:
|
||||||
print("Non-streaming response")
|
print("Non-streaming response")
|
||||||
result = response.text
|
result = response.text
|
||||||
|
Loading…
Reference in New Issue
Block a user