-
Notifications
You must be signed in to change notification settings - Fork 792
Closed
Description
Thank you for this amazing plugin - unfortunately I didn't get it to work yet. Has anyone managed to create a working config for working with mistral?
So far I have:
return {
"yetone/avante.nvim",
event = "VeryLazy",
version = false, -- Set this to "*" to always pull the latest release version, or set it to false to update to the latest code changes.
provider = "mistral", -- "claude" or "openai" or "azure"
vendors = {
mistral = {
api_key_name = "MISTRAL_API_KEY",
endpoint = "https://api.mistral.ai/v1/chat/completions",
model = "mistral-large-latest",
parse_curl_args = function(opts, code_opts)
local headers = {
["Content-Type"] = "application/json",
["Accept"] = "application/json",
["Authorization"] = "Bearer " .. os.getenv(opts.api_key_name),
}
local Llm = require("avante.providers")
return {
url = opts.endpoint,
-- timeout = base.timeout,
insecure = false,
headers = headers,
body = vim.tbl_deep_extend("force", {
model = opts.model,
temperature = 0,
topK = -1,
topP = -1,
maxTokensToSample = 4000,
stream = true,
messages = Llm.openai.parse_messages(code_opts)
}, {}),
}
end,
parse_response_data = function(data_stream, event_state, opts)
local Llm = require("avante.providers")
Llm.openai.parse_response(data_stream, event_state, opts)
end,
},
},
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
build = "make",
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
dependencies = {
"nvim-treesitter/nvim-treesitter",
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
--- The below dependencies are optional,
"echasnovski/mini.pick", -- for file_selector provider mini.pick
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
"ibhagwan/fzf-lua", -- for file_selector provider fzf
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
"zbirenbaum/copilot.lua", -- for providers='copilot'
{
-- support for image pasting
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
-- recommended settings
default = {
embed_image_as_base64 = false,
prompt_for_file_name = false,
drag_and_drop = {
insert_mode = true,
},
-- required for Windows users
use_absolute_path = true,
},
},
},
{
-- Make sure to set this up properly if you have lazy=true
'MeanderingProgrammer/render-markdown.nvim',
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
},
config = function()
require('avante').setup()
end
}When I ask, I get the following error:

It looks like it is using a claude model, rather than mistral. I got inspiration from #161.
Something tells me that it is the config-part near the end, but I'm unsure how to fix it.
itz-Amethyst
Metadata
Metadata
Assignees
Labels
No labels