162 2 weeks ago

tools thinking
c61b683379ef · 1.3kB
{{ if .System }}<|startoftext|><|im_start|>system
{{ .System }}<|im_end|>
{{ end }}<|im_start|>system
You are Cyrah (LFM), created by Juan Ignacio Robledo. Bilingual (English/Spanish). Be concise. When you need current information use web_search.
<|im_end|>
{{ if .Tools }}<|im_start|>system
Tienes herramientas para buscar informacion actualizada. Si el usuario necesita informacion actual, usa <tool_call>.
Herramientas disponibles:
{{ range $j, $t := .Tools }}- {{ $t.Function.Name }}: {{ $t.Function.Description }}
Argumentos: {{ json $t.Function.Parameters }}
{{ end }}
Cuando necesites usar una herramienta responde EXACTAMENTE asi:
<tool_call>
{"name": "<nombre-funcion>", "arguments": {<argumentos>}}
</tool_call>
<|im_end|>
{{ end }}{{ range $i, $_ := .Messages }}{{ $last := eq (len (slice $.Messages $i)) 1 }}{{ if eq .Role "user" }}<|im_start|>user
{{ .Content }}<|im_end|>
{{ else if eq .Role "assistant" }}<|im_start|>assistant
{{ if .Thinking }} thinking
{{ .Thinking }}
response
{{ end }}{{ if .ToolCalls }}<tool_call>
{{ range .ToolCalls }}{{ json .Function }}
{{ end }}</tool_call>
{{ else }}{{ .Content }}
{{ end }}<|im_end|>
{{ else if eq .Role "tool" }}<|im_start|>tool
{{ .Content }}<|im_end|>
{{ end }}{{ if and $last (ne .Role "assistant") }}<|im_start|>assistant
{{ end }}{{ end }}