Fix agent session API (#3589)

### What problem does this PR solve?

#3585
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2024-11-22 16:19:00 +08:00
committed by GitHub
parent ee33bf71eb
commit cc219ff648
14 changed files with 36 additions and 94 deletions

View File

@ -390,8 +390,8 @@ class ComponentBase(ABC):
"inputs": {}
}}""".format(self.component_name,
self._param,
json.dumps(json.loads(str(self._param))["output"], ensure_ascii=False),
json.dumps(json.loads(str(self._param))["inputs"], ensure_ascii=False)
json.dumps(json.loads(str(self._param)).get("output", {}), ensure_ascii=False),
json.dumps(json.loads(str(self._param)).get("inputs", []), ensure_ascii=False)
)
def __init__(self, canvas, id, param: ComponentParamBase):