mirror of
https://github.com/don-philipe/dotfiles.git
synced 2025-11-08 14:47:03 +01:00
Custom nvim gen command adding https schema
This commit is contained in:
@@ -9,5 +9,18 @@ return {
|
|||||||
model = vars["model"],
|
model = vars["model"],
|
||||||
host = vars["host"],
|
host = vars["host"],
|
||||||
port = vars["port"],
|
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