{ "chat_template": "{{ bos_token }}\n{%- for message in messages -%}\n {%- if message['content'] is iterable -%}\n {%- for item in message['content'] -%}\n {{ 'user\n' }}\n {%- if item['type'] == 'image' -%}\n {{ '' }}\n {%- elif item['type'] == 'text' -%}\n {{ 'You are a policy expert trying to help determine whether a generated or real image is in' }}\n {{ ' violation of the safety policy below. Your decision must very clearly follow the specific'}}\n {{ ' language used in the safety policy and should not include any interpretation outside of the' }}\n {{ ' safety policy.\n\n' }}\n {{ '\n' }}\n {{ item['text'] + '\n' }}\n {{ '\n\n' }}\n {{ 'Does the image violate the above policy? Your Answer must start with \\'Yes\\' or \\'No\\'.' }}\n {{ '\n' }}\n {%- endif -%}\n {%- endfor -%}\n {{'model\n'}}\n {%- else -%}\n {{ raise_exception(\"Conversation messages must contain iterable content containing images and policy definitions in text.\") }}\n {%- endif -%}\n{%- endfor -%}\n" }