Skip to content
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

API Request Component Tool Mode reverts to normal after reloading. #5399

Open
vuminhluan opened this issue Dec 23, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@vuminhluan
Copy link

Bug Description

I used the API Request Component as a Tool and connected it to the Agent Component.
However, after reloading, the Tool mode of the API Request Component reverts to normal.

Reproduction

  1. Create a flow
  2. Add the Agent component and the API Request component
  3. Turn on Tool Mode on the API Request component
  4. Connect the API Request to the Agent component
  5. Reload (F5)
  6. The Tool Mode of the API Request component reverts to normal (off)

Expected behavior

The Tool Mode of the API Request Component should persist after reloading

Who can help?

No response

Operating System

Windows 11/Docker

Langflow Version

v1.1.1

Python Version

None

Screenshot

issue

Flow File

No response

@vuminhluan vuminhluan added the bug Something isn't working label Dec 23, 2024
Copy link

dosubot bot commented Dec 23, 2024

Hey there, @vuminhluan! I'm here to help you with any bugs, questions, or contributions you might have. Let's work together to resolve this issue.

The issue you're experiencing, where the Tool Mode of the API Request Component reverts to normal after reloading, suggests that the state persistence for the Tool Mode might not be functioning correctly. The persistence of component states in Langflow is typically managed by the create_state_model_from_graph function, which generates a model representing the state of the entire graph, including individual components [1].

If the Tool Mode state is not being saved or loaded correctly, it could be due to a bug in how the state is being serialized or deserialized. Unfortunately, I couldn't find specific information on how the Tool Mode state is stored and retrieved during the flow save and load process, which might indicate a gap in the current implementation or documentation.

To address this issue, you might want to check the implementation of the state persistence logic, particularly focusing on whether the Tool Mode state is included in the model generated by create_state_model_from_graph. Additionally, reviewing any recent changes or known issues related to state persistence could provide further insights. If this persists, it might be worth investigating further in the codebase or reaching out to other contributors who might have more context on this specific functionality.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant