diff --git a/docs/api.md b/docs/api.md index 08402266..eb01db77 100644 --- a/docs/api.md +++ b/docs/api.md @@ -385,9 +385,9 @@ curl http://localhost:11434/api/show -d '{ ```json { "license": "", - "modelfile": "# Modelfile generated by \"ollama show\"\n# To build a new Modelfile based on this one, replace the FROM line with:\n# FROM llama2:latest\n\nFROM /Users/username/.ollama/models/blobs/sha256:8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8\nTEMPLATE \"\"\"[INST] {{ if and .First .System }}<>{{ .System }}<>\n\n{{ end }}{{ .Prompt }} [/INST] \"\"\"\nSYSTEM \"\"\"\"\"\"\nPARAMETER stop [INST]\nPARAMETER stop [/INST]\nPARAMETER stop <>\nPARAMETER stop <>\n", + "modelfile": "# Modelfile generated by \"ollama show\"\n# To build a new Modelfile based on this one, replace the FROM line with:\n# FROM llama2:latest\n\nFROM /Users/username/.ollama/models/blobs/sha256:8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8\nTEMPLATE \"\"\"[INST] <>{{ .System }}<>\n\n{{ .Prompt }} [/INST] \"\"\"\nSYSTEM \"\"\"\"\"\"\nPARAMETER stop [INST]\nPARAMETER stop [/INST]\nPARAMETER stop <>\nPARAMETER stop <>\n", "parameters": "stop [INST]\nstop [/INST]\nstop <>\nstop <>", - "template": "[INST] {{ if and .First .System }}<>{{ .System }}<>\n\n{{ end }}{{ .Prompt }} [/INST] " + "template": "[INST] <>{{ .System }}<>\n\n{{ .Prompt }} [/INST] " } ``` diff --git a/docs/modelfile.md b/docs/modelfile.md index 47386b67..1270b6fd 100644 --- a/docs/modelfile.md +++ b/docs/modelfile.md @@ -129,14 +129,11 @@ PARAMETER | --------------- | ------------------------------------------------------------------------------------------------------------ | | `{{ .System }}` | The system prompt used to specify custom behavior, this must also be set in the Modelfile as an instruction. | | `{{ .Prompt }}` | The incoming prompt, this is not specified in the model file and will be set based on input. | -| `{{ .First }}` | A boolean value used to render specific template information for the first generation of a session. | ```modelfile TEMPLATE """ -{{- if .First }} ### System: {{ .System }} -{{- end }} ### User: {{ .Prompt }} diff --git a/examples/modelfile-sentiments/Modelfile b/examples/modelfile-sentiments/Modelfile index 15f0f9d0..2943b195 100644 --- a/examples/modelfile-sentiments/Modelfile +++ b/examples/modelfile-sentiments/Modelfile @@ -3,10 +3,8 @@ FROM orca TEMPLATE """ -{{- if .First }} ### System: {{ .System }} -{{- end }} ### User: I hate it when my phone dies ### Response: diff --git a/examples/modelfile-sentiments/Readme.md b/examples/modelfile-sentiments/Readme.md index 6fe0c001..f89f9437 100644 --- a/examples/modelfile-sentiments/Readme.md +++ b/examples/modelfile-sentiments/Readme.md @@ -3,10 +3,8 @@ This is a simple sentiments analyzer using the Orca model. When you pull Orca from the registry, it has a Template already defined that looks like this: ```Modelfile -{{- if .First }} ### System: {{ .System }} -{{- end }} ### User: {{ .Prompt }} diff --git a/server/images.go b/server/images.go index 8d784fef..92215014 100644 --- a/server/images.go +++ b/server/images.go @@ -60,12 +60,10 @@ func (m *Model) Prompt(request api.GenerateRequest) (string, error) { } var vars struct { - First bool System string Prompt string } - vars.First = len(request.Context) == 0 vars.System = m.System vars.Prompt = request.Prompt