Node - #structured_output#
- For Xmind ChatTree, the first line of the node content must be "#structured_output#", and then the content of the second line is the output content, which can be multiple lines, such as:
#structured_output#
...
...
... - For Python ChatTree, the first parameter of chattree.create_node() must be "#structured_output#", the key in the second parameter dict is "output_content", and the value is the output content (str type), such as:
xxx_node = chattree.create_node("#structured_output#", {"output_content": "...\n...\n"}) - The output content can have multiple lines, usually in formats such as json or xml. The specific meaning is agreed upon by oneself: which ones are displayed to the user, which ones are not displayed, and how to display them (text, table, or UI interactive component). After returning, the API caller will process it according to the agreement; if it is a UI interactive component, the semantics corresponding to the user's relevant UI operations (such as clicking a button or link) can be converted into text and used as (part of) the "user input" parameter of the next API call. In the current backend management UI's dialogue test interface (see "Dialogue Test"), if the returned content is in the format of
[{"display":"...","user_input":"..."},{"display":"...","user_input":"..."},...]json, it will be displayed in multiple lines. Each line displays the content of thedisplayfield. After the user clicks, the correspondinguser_inputfield content will be automatically filled into the user input control on the interface and submitted. - InfoItems can be referenced in the output content, such as "...{...}...", the system will replace it with the string value of the corresponding InfoItem and then return it to the API caller
- The "#structured_output#" node is similar to the "#inform_user#" node, but it is not output through streaming LLM text, but is returned to the client as is at one time (only the first returned result will exist in the streaming output). For details, see "API"
- The "TMC_book_flights" ChatTree example in "ChatTree Examples" contains this node