From a92a1d2fab58081732cfcfd0abbbbec830928a00 Mon Sep 17 00:00:00 2001 From: Seth Weidman Date: Wed, 10 Apr 2024 09:27:54 -0700 Subject: [PATCH] Clean up streaming code (#1133) Co-authored-by: Seth Weidman --- examples/How_to_stream_completions.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/How_to_stream_completions.ipynb b/examples/How_to_stream_completions.ipynb index a780992..57f311a 100644 --- a/examples/How_to_stream_completions.ipynb +++ b/examples/How_to_stream_completions.ipynb @@ -553,7 +553,7 @@ "print(f\"Full response received {chunk_time:.2f} seconds after request\")\n", "# clean None in collected_messages\n", "collected_messages = [m for m in collected_messages if m is not None]\n", - "full_reply_content = ''.join([m for m in collected_messages])\n", + "full_reply_content = ''.join(collected_messages)\n", "print(f\"Full conversation received: {full_reply_content}\")\n" ] },