🐛 fix(endpoints.py): change graph_data variable to use flow_obj.data instead of flow_obj.flow
The graph_data variable was previously assigned to flow_obj.flow, which is incorrect as the flow_obj object does not have a flow attribute. Instead, the correct attribute to use is flow_obj.data.
This commit is contained in:
parent
c76ee24a78
commit
cdbe2b0401
1 changed files with 2 additions and 3 deletions
|
|
@ -33,9 +33,8 @@ async def get_load(
|
|||
flow_obj = session.get(Flow, flow_id)
|
||||
if flow_obj is None:
|
||||
raise ValueError(f"Flow {flow_id} not found")
|
||||
graph_data = flow_obj.flow
|
||||
data: dict = graph_data.get("data", {})
|
||||
response = process_graph_cached(data, predict_request.message)
|
||||
graph_data = flow_obj.data
|
||||
response = process_graph_cached(graph_data, predict_request.message)
|
||||
return PredictResponse(
|
||||
result=response.get("result", ""),
|
||||
intermediate_steps=response.get("thought", ""),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue