update chatml template format to latest in docs (#6344)

This commit is contained in:
Bruce MacDonald 2024-08-13 23:39:18 +00:00 committed by GitHub
parent a0a40aa20c
commit eda8a32a09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -112,15 +112,9 @@ Keep the following tips and best practices in mind when working with Go template
ChatML is a popular template format. It can be used for models such as Databrick's DBRX, Intel's Neural Chat, and Microsoft's Orca 2.
```gotmpl
{{- if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}
{{- range .Messages }}<|im_start|>{{ .Role }}
{{ .Content }}<|im_end|>
{{ end }}<|im_start|>assistant
{{ else }}
{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
```
### Example Tools