Fix conditional logic in streaming response parser of unit test
• Change elif to if for response field • Change elif to if for error field • Allow multiple data types per chunk • Fix mutually exclusive conditions • Enable concurrent field processing
This commit is contained in:
parent
3ca2165c69
commit
46187b2507
1 changed files with 2 additions and 2 deletions
|
|
@ -72,9 +72,9 @@ def parse_streaming_response(
|
|||
|
||||
if "references" in data:
|
||||
references = data["references"]
|
||||
elif "response" in data:
|
||||
if "response" in data:
|
||||
response_chunks.append(data["response"])
|
||||
elif "error" in data:
|
||||
if "error" in data:
|
||||
errors.append(data["error"])
|
||||
|
||||
except json.JSONDecodeError:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue