update
This commit is contained in:
parent
35682e2046
commit
09c6ec89f5
4 changed files with 73 additions and 33 deletions
39
.config/nvim/lua/plugins/codecomapnion.lua
Normal file
39
.config/nvim/lua/plugins/codecomapnion.lua
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
local OLLAMA_TOKEN = os.getenv("OLLAMA_TOKEN")
|
||||
return {
|
||||
{
|
||||
"olimorris/codecompanion.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
config = true,
|
||||
opts = {
|
||||
strategies = {
|
||||
chat = { adapter = "ollama" },
|
||||
inline = { adapter = "ollama" },
|
||||
},
|
||||
adapters = {
|
||||
ollama = function()
|
||||
return require("codecompanion.adapters").extend("ollama", {
|
||||
name = "ollama",
|
||||
schema = {
|
||||
model = {
|
||||
default = "llama3.1:latest",
|
||||
},
|
||||
},
|
||||
env = {
|
||||
url = "https://ollama.durp.info",
|
||||
},
|
||||
headers = {
|
||||
["Content-Type"] = "application/json",
|
||||
["Authorization"] = OLLAMA_TOKEN,
|
||||
},
|
||||
parameters = {
|
||||
sync = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue