44 lines
888 B
Lua
44 lines
888 B
Lua
local options = {
|
|
adapters = {
|
|
ollama = function()
|
|
return require("codecompanion.adapters").extend("ollama", {
|
|
env = {
|
|
url = "http://axiom.bell:11434",
|
|
api_key = "ollama",
|
|
},
|
|
headers = {
|
|
["Content-Type"] = "application/json",
|
|
["Authorization"] = "Bearer ${api_key}",
|
|
},
|
|
parameters = {
|
|
sync = true,
|
|
},
|
|
})
|
|
end,
|
|
},
|
|
strategies = {
|
|
chat = {
|
|
adapter = "ollama",
|
|
},
|
|
inline = {
|
|
adapter = "ollama",
|
|
keymaps = {
|
|
accept_change = {
|
|
modes = { n = "ga" },
|
|
description = "Accept the suggested change",
|
|
},
|
|
reject_change = {
|
|
modes = { n = "gr" },
|
|
description = "Reject the suggested change",
|
|
},
|
|
},
|
|
|
|
},
|
|
cmd = {
|
|
adapter = "ollama",
|
|
}
|
|
},
|
|
}
|
|
|
|
return options
|