Browse Source

Fix interface as input variable for component. (#4212)

### What problem does this PR solve?

#4108

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.15.1
Kevin Hu 10 months ago
parent
commit
4e5f92f01b
No account linked to committer's email address
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      agent/component/base.py

+ 7
- 0
agent/component/base.py View File

@@ -477,6 +477,13 @@ class ComponentBase(ABC):
assert False, f"Can't find parameter '{key}' for {cpn_id}"
continue

if q["component_id"].lower().find("answer") == 0:
for r, c in self._canvas.history[::-1]:
if r == "user":
self._param.inputs.append(pd.DataFrame([{"content": c, "component_id": q["component_id"]}]))
break
continue

outs.append(self._canvas.get_component(q["component_id"])["obj"].output(allow_partial=False)[1])
self._param.inputs.append({"component_id": q["component_id"],
"content": "\n".join(

Loading…
Cancel
Save