Recipe with choice interface incl. custom html


can you please provide an example of recipe with choice view incl. custom html?
I am trying to create interface with several options for end users, but at the same time I have to provide some hyperlinks in general text part.

Best regards,

Hi! You should be able to just use a "html" key instead of "text" for the top-level content in the data you stream in. For example:

    "html": "Hello <a href=''>Google</a>",
    "options": [
        {"id": 0, "text": "Option 1"},
        {"id": 1, "text": "Option 2"}

The same should work for the options, too. So you can pretty much use the example recipe here, but instead of streaming in data with "text", you stream in data with "html" – or generate the HTML data in Python :slightly_smiling_face:

1 Like