mirror of
https://github.com/hwchase17/langchain
synced 2024-11-10 01:10:59 +00:00
core[patch]: Support non ASCII characters in tool output if user doesn't output string (#26319)
### simple modify core: add supporting non english character target issue is #26315 same issue on langgraph - https://github.com/langchain-ai/langgraph/issues/1504
This commit is contained in:
parent
b993172702
commit
7feae62ad7
@ -822,7 +822,7 @@ def _is_message_content_block(obj: Any) -> bool:
|
||||
|
||||
def _stringify(content: Any) -> str:
|
||||
try:
|
||||
return json.dumps(content)
|
||||
return json.dumps(content, ensure_ascii=False)
|
||||
except Exception:
|
||||
return str(content)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user