feat: integrate flask-orjson for improved JSON serialization performance (#23935)
This commit is contained in:
parent
4a2e6af9b5
commit
e340fccafb
8 changed files with 64 additions and 27 deletions
8
api/extensions/ext_orjson.py
Normal file
8
api/extensions/ext_orjson.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue