fix nvim: upgrade avante.nvim and update providers format. and fix ollama api key
Provider configuration migration guide: <https://github.com/yetone/avante.nvim/wiki/Provider-configuration-migration-guide>
This commit is contained in:
parent
7ef8a4275d
commit
fa8b671872
@ -30,7 +30,7 @@ return {
|
|||||||
{ "<C-A-i>", "<cmd>AvanteToggle<cr>", desc = "Avante Chat Toggle" },
|
{ "<C-A-i>", "<cmd>AvanteToggle<cr>", desc = "Avante Chat Toggle" },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
provider = "ollama",
|
providers = {
|
||||||
ollama = {
|
ollama = {
|
||||||
{{ if .ollamaKey -}}
|
{{ if .ollamaKey -}}
|
||||||
api_key_name = "OLLAMA_API_KEY",
|
api_key_name = "OLLAMA_API_KEY",
|
||||||
@ -38,8 +38,15 @@ return {
|
|||||||
endpoint = {{ .ollamaUrl | quote }},
|
endpoint = {{ .ollamaUrl | quote }},
|
||||||
model = "qwen2.5-coder:7b",
|
model = "qwen2.5-coder:7b",
|
||||||
disable_tools = true, -- Open-source models often do not support tools.
|
disable_tools = true, -- Open-source models often do not support tools.
|
||||||
|
|
||||||
|
-- Fix: Always show `ollama: API key not set, continuing without authentication`
|
||||||
|
parse_api_key = function()
|
||||||
|
return vim.env.OLLAMA_API_KEY
|
||||||
|
end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
provider = "ollama",
|
||||||
behaviour = {
|
behaviour = {
|
||||||
auto_suggestions = false, -- Experimental stage
|
auto_suggestions = false, -- Experimental stage
|
||||||
auto_set_highlight_group = true,
|
auto_set_highlight_group = true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user