Unverified Commit cf155898 authored by Michael Yang's avatar Michael Yang Committed by GitHub
Browse files

Merge pull request #5620 from ollama/mxyng/templates

update embedded templates
parents 37a570f9 19753c18
You are a helpful assistant.### Instruction: You are a helpful assistant.
### Instruction:
Hello, how are you? Hello, how are you?
### Response: ### Response:
......
...@@ -9,3 +9,4 @@ Source: system ...@@ -9,3 +9,4 @@ Source: system
I'd like to show off how chat templating works! <step> Source: assistant I'd like to show off how chat templating works! <step> Source: assistant
Destination: user Destination: user
\ No newline at end of file
...@@ -3,3 +3,4 @@ Source: user ...@@ -3,3 +3,4 @@ Source: user
Hello, how are you? <step> Source: assistant Hello, how are you? <step> Source: assistant
Destination: user Destination: user
\ No newline at end of file
...@@ -7,3 +7,4 @@ Source: user ...@@ -7,3 +7,4 @@ Source: user
I'd like to show off how chat templating works! <step> Source: assistant I'd like to show off how chat templating works! <step> Source: assistant
Destination: user Destination: user
\ No newline at end of file
GPT Correct System: You are a helpful assistant.<|end_of_turn|>GPT Correct User: Hello, how are you?<|end_of_turn|>GPT Correct Assistant: I'm doing great. How can I help you today?<|end_of_turn|>GPT Correct User: I'd like to show off how chat templating works!<|end_of_turn|>GPT Correct Assistant: GPT4 Correct System: You are a helpful assistant.<|end_of_turn|>GPT4 Correct User: Hello, how are you?<|end_of_turn|>GPT4 Correct Assistant: I'm doing great. How can I help you today?<|end_of_turn|>GPT4 Correct User: I'd like to show off how chat templating works!<|end_of_turn|>GPT4 Correct Assistant:
\ No newline at end of file \ No newline at end of file
GPT Correct User: Hello, how are you?<|end_of_turn|>GPT Correct Assistant: GPT4 Correct User: Hello, how are you?<|end_of_turn|>GPT4 Correct Assistant:
\ No newline at end of file \ No newline at end of file
GPT Correct User: Hello, how are you?<|end_of_turn|>GPT Correct Assistant: I'm doing great. How can I help you today?<|end_of_turn|>GPT Correct User: I'd like to show off how chat templating works!<|end_of_turn|>GPT Correct Assistant: GPT4 Correct User: Hello, how are you?<|end_of_turn|>GPT4 Correct Assistant: I'm doing great. How can I help you today?<|end_of_turn|>GPT4 Correct User: I'd like to show off how chat templating works!<|end_of_turn|>GPT4 Correct Assistant:
\ No newline at end of file \ No newline at end of file
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
{{ else if eq .Role "assistant" }}ASSISTANT: {{ .Content }}</s> {{ else if eq .Role "assistant" }}ASSISTANT: {{ .Content }}</s>
{{ end }} {{ end }}
{{- end }}ASSISTANT: {{- end }}ASSISTANT:
{{- else }} {{- else -}}
{{ if .System }}{{ .System }} {{ if .System }}{{ .System }}
{{ end }}{{ if .Prompt }}USER: {{ .Prompt }} {{ end }}{{ if .Prompt }}USER: {{ .Prompt }}
{{ end }}ASSISTANT: {{ .Response }} {{ end }}ASSISTANT: {{ .Response }}</s>
{{- end }} {{ end -}}
\ No newline at end of file \ No newline at end of file
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
{{- range .Messages }}<|{{ .Role }}|> {{- range .Messages }}<|{{ .Role }}|>
{{ .Content }}</s> {{ .Content }}</s>
{{ end }}<|assistant|> {{ end }}<|assistant|>
{{ else }} {{ else -}}
{{ if .System }}<|system|> {{ if .System }}<|system|>
{{ .System }}</s> {{ .System }}</s>
{{ end }}{{ if .Prompt }}<|user|> {{ end }}{{ if .Prompt }}<|user|>
{{ .Prompt }}</s> {{ .Prompt }}</s>
{{ end }}<|assistant|> {{ end }}<|assistant|>
{{ .Response }}</s> {{ .Response }}</s>
{{- end }} {{ end -}}
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment