You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FlowHeader models includes endpoint_name but when invoking the read flow api (https://docs.langflow.org/api/read-flows) with parameter header_flows=true it always return None.
There seems to be a missing mapping
Reproduction
Start Langflow
Create a new flow and set the endpoint name to a value (i.e "my-example-endpoint")
Hey @dariosaltarelli! I'm here to help you with any bugs, questions, or contributions. Let's tackle this together!
The issue you're encountering with the read flow API in Langflow, where the endpoint_name field returns null when header_flows is set to true, seems to be related to how the API is currently implemented. The read_flows function, when header_flows is true, returns a list of flow headers but does not include the endpoint_name in its response structure [1].
To resolve this, you would need to modify the read_flows function to include the endpoint_name in the response when header_flows is true. This would involve updating the part of the code that constructs the response to ensure that endpoint_name is included and correctly populated from the flow data.
Here's a conceptual example of how you might adjust the response structure:
ifheader_flows:
return [
{
"id": flow.id,
"name": flow.name,
"folder_id": flow.folder_id,
"is_component": flow.is_component,
"description": flow.description,
"endpoint_name": flow.endpoint_name, # Ensure this field is included
}
forflowinflows
]
This change would ensure that the endpoint_name is part of the response when header_flows is true, and it should be populated with the correct value from the flow data.
Bug Description
FlowHeader models includes endpoint_name but when invoking the read flow api (https://docs.langflow.org/api/read-flows) with parameter header_flows=true it always return None.
There seems to be a missing mapping
Reproduction
Results looks something like:
[ {"id":"19c8256f-95ad-4c81-991c-ec6a871848f1", "name":"Test Endpoint Name", "folder_id":"5bf5bd1a-8c12-48f8-9050-94ae84874926", "is_component":false, **"endpoint_name":null,** "description":"Building Intelligent Interactions."}]
Expected behavior
Result should be:
[ {"id":"19c8256f-95ad-4c81-991c-ec6a871848f1", "name":"Test Endpoint Name", "folder_id":"5bf5bd1a-8c12-48f8-9050-94ae84874926", "is_component":false, **"endpoint_name":"my-example-endpoint",** "description":"Building Intelligent Interactions."}]
Who can help?
No response
Operating System
Linux
Langflow Version
1.1.1
Python Version
3.12
Screenshot
No response
Flow File
{
"endpoint_name": "my-example-endpoint",
"id": "19c8256f-95ad-4c81-991c-ec6a871848f1",
"tags": null,
"locked": null,
"gradient": null,
"folder_id": "5bf5bd1a-8c12-48f8-9050-94ae84874926",
"is_component": false,
"data": {
"nodes": [],
"edges": [],
"viewport": {
"zoom": 1,
"x": 0,
"y": 0
}
},
"updated_at": "2024-12-19T09:33:10+00:00",
"icon": null,
"name": "Test Endpoint Name",
"icon_bg_color": null,
"webhook": false,
"user_id": "ddbc389b-fb22-4ff9-9a79-ba6177d01762",
"description": "Building Intelligent Interactions."
}
The text was updated successfully, but these errors were encountered: