Skip to content

Commit ec939f3

Browse files
authored
Fix AttributeError bug (#170)
* support handling streaming in SGP * fix bug
1 parent fa14718 commit ec939f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

launch/model_endpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def __next__(self):
305305
"""Uses server-sent events to iterate through the stream."""
306306
event = self.events.__next__()
307307
data = json.loads(event.data)
308-
result = data.get("result", {})
308+
result = data.get("result", {}) or {}
309309
return EndpointResponse(
310310
client=None,
311311
status=data["status"],

0 commit comments

Comments
 (0)