From fab0a0643a574fdfd7f03b64e66814c73b66a5f5 Mon Sep 17 00:00:00 2001 From: "Radu Macocian (admac)" Date: Mon, 26 Jan 2026 15:24:51 +0100 Subject: [PATCH] fixed code companion --- .config/nvim/after/plugin/codecompanion.lua | 35 +++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.config/nvim/after/plugin/codecompanion.lua b/.config/nvim/after/plugin/codecompanion.lua index 26f9fdd..8f60f32 100644 --- a/.config/nvim/after/plugin/codecompanion.lua +++ b/.config/nvim/after/plugin/codecompanion.lua @@ -1,23 +1,26 @@ require('codecompanion').setup({ + adapters = { + http = { + webui = function() + return require("codecompanion.adapters").extend("openai_compatible", { + env = { + url = "https://openwebui.estatecloud.org", + api_key = "sk-c7e3b3c942b34528a486eb443d200de6", + chat_url = "/api/chat/completions", + }, + schema = { + model = { + default = "deepseek-coder:6.7b", -- Use the exact model name from your PC + } + } + }) + end, + } + }, interactions = { chat = { - adapter = "ollama", + adapter = "webui", model = "deepseek-coder:6.7b" }, - }, - adapters = { - ollama = function() - return require("codecompanion.adapters").extend("openai", { - env = { - url = "https:openwebui.estatecloud.org", - api_key = "sk-c7e3b3c942b34528a486eb443d200de6" - }, - schema = { - model = { - default = "deepseek-coder:6.7b", -- Use the exact model name from your PC - } - } - }) - end, } })