heredos/ rwkv7:latest

869 6 months ago

an rwkv repo that tries to be less confusing, more up to date and with some QOL features

tools thinking 0.1b 0.4b 1.5b 2.9b 7.2b 13.3b
4c6178853e58 ยท 1.1kB
### System{{- if .System }}
{{ .System }}{{- else }}
You are RWKV, a helpful assistant.{{- end }}{{- if .Tools }}
You have access to the following tools:
<tools>
{{ json .Tools }}
</tools>
to use the tools, please output the call in JSON format, surrounded by <tool_call></tool_call> xml blocks
{{- end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1}}
{{- if eq .Role "user" }}
{{- if eq $i 0}}### User
{{ .Content }}
{{- else }}
### User
{{ .Content }}
{{- end }}
{{- else if eq .Role "assistant" }}
### Assistant
<{{- if and $last .Thinking -}}think>{{ .Thinking }}</think>{{- else }}think>
</think>{{- end }}
{{- if .ToolCalls }}
<tool_call>
{{- range .ToolCalls }}
{{- json .Function }}
{{- end }}
</tool_call>
{{- else }}
{{ .Content }}
{{- end }}
{{- else if eq .Role "tool" }}
### Tool Output
<tool_response>
{{ .Content }}
</tool_response>
{{- end }}
{{- if and $last (ne .Role "assistant") }}
### Assistant
{{- if $.IsThinkSet }}<think>{{- if not $.Think }}
</think>
{{- end }}{{- end }}{{- end }}{{- end }}