mirror of
https://github.com/tuxdotrs/tawm.git
synced 2025-07-05 20:56:33 +05:30
replace gen.nvim with avante.nvim
This commit is contained in:
30
pkgs/nvim/nvim/lua/configs/avante.lua
Normal file
30
pkgs/nvim/nvim/lua/configs/avante.lua
Normal file
@ -0,0 +1,30 @@
|
||||
local opts = {
|
||||
provider = "ollama",
|
||||
vendors = {
|
||||
ollama = {
|
||||
["local"] = true,
|
||||
endpoint = "100.64.0.1:11434/v1",
|
||||
model = "deepseek-coder-v2",
|
||||
parse_curl_args = function(opts, code_opts)
|
||||
return {
|
||||
url = opts.endpoint .. "/chat/completions",
|
||||
headers = {
|
||||
["Accept"] = "application/json",
|
||||
["Content-Type"] = "application/json",
|
||||
},
|
||||
body = {
|
||||
model = opts.model,
|
||||
messages = require("avante.providers").copilot.parse_message(code_opts),
|
||||
max_tokens = 2048,
|
||||
stream = true,
|
||||
},
|
||||
}
|
||||
end,
|
||||
parse_response_data = function(data_stream, event_state, opts)
|
||||
require("avante.providers").openai.parse_response(data_stream, event_state, opts)
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return opts
|
@ -1,12 +0,0 @@
|
||||
local opts = {
|
||||
model = "deepseek-coder-v2:latest",
|
||||
host = "100.64.0.1",
|
||||
port = "11434",
|
||||
display_mode = "split",
|
||||
show_prompt = true,
|
||||
show_model = true,
|
||||
no_auto_close = false,
|
||||
debug = false,
|
||||
}
|
||||
|
||||
return opts
|
@ -26,11 +26,21 @@ local plugins = {
|
||||
},
|
||||
},
|
||||
{
|
||||
"David-Kunz/gen.nvim",
|
||||
"yetone/avante.nvim",
|
||||
event = "VeryLazy",
|
||||
lazy = false,
|
||||
version = false,
|
||||
build = "make",
|
||||
opts = function()
|
||||
return require("configs.gen")
|
||||
return require("configs.avante")
|
||||
end,
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"stevearc/dressing.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
},
|
||||
{
|
||||
"Shatur/neovim-session-manager",
|
||||
|
Reference in New Issue
Block a user