# Editing Responses
You've probably noticed some not-so-great responses from the system like:
You asked about get_balance. I have The _SOURCE_ACCOUNT_ to be {'type': 'string', 'values': [{'resolved': 1, 'tokens': 'checking', 'balance': 100}]}.
This is rather unpleasant to read as an end-user, so let's customize our responses to interpret our data with more elegance.
# Inspecting Slot Data
- Navigate to the Personalities page by hovering over "Create" tab in the top navigation bar and then clicking on "Personalities".
- Once on that page you should be able to see all the Personalities you have for your competencies. Click "View Templates" for the
DEFAULT
. - Scroll down to the
get_balance
competency. - Click "Edit"
- Above "You asked about get_balance", add
{{ source_account }}
. - In the query sidebar, run the query "How much do I have in checking?"
In the response you should now see the exact shape of your source_account
data. Something like {'type': 'string', 'values': [{'resolved': 1, 'tokens': 'checking', 'balance': 100}]}
. Knowing the shape of the slot data allows you effectively access the information you want.
# Customizing a Response
With this shape exposed, we can tailor a more elegant response. Change your response to something like this:
{% if source_account and source_account["values"] %}
{% set source = source_account["values"][0] %}
You have ${{ source.balance }} in your {{ source.tokens }} account.
{% else %}
Which account?
{% endif %}
Given that the response might occur after a transfer, we can add additional logic to handle the presence of a _TRANSFER_
slot.
{% if source_account and source_account["values"] %}
{% set source = source_account["values"][0] %}
{% if transfer and transfer["values"] %}
Transfer successful. You now
{% else %}
You
{% endif %}
have ${{ source.balance }} in your {{ source.tokens }} account.
{% else %}
Which account?
{% endif %}
With that, you are equipped to customize the response templates for account_transfer
.