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

Passing state to tool so that we can use them in custom tools #3103

Merged

Conversation

Jrakru
Copy link
Contributor

@Jrakru Jrakru commented Aug 28, 2024

Allows the use of $flow.state.var inside the custom tool by passing the state in the ToolNode:

for example:
image

we have the output
image

when we use the following function in the custom tool node: return successfully called tool ${$flow.state.test}`;

This is inlie with the behaviour mentionsed in the How to Use Function

image

Previously we were getting the following an error:
image

Ps: I am only passing the state without the messages since we are already using the toolNode to get the functions to calls. I dont see why we would need the messages in the tool itself but I could be shortsighted on this.

@HenryHengZJ
Copy link
Contributor

think we can close this one since this PR (#3075) is merged and it fixed the issue

@HenryHengZJ
Copy link
Contributor

thank you so much @Jrakru !

@HenryHengZJ HenryHengZJ merged commit 2e45851 into FlowiseAI:main Aug 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants