Compare commits
	
		
			1 Commits
		
	
	
		
			v0.6.0
			...
			remove-fir
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 1d78d96fc6 | 
| @@ -385,9 +385,9 @@ curl http://localhost:11434/api/show -d '{ | |||||||
| ```json | ```json | ||||||
| { | { | ||||||
|   "license": "<contents of license block>", |   "license": "<contents of license block>", | ||||||
|   "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 }}<<SYS>>{{ .System }}<</SYS>>\n\n{{ end }}{{ .Prompt }} [/INST] \"\"\"\nSYSTEM \"\"\"\"\"\"\nPARAMETER stop [INST]\nPARAMETER stop [/INST]\nPARAMETER stop <<SYS>>\nPARAMETER stop <</SYS>>\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] <<SYS>>{{ .System }}<</SYS>>\n\n{{ .Prompt }} [/INST] \"\"\"\nSYSTEM \"\"\"\"\"\"\nPARAMETER stop [INST]\nPARAMETER stop [/INST]\nPARAMETER stop <<SYS>>\nPARAMETER stop <</SYS>>\n", | ||||||
|   "parameters": "stop                           [INST]\nstop                           [/INST]\nstop                           <<SYS>>\nstop                           <</SYS>>", |   "parameters": "stop                           [INST]\nstop                           [/INST]\nstop                           <<SYS>>\nstop                           <</SYS>>", | ||||||
|   "template": "[INST] {{ if and .First .System }}<<SYS>>{{ .System }}<</SYS>>\n\n{{ end }}{{ .Prompt }} [/INST] " |   "template": "[INST] <<SYS>>{{ .System }}<</SYS>>\n\n{{ .Prompt }} [/INST] " | ||||||
| } | } | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|   | |||||||
| @@ -129,14 +129,11 @@ PARAMETER <parameter> <parametervalue> | |||||||
| | --------------- | ------------------------------------------------------------------------------------------------------------ | | | --------------- | ------------------------------------------------------------------------------------------------------------ | | ||||||
| | `{{ .System }}` | The system prompt used to specify custom behavior, this must also be set in the Modelfile as an instruction. | | | `{{ .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.                 | | | `{{ .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 | ```modelfile | ||||||
| TEMPLATE """ | TEMPLATE """ | ||||||
| {{- if .First }} |  | ||||||
| ### System: | ### System: | ||||||
| {{ .System }} | {{ .System }} | ||||||
| {{- end }} |  | ||||||
|  |  | ||||||
| ### User: | ### User: | ||||||
| {{ .Prompt }} | {{ .Prompt }} | ||||||
|   | |||||||
| @@ -3,10 +3,8 @@ | |||||||
|  |  | ||||||
| FROM orca | FROM orca | ||||||
| TEMPLATE """ | TEMPLATE """ | ||||||
| {{- if .First }} |  | ||||||
| ### System: | ### System: | ||||||
| {{ .System }} | {{ .System }} | ||||||
| {{- end }} |  | ||||||
| ### User:  | ### User:  | ||||||
| I hate it when my phone dies | I hate it when my phone dies | ||||||
| ### Response:  | ### Response:  | ||||||
|   | |||||||
| @@ -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: | 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 | ```Modelfile | ||||||
| {{- if .First }} |  | ||||||
| ### System: | ### System: | ||||||
| {{ .System }} | {{ .System }} | ||||||
| {{- end }} |  | ||||||
|  |  | ||||||
| ### User: | ### User: | ||||||
| {{ .Prompt }} | {{ .Prompt }} | ||||||
|   | |||||||
| @@ -60,12 +60,10 @@ func (m *Model) Prompt(request api.GenerateRequest) (string, error) { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	var vars struct { | 	var vars struct { | ||||||
| 		First  bool |  | ||||||
| 		System string | 		System string | ||||||
| 		Prompt string | 		Prompt string | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	vars.First = len(request.Context) == 0 |  | ||||||
| 	vars.System = m.System | 	vars.System = m.System | ||||||
| 	vars.Prompt = request.Prompt | 	vars.Prompt = request.Prompt | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user