Fix non-streaming response

This commit is contained in:
Justin Hayes
2024-06-28 11:09:45 -04:00
committed by GitHub
parent b82d902185
commit e9cedbfca8

View File

@@ -121,9 +121,7 @@ class Pipeline:
if body["stream"]:
print("Streaming response")
for chunk in response:
yield chunk.text
return ""
return (chunk.text for chunk in response)
else:
print("Non-streaming response")
result = response.text