Examples and guides for using the OpenAI API
Clean up streaming code (#1133)
Seth Weidmana92a1d2fab58
diff --git a/examples/How_to_stream_completions.ipynb b/examples/How_to_stream_completions.ipynbindex a7809925..57f311ad 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"]},