ollama icon indicating copy to clipboard operation
ollama copied to clipboard

feat: Override system prompt from non-interactive CLI

Open kaizau opened this issue 1 year ago • 4 comments

  • Closes #1415

Previously, the only way to set the system prompt for non-interactive use was to import a new Modelfile.

This PR makes Ollama much easier to script non-interatively:

ollama run llama2 --system "Translate into French" "This is really useful!"

kaizau avatar Mar 14 '24 04:03 kaizau

Think you should consider doing arrangements for the other parameters as well. Would be pretty nice.

davidearlyoung avatar Apr 29 '24 07:04 davidearlyoung

Just had an additional idea. The system prompt and/or other modelfile parameters could be in the file which could be passed in at command.

file_a:

/set parameter system "This is a system prompt."
/set parameter num_ctx 8192
...
ollama run llama2 -f ./file_a "This is really useful!"

If this exists already with the main branch, my apologies for missing it.

davidearlyoung avatar Apr 30 '24 23:04 davidearlyoung

Why hasn't this been merged yet?

captaincurrie avatar May 15 '24 00:05 captaincurrie

Just had an additional idea. The system prompt and/or other modelfile parameters could be in the file which could be passed in at command.

file_a:

/set parameter system "This is a system prompt."
/set parameter num_ctx 8192
...
ollama run llama2 -f ./file_a "This is really useful!"

If this exists already with the main branch, my apologies for missing it.

Please add this @kaizau also when you rebase.

FellowTraveler avatar May 22 '24 10:05 FellowTraveler