diff --git a/.config/nvim/lua/plugins/gen.lua b/.config/nvim/lua/plugins/gen.lua index 393eff1..eb799b6 100644 --- a/.config/nvim/lua/plugins/gen.lua +++ b/.config/nvim/lua/plugins/gen.lua @@ -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, }}, }