<input type="hidden" id="conversation_id" value="{{ ai_conversation.id }}">
<input type="hidden" id="query_type" value="{{ ai_conversation.conversation_type }}">
<input type="hidden" id="target" value="{{ target }}">
<input type="hidden" id="args" value="{{ args }}">


<script>
{% for message in ai_conversation.conversation_history %}
    {% if message.type in 'human,ai' and message.data.content != ''  %}
        bloomAiCreateMessage(
            '{{ message.data.content | escapejs }}',
            {% if message.type == 'human' %}true {% else %}false{% endif %},
            '{{ target }}',
            '{{ ai_conversation.conversation_type }}'
            );
    {% endif %}
{% endfor %}
</script>