fix(utils): 修复 JSON 日志编码问题
Browse files- 在 json.dumps 中添加 ensure_ascii=False 参数,以支持非 ASCII 字符编码
-这个修改确保了包含中文等非 ASCII 字符的日志信息能够正确处理和显示
- lightrag/utils.py +1 -1
lightrag/utils.py
CHANGED
@@ -358,7 +358,7 @@ async def get_best_cached_response(
|
|
358 |
"cache_id": best_cache_id,
|
359 |
"original_prompt": prompt_display,
|
360 |
}
|
361 |
-
logger.info(json.dumps(log_data))
|
362 |
return best_response
|
363 |
return None
|
364 |
|
|
|
358 |
"cache_id": best_cache_id,
|
359 |
"original_prompt": prompt_display,
|
360 |
}
|
361 |
+
logger.info(json.dumps(log_data, ensure_ascii=False))
|
362 |
return best_response
|
363 |
return None
|
364 |
|