[Bugfix] Fix Apertus streaming scientific notation (#61812)
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io> Co-authored-by: Flora Feng <4florafeng@gmail.com>
This commit is contained in:
@@ -417,7 +417,9 @@ class ApertusToolParser(ToolParser):
|
||||
|
||||
"""
|
||||
try:
|
||||
parsed, _ = partial_json_loads(json_str, Allow.ALL)
|
||||
# An exponent can change a number's already-streamed representation.
|
||||
flags = Allow.ALL if is_final else Allow.ALL & ~Allow.NUM
|
||||
parsed, _ = partial_json_loads(json_str, flags)
|
||||
if not isinstance(parsed, list):
|
||||
parsed = [parsed] if parsed else []
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user