Logo
Explore Help
Register Sign In
yujunjun/dify
1
0
Fork 0
You've already forked dify
mirror of https://github.com/langgenius/dify.git synced 2025-06-27 05:30:04 +00:00
Code Issues Packages Projects Releases Wiki Activity
dify/api/libs/jsonutil.py

12 lines
234 B
Python
Raw Normal View History

feat: Persist Variables for Enhanced Debugging Workflow (#20699) This pull request introduces a feature aimed at improving the debugging experience during workflow editing. With the addition of variable persistence, the system will automatically retain the output variables from previously executed nodes. These persisted variables can then be reused when debugging subsequent nodes, eliminating the need for repetitive manual input. By streamlining this aspect of the workflow, the feature minimizes user errors and significantly reduces debugging effort, offering a smoother and more efficient experience. Key highlights of this change: - Automatic persistence of output variables for executed nodes. - Reuse of persisted variables to simplify input steps for nodes requiring them (e.g., `code`, `template`, `variable_assigner`). - Enhanced debugging experience with reduced friction. Closes #19735.
2025-06-24 09:05:29 +08:00
import json
from pydantic import BaseModel
class PydanticModelEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, BaseModel):
return o.model_dump()
else:
super().default(o)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 150ms Template: 9ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API