Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_summary: Switch to orjson.
Alex Vandiver69524b48b5d6
diff --git a/zerver/actions/message_summary.py b/zerver/actions/message_summary.pyindex 295e7daf1e7..ae4257830a4 100644--- a/zerver/actions/message_summary.py+++ b/zerver/actions/message_summary.py@@ -1,6 +1,6 @@-import jsonfrom typing import Any+import orjsonfrom django.conf import settingsfrom django.utils.timezone import now as timezone_now@@ -47,7 +47,7 @@ def format_zulip_messages_for_model(zulip_messages: list[dict[str, Any]]) -> str{"sender": message["sender_full_name"], "content": message["content"]}for message in zulip_messages]- return json.dumps(zulip_messages_list)+ return orjson.dumps(zulip_messages_list).decode()def make_message(content: str, role: str = "user") -> dict[str, str]: