{% extends 'base.html' %} {% block title %}View File - {{ file_path }}{% endblock %} {% block extra_head %} {% if file_type == "json" %} {% endif %} {% endblock %} {% block content %}

File Viewer: {{ file_path }}

Back to Files
{% if file_type == "json" %} {% if is_qa_pairs or is_cot_examples or has_conversations %}
{% if has_summary and content.summary is defined %}

Summary

{{ content.summary|replace('\n', '
')|safe }}
{% endif %} {% if is_qa_pairs and content.qa_pairs is defined %}

QA Pairs

Total: {{ content.qa_pairs|length }} pairs

{% for qa_pair in content.qa_pairs %}
Question: {{ qa_pair.question }}
{% if qa_pair.reasoning is defined %}
Reasoning:

{{ qa_pair.reasoning|replace('\n', '
')|safe }}

{% endif %}
Answer: {{ qa_pair.answer }}
{% endfor %}
{% endif %} {% if is_cot_examples and content.cot_examples is defined %}

Chain of Thought Examples

Total: {{ content.cot_examples|length }} examples

{% for example in content.cot_examples %}
Question: {{ example.question }}
Reasoning:

{{ example.reasoning|replace('\n', '
')|safe }}

Answer: {{ example.answer }}
{% endfor %}
{% endif %} {% if has_conversations and content.conversations is defined %}

Conversations

Total: {{ content.conversations|length }} conversations

{% for conversation in content.conversations %}

Conversation {{ loop.index }}

{% for message in conversation %}
{{ message.role|capitalize }}:

{{ message.content|replace('\n', '
')|safe }}

{% endfor %}
{% endfor %}
{% endif %} {% if file_type == "json" and not is_qa_pairs and not is_cot_examples and not has_conversations %}
This JSON file doesn't contain QA pairs, CoT examples, or conversations in the expected format.
{% endif %}
{% else %}
{% endif %} {% else %}
{{ content }}
{% endif %}
{% endblock %} {% block scripts %} {% if file_type == "json" %} {% endif %} {% endblock %}