-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgen.lua
More file actions
22 lines (22 loc) · 696 Bytes
/
gen.lua
File metadata and controls
22 lines (22 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require("gen").setup({
--model = "mistral",
model = "qwen2.5-coder",
quit_map = "q",
retry_map = "<c-r>",
accept_map = "<c-cr>",
host = "msi",
port = "11434",
--display_mode = "float",
display_mode = "horizontal-split",
show_prompt = true,
show_model = true,
no_auto_close = true,
file = false,
hidden = false,
init = function(options) pcall(io.popen, "ollama serve > /dev/null 2>&1 &") end,
command = function(options)
local body = {model = options.model, stream = true}
return "curl --silent --no-buffer -X POST http://" .. options.host .. ":" .. options.port .. "/api/chat -d $body"
end,
debug = false
})