mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 04:15:53 +08:00
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)
This commit is contained in:
parent
7d8e0602aa
commit
4e5f92f01b
@ -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…
x
Reference in New Issue
Block a user