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

[BUG] Unable to save the value of a state variable from custom tool #3118

Open
vishwajeetio opened this issue Aug 30, 2024 · 5 comments
Open
Labels
question Further information is requested

Comments

@vishwajeetio
Copy link

Describe the bug
I am trying to save the value of a state variable on conditional agent from the custom js tool. but nothing seems to be working

To Reproduce
Steps to reproduce the behavior:

  1. Go to a conditional agent
  2. Click on custom js tool
  3. Scroll down to the js code
  4. See error by trying to save just a random value for a random variable to the state

Expected behavior
Should update the value of state variable

@HenryHengZJ
Copy link
Contributor

can you share the flow? you can only save the state via Update State:
image

@HenryHengZJ HenryHengZJ added the question Further information is requested label Aug 31, 2024
@takefy-dev
Copy link

how you can save state with a custom tool ?

@vishwajeetio
Copy link
Author

I couldn't so decided to save the data from custom tool to a json and later on used it when ever needed. Hope that answers your question.

@takefy-dev
Copy link

yeah pretty work around, would be nice in the future to be able to update state everywhere in the flow

@vishwajeetio
Copy link
Author

yeah, tried everything but that's the best I could find. You can assign the json name to chat id and then you can use it inside other tool with the chat id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants