diff --git a/src/finch/_base_client.py b/src/finch/_base_client.py index 43e23178..6423b74a 100644 --- a/src/finch/_base_client.py +++ b/src/finch/_base_client.py @@ -626,7 +626,7 @@ def _process_response_data( def _process_stream_line(self, contents: str) -> str: """Pre-process an indiviudal line from a streaming response""" - if contents == "data: [DONE]\n": + if contents.startswith("data: [DONE]"): raise StopStreaming() if contents.startswith("data: "):