mirror of
https://github.com/don-philipe/dotfiles.git
synced 2026-11-06 16:14:12 +01:00
Custom nvim gen command adding https schema
This commit is contained in:
1 parent
c9e3b33958
commit
be00da9268
1 file changed
+13
@@ -9,5 +9,18 @@ return {
|
||||
model = vars["model"],
|
||||
host = vars["host"],
|
||||
port = vars["port"],
|
||||
https = vars["https"],
|
||||
show_prompt = true,
|
||||
debug = false,
|
||||
|
||||
-- https://github.com/David-Kunz/gen.nvim/issues/116
|
||||
command = function(options)
|
||||
local body = { model = options.model, stream = true }
|
||||
local schema = "http"
|
||||
if options.https then
|
||||
schema = "https"
|
||||
end
|
||||
return "curl --silent --no-buffer -X POST " .. schema .. "://" .. options.host .. ":" .. options.port .. "/api/chat -d $body"
|
||||
end,
|
||||
}},
|
||||
}
|
||||
Reference in new issue
Block a user