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:
yangdx 2025-09-27 21:43:46 +08:00
parent 3ca2165c69
commit 46187b2507

View file

@ -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: