feat: integrate flask-orjson for improved JSON serialization performance (#23935)

This commit is contained in:
-LAN- 2025-08-14 19:50:59 +08:00 committed by GitHub
commit e340fccafb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 64 additions and 27 deletions

View file

@ -0,0 +1,8 @@
from flask_orjson import OrjsonProvider
from dify_app import DifyApp
def init_app(app: DifyApp) -> None:
"""Initialize Flask-Orjson extension for faster JSON serialization"""
app.json = OrjsonProvider(app)