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

[FEATURE] Agent output as JSON format (Sequential Agents) #3114

Open
rb58853 opened this issue Aug 29, 2024 · 5 comments
Open

[FEATURE] Agent output as JSON format (Sequential Agents) #3114

rb58853 opened this issue Aug 29, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@rb58853
Copy link

rb58853 commented Aug 29, 2024

I want to use the output of a Agent Node as JSON format
I am using Sequential Agents , I have an Agent Node with otput, for example, {'var1': 'value1', 'var2':'value2'}. I want to use this output value (node output) as JSON format for using this in input params of a Custom JS function!

I need something like Structured Output Perser that i can use in an Agent Node.

@HenryHengZJ
Copy link
Contributor

2 ways you can solve this:

1.) Specify in system message to ask LLM returns a JSON. and give few examples.
2.) Use LLM with JSON structured output:
image

@rb58853
Copy link
Author

rb58853 commented Aug 29, 2024

I have tried both alternatives, but neither recognizes the output as JSON. The output is a JSON, but it cannot be passed as input to a Custom JS Function because it is not recognized as JSON, but rather as LLM output or Agent output.

@HenryHengZJ
Copy link
Contributor

yeah currently custom JS function is not possible to be connected to agentflows, will add that support

@HenryHengZJ HenryHengZJ added the enhancement New feature or request label Aug 30, 2024
@marfal
Copy link

marfal commented Sep 30, 2024

+1
Or please let us manually enter the desired JSON structure into the JSON Structured Output through a simple text box like in the Advanced Structured Output Parser node that maybe could then be parsed (no pun intended) by Flowise into the table-display that's currently in place. Adding the key-value pairs using the "add item" is very cumbersome when dealing with more then just few elements. Thank you! :)
image
image

@dentro-innovation
Copy link

I'd also like to have the tool agents and conversational chains being able to use the json output parser!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants