my_nvim_config/after/plugin/llm.lua

41 lines
995 B
Lua
Raw Normal View History

require("codecompanion").setup({
adapters = {
llama3_2 = function()
return require("codecompanion.adapters").extend("ollama", {
name = "llama3_2", -- Give this adapter a different name to differentiate it from the default ollama adapter
schema = {
model = {
default = "llama3.2:latest",
},
},
})
end,
2025-01-08 16:26:45 -05:00
phi4 = function()
return require("codecompanion.adapters").extend("ollama", {
name = "phi4", -- Give this adapter a different name to differentiate it from the default ollama adapter
schema = {
model = {
default = "phi4:latest",
},
},
})
end,
},
strategies = {
chat = {
2025-01-08 16:26:45 -05:00
adapter= "phi4",
},
inline = {
2025-01-08 16:26:45 -05:00
adapter="phi4",
}
}
})
vim.api.nvim_set_keymap("v", "<leader>ce", "", {
callback = function()
require("codecompanion").prompt("explain")
end,
noremap = true,
silent = true,
})