Skip to content

Commit cd3bf60

Browse files
feat(datagen): Enhance JSON output with ensure_ascii option in SelfImprovingCoTPipeline (camel-ai#1718)
Co-authored-by: Wendong-Fan <[email protected]>
1 parent b643501 commit cd3bf60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

camel/datagen/self_improving_cot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ def __init__(
161161
# Initialize output file with empty results if path is specified
162162
if self.output_path:
163163
with open(self.output_path, 'w') as f:
164-
json.dump({'traces': []}, f, indent=2)
164+
json.dump({'traces': []}, f, indent=2, ensure_ascii=False)
165165
self.lock = threading.Lock()
166166

167167
def safe_write_json(self, file_path, data):
168168
temp_path = file_path + ".tmp"
169169
with open(temp_path, "w") as f:
170-
json.dump(data, f, indent=2)
170+
json.dump(data, f, indent=2, ensure_ascii=False)
171171
os.replace(temp_path, file_path)
172172

173173
def clean_json(self, data):

0 commit comments

Comments
 (0)