Fixs for translation agent (#3557)

### What problem does this PR solve?

#3556 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Kevin Hu
2024-11-21 16:22:25 +08:00
committed by GitHub
parent d47ee88454
commit 30f111edb3
4 changed files with 97 additions and 4 deletions

View File

@ -385,10 +385,14 @@ class ComponentBase(ABC):
"""
return """{{
"component_name": "{}",
"params": {}
"params": {},
"output": {},
"inputs": {}
}}""".format(self.component_name,
self._param
)
self._param,
json.dumps(json.loads(str(self._param))["output"], ensure_ascii=False),
json.dumps(json.loads(str(self._param))["inputs"], ensure_ascii=False)
)
def __init__(self, canvas, id, param: ComponentParamBase):
self._canvas = canvas