Closed sunn4room closed 10 months ago
local curl = require("plenary.curl") -- long time to callback local handler = curl.post("https://tianqi.aminer.cn/api/v2/multilingual_code_generate_adapt", { body = vim.fn.json_encode({ prompt = "# print hello world\n", n = 3, lang = "Python", apikey = "68cf004321e94b47a91c2e45a8109852", apisecret = "e82b86a16f9d471ab215f653060310e3", }), headers = { content_type = "application/json", }, callback = vim.schedule_wrap(function(res) vim.notify(vim.inspect(res)) end), }) -- want to kill the in-flight curl job handler:shutdown() -- get error -- how to kill ?
Help. Please...
Help. Please...