1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00

plugins/ollama: migrate to mkNeovimPlugin

This commit is contained in:
Austin Horstman 2025-10-06 14:46:34 -05:00
parent a68291151c
commit 9bdedc0510
3 changed files with 100 additions and 255 deletions

View file

@ -6,46 +6,47 @@
example = {
plugins.ollama = {
enable = true;
model = "mistral";
prompts = {
# disable prompt
Sample_Prompt = false;
my-prompt = {
prompt = "Hello $input $sel. J'aime le fromage.";
inputLabel = "> ";
action = {
fn = ''
function(prompt)
return function(body, job)
settings = {
model = "mistral";
prompts = {
# disable prompt
Sample_Prompt = false;
my-prompt = {
prompt = "Hello $input $sel. J'aime le fromage.";
input_label = "> ";
action = {
fn = ''
function(prompt)
return function(body, job)
end
end
end
'';
opts.stream = true;
'';
opts.stream = true;
};
model = "foo";
extract = "```$ftype\n(.-)```";
options = {
mirostat_eta = 0.1;
num_thread = 8;
repeat_last_n = -1;
stop = "arrêt";
};
system = "system";
format = "json";
};
model = "foo";
extract = "```$ftype\n(.-)```";
options = {
mirostat_eta = 0.1;
num_thread = 8;
repeat_last_n = -1;
stop = "arrêt";
};
system = "system";
format = "json";
};
};
action = "display";
url = "http://127.0.0.1:11434";
serve = {
onStart = false;
command = "ollama";
args = [ "serve" ];
stopCommand = "pkill";
stopArgs = [
"-SIGTERM"
"ollama"
];
action = "display";
url = "http://127.0.0.1:11434";
serve = {
on_start = false;
command = "ollama";
args = [ "serve" ];
stop_command = "pkill";
stop_args = [
"-SIGTERM"
"ollama"
];
};
};
};
};