Skip to content

Commit

Permalink
fix: prevent Chinese examples from being converted to Unicode encoding (
Browse files Browse the repository at this point in the history
  • Loading branch information
coolmian authored Nov 11, 2024
1 parent 8368021 commit 793530c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dspy/adapters/chat_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def field_metadata(field_name, field_info):
desc = f"must be one of: {'; '.join([str(x) for x in type_.__args__])}"
else:
desc = "must be pareseable according to the following JSON schema: "
desc += json.dumps(prepare_schema(type_))
desc += json.dumps(prepare_schema(type_), ensure_ascii=False)

desc = (" " * 8) + f"# note: the value you produce {desc}" if desc else ""
return f"{{{field_name}}}{desc}"
Expand Down

0 comments on commit 793530c

Please sign in to comment.