Skip to content

fix: Runflow component output error #6942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
84a2b19
fix: Runflow component output error
Mar 6, 2025
5b1b3bb
Merge branch 'main' into fix_runflow_component
jeevic Mar 21, 2025
9944c43
Merge branch 'main' into fix_runflow_component
jeevic Mar 22, 2025
e8896f5
Merge branch 'main' into fix_runflow_component
jeevic Mar 23, 2025
36f2d7e
Merge branch 'main' into fix_runflow_component
jeevic Mar 25, 2025
c1cc3b4
Merge branch 'main' into fix_runflow_component
jeevic Mar 27, 2025
35bbf98
Merge branch 'main' into fix_runflow_component
jeevic Mar 28, 2025
7e23ae6
Merge branch 'main' into fix_runflow_component
jeevic Mar 31, 2025
1074f15
Merge branch 'main' into fix_runflow_component
jeevic Apr 2, 2025
ca2bac4
Merge branch 'main' into fix_runflow_component
jeevic Apr 3, 2025
743f90a
Merge branch 'main' into fix_runflow_component
jeevic Apr 6, 2025
187c329
Merge branch 'main' into fix_runflow_component
jeevic Apr 8, 2025
f4fecda
Merge branch 'main' into fix_runflow_component
jeevic Apr 9, 2025
e4907ec
Merge branch 'main' into fix_runflow_component
jeevic Apr 10, 2025
8f728af
Merge branch 'main' into fix_runflow_component
jeevic Apr 12, 2025
a7a4798
Merge branch 'main' into fix_runflow_component
jeevic Apr 15, 2025
e1ded33
Merge branch 'main' into fix_runflow_component
jeevic Apr 16, 2025
6a6d758
Merge branch 'main' into fix_runflow_component
jeevic Apr 17, 2025
ff0cc45
Merge branch 'main' into fix_runflow_component
jeevic Apr 17, 2025
049928e
Merge branch 'main' into fix_runflow_component
jeevic Apr 18, 2025
cf64549
Merge branch 'main' into fix_runflow_component
jeevic Apr 25, 2025
73455c6
Merge branch 'main' into fix_runflow_component
jeevic Apr 28, 2025
07e780b
Merge branch 'main' into fix_runflow_component
jeevic Apr 30, 2025
c871dda
Merge branch 'main' into fix_runflow_component
jeevic May 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/backend/base/langflow/base/tools/run_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ async def data_output(self) -> Data:
if isinstance(first_output, Data):
return first_output

message_data = first_output.outputs[0].results["message"].data
# just adaptive output Message
_, message_result = next(iter(run_outputs[0].outputs[0].results.items()))
message_data = message_result.data
return Data(data=message_data)

async def dataframe_output(self) -> DataFrame:
Expand All @@ -80,21 +82,20 @@ async def dataframe_output(self) -> DataFrame:
if isinstance(first_output, DataFrame):
return first_output

message_data = first_output.outputs[0].results["message"].data
# just adaptive output Message
_, message_result = next(iter(run_outputs[0].outputs[0].results.items()))
message_data = message_result.data
return DataFrame(data=message_data if isinstance(message_data, list) else [message_data])

async def message_output(self) -> Message:
"""Return the message output."""
run_outputs = await self.run_flow_with_tweaks()
message_result = run_outputs[0].outputs[0].results["message"]

_, message_result = next(iter(run_outputs[0].outputs[0].results.items()))
if isinstance(message_result, Message):
return message_result

if isinstance(message_result, str):
return Message(content=message_result)

return Message(content=message_result.data["text"])
return Message(text=message_result)
return Message(text=message_result.data["text"])

async def get_flow_names(self) -> list[str]:
# TODO: get flfow ID with flow name
Expand Down
Loading