From e9cedbfca8c6057898f7d76367997d49542a4437 Mon Sep 17 00:00:00 2001 From: Justin Hayes Date: Fri, 28 Jun 2024 11:09:45 -0400 Subject: [PATCH] Fix non-streaming response --- examples/pipelines/providers/google_manifold_pipeline.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/pipelines/providers/google_manifold_pipeline.py b/examples/pipelines/providers/google_manifold_pipeline.py index 916a961..acae5ce 100644 --- a/examples/pipelines/providers/google_manifold_pipeline.py +++ b/examples/pipelines/providers/google_manifold_pipeline.py @@ -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