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

Unable to handle session ID properly in Run Flow from JSON and certain components #3873

Closed
edwinjosechittilappilly opened this issue Sep 20, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@edwinjosechittilappilly
Copy link
Collaborator

edwinjosechittilappilly commented Sep 20, 2024

Bug Description

We are experiencing issues with handling session IDs in the Run Flow from JSON feature and certain components like Store Message. The current implementation has limitations that affect functionality and user experience.

Specific Issues

  1. Session ID input in components:

    • Components like Store Message have a session ID field as a text input.
    • These components cannot take the session ID value as input from other components.
  2. Run Flow from JSON limitation:

    • While we can provide a session ID in CURL commands, there's no way to provide a session ID when using the Run Flow from JSON feature.

Impact

These limitations restrict the flexibility and functionality of our system, particularly in scenarios where dynamic session handling is crucial.

Reproduction

  1. Create a basic flow with Store Message component
  2. Download and attempt to run the flow from JSON
Screenshot 2024-09-20 at 1 00 23 PM

Expected behavior

  1. Components should be able to accept session ID values from other components dynamically.
  2. Run Flow from JSON should have an option to provide or specify a session ID.

Current Behavior

  1. Session ID fields in components are isolated and can't receive input from other parts of the flow, example Store message component.
  2. Run Flow from JSON lacks the ability to specify a session ID, unlike CURL commands.

Possible Solutions

  1. Implement a mechanism for components to accept session ID inputs from other components.
  2. Add a session ID field or parameter in the Run Flow from JSON feature.

Who can help?

No response

Operating System

Mac Os

Langflow Version

1.0.18

Python Version

None

Screenshot

Screenshot 2024-09-20 at 12 57 32 PM

Flow File

AstraDB Chat Memory ChatBot (1).json

@edwinjosechittilappilly edwinjosechittilappilly added the bug Something isn't working label Sep 20, 2024
@cristian473
Copy link

hi, this was working on version 1.0.17, try downgrade and provide session_id like this

body: JSON.stringify({
input_value: text,
output_type: "chat",
input_type: "chat",
session_id: userId, <--
tweaks: {
....

@Cristhianzl
Copy link
Member

Cristhianzl commented Sep 27, 2024

Hi @edwinjosechittilappilly,

I’ve made a small adjustment to the code for the component. It looks like it wasn’t updated during the recent major types update.

To fix this on your end, you’ll need to modify the component’s code. Specifically, update the types shown here:

image

Replace them with the new MessageTextInput types:

image

Once you’ve made this change, you should be able to see the handles and connect components as expected:

image

I’ll also open a PR to update this in future versions of Langflow.

Thanks again for reaching out!
#3950

#4162

@edwinjosechittilappilly
Copy link
Collaborator Author

Hi @Cristhianzl
I did try to solve the issue in the component by changing the type.
Thank you for the feedback.

But can you also look into the issue with run flow from JSON and session id.

This issue was reported in community also.

@Cristhianzl
Copy link
Member

hi @edwinjosechittilappilly @cristian473,

Please follow up on this PR with a proper fix for these inputs.
The type now must be: MessageTextInput

#4162

Thanks!

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