Mochi

Getting HTML tags in rendered output when using AI-Generated Templates

I'm seeing tags like below when using the Ai text generator with type "Create question". In addition, the raw text is being rendered inside those tags instead of a question being generated as expected. Here's the rendered output:

<ai ai-task="question">
... the raw text content passed to the AI field [Not expected]...
</ai>

---
... an ai-generated answer [expected!]...

Raw Text
> ... the raw text content [expected!] ...

And here are the Template Fields:

  • Raw Text (text field), which has the 2 outputs below.
    • Question (AI text generator field, set to Create question, not working.)
    • Answer (AI text generator field, set to Custom prompt, as is working)

And here is the Markdown template:

## << Question >>
---
<< Answer >>


-------------------------------
### Raw Text
> << Raw Text >>

Finally, want to note that the same issue occurs with the Question field even if I change it to a Custom prompt field - in that case the raw prompt text gets rendered.

Would appreciate your help with this! I very well may be missing something important with how this is set up :)

Hmm, I just tested the AI question field on my own copy of Mochi and it seems to be working. Maybe there is something specific about the input text you are using or other issue with the template itself that is not immediately obvious. Would you be able to send a small sample reproduction deck?

Thanks for getting back to me! Sorry but how do I send you the deck? I tried to export it and upload here, but it doesn't seem to allow that type of attachment.

You can email it to support@mochi.cards

I think i was able to reproduce this. This happens when there is a line break in the Question field. Working on a fix now.

That's great news! Thanks for looking into it man. The app has been really great so far, btw.