Skip to content

Commit 1698853

Browse files
fix(sse): small improvement to handling server-sent events (#11)
1 parent 0759138 commit 1698853

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/finch/_base_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ def _process_response_data(
626626

627627
def _process_stream_line(self, contents: str) -> str:
628628
"""Pre-process an indiviudal line from a streaming response"""
629-
if contents == "data: [DONE]\n":
629+
if contents.startswith("data: [DONE]"):
630630
raise StopStreaming()
631631

632632
if contents.startswith("data: "):

0 commit comments

Comments
 (0)