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

URL component lost imported urls in tool mode when refresh UI #5378

Closed
tamdqa opened this issue Dec 20, 2024 · 4 comments
Closed

URL component lost imported urls in tool mode when refresh UI #5378

tamdqa opened this issue Dec 20, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@tamdqa
Copy link

tamdqa commented Dec 20, 2024

Bug Description

I have this issue when i build multi agent flow like import json below

  • URL Component Before refresh UI:
    image
    image

After refresh UI:
image
image

I have check in normal mode of URL Component, and this bug does not appear.

Reproduction

  1. Create flow
  2. Add URL component, change to Tool mode
  3. Input Urls
  4. Save flow
  5. Reload UI (Press F5)

Expected behavior

URL component has keep Urls has input. In Tool mode

Who can help?

No response

Operating System

Windows 11/Docker

Langflow Version

v1.1.1

Python Version

None

Screenshot

No response

Flow File

Simple Agent (bug).json

@tamdqa tamdqa added the bug Something isn't working label Dec 20, 2024
Copy link

dosubot bot commented Dec 20, 2024

Hey @tamdqa! 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 with the URL component losing imported URLs in Tool mode after refreshing the UI seems to be related to state persistence. In Langflow, state persistence is typically managed using the useAutoSaveFlow hook, which automatically saves the current state of the flow, including nodes and edges, whenever there are changes [1]. However, it appears that this mechanism might not be functioning correctly for the URL component in Tool mode, leading to the loss of input data upon UI refresh.

To address this issue, you might want to check if the useAutoSaveFlow hook is correctly implemented for the URL component in Tool mode. Additionally, ensure that any specific state management logic for the URL component is correctly handling the persistence of input data when switching modes or refreshing the UI. If the problem persists, it may require further investigation or a potential bug fix in the Langflow codebase.

To continue talking to Dosu, mention @dosu.


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

@ZacharyLeahan
Copy link

Same issue here. Here's a GIF.
Animation

@ZacharyLeahan
Copy link

@tamdqa Ok actually it dawned on me "receiving input" is what the user would input in the playground (not hardcoded in flow). So in the playground try asking to scrape a url and you'll see the agent choose to use the url tool.
Animationferns
So @lucaseduoli This could be closed (or maybe consider a small UI enhancement so the + icon isn't there in tool mode when it isn't relevant during flow definition).

@lucaseduoli
Copy link
Collaborator

lucaseduoli commented Dec 23, 2024

Hi! Thanks for the feedback! We just made that change and now the value disappears when enabling tool mode. Indeed the tool mode is made so that the Agent can scrape the URLs by itself. Thanks!

#5316

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

3 participants