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

updating prompt template severs existing connections in flow #1903

Closed
bettinaswynnerton opened this issue May 15, 2024 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@bettinaswynnerton
Copy link

Describe the bug
Updating the prompt template severs all connections in the flow

Browser and Version

  • Chrome
  • Version [124]

To Reproduce
Steps to reproduce the behavior in prompt component

  1. Go to 'template' field
  2. update the prompt
  3. Save
  4. See error: all connections are severed, both inbound and outbound.

Additional context
This happens the first time when updating a newly created prompt component. After recreating the connections and repeating these steps, those connections stay. We used the Vector Store RAG template

Copy link

dosubot bot commented May 15, 2024

To address the issue where updating the prompt template in Langflow severs all connections in the flow when using Chrome version 124, it's important to consider several aspects based on the Langflow repository insights:

  1. Dynamic Prompt Loading: Langflow updates the prompt template through a process that involves dynamically importing and loading prompt classes. This includes merging custom prompts into the available prompts set, which should not inherently sever connections. However, if this update process triggers a component reload or reconfiguration that affects the application's state, it could inadvertently disrupt existing connections.

  2. Browser-Specific Configurations: Langflow includes browser-specific configurations, particularly for Chromium-based browsers like Chrome. These configurations are tailored to browser capabilities, such as clipboard permissions. If Chrome version 124 introduced changes affecting these permissions or other browser-specific features, it could impact the behavior observed when updating prompt templates.

  3. Connection Management: Connections between components in Langflow are managed using edges that connect nodes based on valid source and target IDs. Functions like cleanEdges and isValidConnection ensure connections are valid and semantically correct. When updating a component, functions like updateEdgesHandleIds and updateIds are crucial for maintaining the integrity of these connections by adjusting to new or changed IDs.

Given these insights, the issue might stem from the dynamic loading process not accounting for browser-specific changes in Chrome version 124 or from an unintended side effect of the update process on the application's state management, leading to severed connections. It's recommended to review the update process for prompt templates, especially how it interacts with the application's state and browser-specific configurations, to identify potential causes for this behavior. Additionally, ensuring that the dynamic loading and connection management logic robustly handles changes without disrupting existing connections could mitigate this issue.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@dosubot dosubot bot added the bug Something isn't working label May 15, 2024
@anovazzi1
Copy link
Contributor

Hello,
Sorry for the delay. Did you try using the new version? Does the error still persist?

@carlosrcoelho
Copy link
Contributor

Hi @bettinaswynnerton

I hope you're doing well. Just a friendly reminder that if we do not hear back from you within the next 3 days, we will close this issue. If you need more time or further assistance, please let us know.


Thank you for your understanding!

@carlosrcoelho carlosrcoelho self-assigned this Jul 22, 2024
@carlosrcoelho
Copy link
Contributor

Thank you for your contribution! This issue will be closed. If you have any questions or encounter another problem, please open a new issue and we will be ready to assist you.

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