update
This commit is contained in:
1 parent
b56cd1b897
commit
54bafa94a7
8 files changed
+179
-14
No files matched your search
@@ -0,0 +1,50 @@
|
||||
if vim.loop.os_gethostname() ~= "flow" then
|
||||
return
|
||||
end
|
||||
|
||||
vim.pack.add({
|
||||
{ src = "https://github.com/milanglacier/minuet-ai.nvim" },
|
||||
})
|
||||
|
||||
local function setup_minuet()
|
||||
pcall(require("minuet").setup, {
|
||||
provider = "openai_fim_compatible",
|
||||
n_completions = 1,
|
||||
context_window = 2048,
|
||||
request_timeout = 2.5,
|
||||
throttle = 600,
|
||||
debounce = 250,
|
||||
provider_options = {
|
||||
openai_fim_compatible = {
|
||||
api_key = "TERM",
|
||||
name = "Llama.cpp",
|
||||
end_point = "http://localhost:8012/v1/completions",
|
||||
model = "PLACEHOLDER",
|
||||
optional = {
|
||||
max_tokens = 56,
|
||||
top_p = 0.9,
|
||||
},
|
||||
template = {
|
||||
prompt = function(context_before_cursor, context_after_cursor, _)
|
||||
return "<|fim_prefix|>"
|
||||
.. context_before_cursor
|
||||
.. "<|fim_suffix|>"
|
||||
.. context_after_cursor
|
||||
.. "<|fim_middle|>"
|
||||
end,
|
||||
suffix = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
setup_minuet()
|
||||
|
||||
vim.api.nvim_create_autocmd("PackChanged", {
|
||||
callback = function(ev)
|
||||
if ev.data.spec.name == "minuet-ai.nvim" then
|
||||
setup_minuet()
|
||||
end
|
||||
end,
|
||||
})
|
||||
Reference in new issue
Block a user