{% extends 'base.html' %} {% load fmt %} {% block title %}Ask Mkulima Outgrower{% endblock %} {% block content %}
{% if chat %}
Ask / {{ chat.title|truncatechars:60 }}
{% for m in chat.messages.all %} {% if m.role == 'user' %}
{{ m.text }}
{% else %}
AC
{% if m.payload.headline %}
{{ m.payload.headline }}{% if m.payload.ai %} AI{% endif %}
{% endif %}
{{ m.text }}
{% if m.payload.chart %}
Chart
{% endif %} {% if m.payload.table %}
Table{% if m.payload.table.rows|length %} · {{ m.payload.table.rows|length }} rows{% endif %}
{% for c in m.payload.table.columns %}{% endfor %} {% for row in m.payload.table.rows %} {% for cell in row %} {% endfor %} {% endfor %}
{{ c.label }}
{% table_cell cell m.payload.table.columns forloop.counter0 %}
{% endif %} {% if m.payload.sources %}
Sources
{% for s in m.payload.sources %}
{{ s.kind }} {{ s.title }} {{ s.detail }}
{% endfor %}
{% endif %} {% if m.payload.table %}
Export this answer: Excel PDF CSV
{% endif %}

Demo dataset · verify key figures against the cited sources.

{% endif %} {% endfor %}
{% csrf_token %}
{% else %}

Ask about Kenya's farm economy and credit book

Plain-word questions about acreage, yields, profits, prices, growers and the input-credit portfolio. Answers arrive with tables, charts and their sources.

{% csrf_token %}
{% for s in suggestions %}{% endfor %}
{% endif %}
{% endblock %}