How to use the String to JSON converter step
Add the component
Add a “Convert string to JSON” step to your Tool (check how to get started with creating a tool).
Text input
Provide the JSON string as the input. In the image below, we pass in the LLM step answer as input into the converter step and the output is the corresponding JSON object.
Make sure, the input string is a valid JSON otherwise this component will raise an error.When instructing an LLM to generate a JSON object, it is recommended to also set up the
is_json validator.
- How to run a step
- How to delete a step
- How to configure output
- How to configure a default value
- How to move a step in a Tool
- How to duplicate a step
- How to add condition to a step (i.e. execute only if a condition is met)
- How to loop a step (i.e. run one step multiple times)