plugins.ollama.prompts

A table of prompts to use for each model. Default prompts are defined here.

Type: attribute set of ((submodule) or value false (singular enum))

Default: { }

Declared by:

plugins.ollama.prompts.<name>.action

How to handle the output.

See here for more details.

Defaults to the value of plugins.ollama.action.

Type: null or raw lua code or one of “display”, “replace”, “insert”, “display_replace”, “display_insert”, “display_prompt” or (submodule)

Default: null

plugins.ollama.prompts.<name>.extract

A string.match pattern to use for an Action to extract the output from the response (Insert/Replace).

Type: null or string or value false (singular enum) or raw lua code

Default: null

Plugin default:

''
  ```$ftype
  (.-)```''

plugins.ollama.prompts.<name>.format

The format to return a response in. Currently the only accepted value is "json".

Type: null or value “json” (singular enum) or raw lua code

Default: null

Plugin default: "json"

plugins.ollama.prompts.<name>.inputLabel

The label to use for an input field.

Type: null or string or raw lua code

Default: null

Plugin default: "> "

plugins.ollama.prompts.<name>.model

The model to use for this prompt.

Defaults to the value of plugins.ollama.model.

Type: null or string or raw lua code

Default: null

plugins.ollama.prompts.<name>.options

Additional model parameters, such as temperature, listed in the documentation for the Modelfile.

Type: null or (attribute set of anything)

Default: null

plugins.ollama.prompts.<name>.prompt

The prompt to send to the model.

Replaces the following tokens:

  • $input: The input from the user
  • $sel: The currently selected text
  • $ftype: The filetype of the current buffer
  • $fname: The filename of the current buffer
  • $buf: The contents of the current buffer
  • $line: The current line in the buffer
  • $lnum: The current line number in the buffer

Type: string or raw lua code

plugins.ollama.prompts.<name>.system

The SYSTEM instruction specifies the system prompt to be used in the Modelfile template, if applicable. (overrides what’s in the Modelfile).

Type: null or string or raw lua code

Default: null