Data Output Component #5779
mstachowiak
started this conversation in
Ideas
Replies: 1 comment
-
|
Does anybody have a solution? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be helpful to have a
Data Outputcomponent for API based access of flows. When accessing a flow via the API, you're often only interested in receiving the structured data output as valid JSON and you're not interested in plain text.Currently, to receive data in the output of a flow, you have to run it through a
Parse Datacomponent to convert it to text, then pipe it to eitherChat OutputorText Output. However, when accessing this processed data via the API, the data is put inside a string and proper JSON formatting is destroyed. It's not properly escaped but rather converted to a string with all double quotes converted to single quotes, making it un-parsable.As an alternative approach, when invoking a flow via the API, you can use the
output_componentspecifier to get the output from a particular component within the flow. This generally works well as a way to get valid, well structured JSON, as you can retrieve data before it gets mangled by an Output Component. However, when you have a conditional flow that forks, there is often more than one component you potentially need to retrieve data from, which is not possible withoutput_componentparameter, as it only accepts a single value.Beta Was this translation helpful? Give feedback.
All reactions