Fix multiple generate (#1722)
### What problem does this PR solve? #1625 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@@ -59,8 +59,10 @@ class Answer(ComponentBase, ABC):
|
||||
stream = self.get_stream_input()
|
||||
if isinstance(stream, pd.DataFrame):
|
||||
res = stream
|
||||
answer = ""
|
||||
for ii, row in stream.iterrows():
|
||||
yield row.to_dict()
|
||||
answer += row.to_dict()["content"]
|
||||
yield {"content": answer}
|
||||
else:
|
||||
for st in stream():
|
||||
res = st
|
||||
|
||||
Reference in New Issue
Block a user