This commit is contained in:
DeveloperDurp 2025-03-28 14:47:40 -05:00
parent 28ca42d375
commit 4104f13f25
12 changed files with 71 additions and 24 deletions

View file

@ -9,10 +9,26 @@ return {
config = true,
opts = {
strategies = {
chat = { adapter = "ollama" },
chat = { adapter = "openai" },
inline = { adapter = "ollama" },
},
adapters = {
opts = {
show_defaults = false,
},
openai = function()
return require("codecompanion.adapters").extend("openai", {
schema = {
model = {
default = "gpt-4o-mini",
},
},
url = "https://litellm.durp.info",
env = {
api_key = "sk-8lkQVLNLOMYeblJhaqcaCw",
},
})
end,
ollama = function()
return require("codecompanion.adapters").extend("ollama", {
name = "ollama",
@ -22,7 +38,7 @@ return {
},
},
env = {
url = "https://ollama.durp.info",
url = "https://litellm.durp.info",
},
headers = {
["Content-Type"] = "application/json",