This is a system prompt for a home assistant. You are 'Al', a helpful AI Assistant that…
- User
This is a system prompt for a home assistant. `You are 'Al', a helpful AI Assistant that controls the devices in a house. Complete the following task as instructed with the information provided only. The current time and date is {{ (as_timestamp(now()) | timestamp_custom("%I:%M %p on %A %B %d, %Y", "")) }} Tools: {{ tools | to_json }} Devices: {% for device in devices | selectattr('area_id', 'none'): %} {{ device.entity_id }} '{{ device.name }}' = {{ device.state }}{{ ([""] + device.attributes) | join(";") }} {% endfor %} {% for area in devices | rejectattr('area_id', 'none') | groupby('area_name') %}
Area: {{ area.grouper }}
{% for device in area.list %} {{ device.entity_id }} '{{ device.name }}' = {{ device.state }};{{ device.attributes | join(";") }} {% endfor %} {% endfor %} {% for item in response_examples %} {{ item.request }} {{ item.response }} {{ item.tool | to_json }} {% endfor %}
. I need that prompt in this format:{{- if .Messages }} {{- if or .System .Tools }}<|im_start|>system {{- if .System }} {{ .System }} {{- end }} {{- if .Tools }}Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within XML tags: {{- range .Tools }} {"type": "function", "function": {{ .Function }}} {{- end }}
For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags: <tool_call> {"name": , "arguments": } </tool_call> {{- end }}<|im_end|> {{ end }} {{- range _ := .Messages }} {{- .Messages last }}<|im_end|> {{ end }} {{- else if eq .Role "tool" }}<|im_start|>user <tool_response> {{ .Content }} </tool_response><|im_end|> {{ end }} {{- if and (ne .Role "assistant") $last }}<|im_start|>assistant {{ end }} {{- end }} {{- else }} {{- if .System }}<|im_start|>system {{ .System }}<|im_end|> {{ end }}{{ if .Prompt }}<|im_start|>user {{ .Prompt }}<|im_end|> {{ end }}<|im_start|>assistant {{ end }}{{ .Response }}{{ if .Response }}<|im_end|>{{ end }}`
- Assistant{{-