diff options
Diffstat (limited to 'lua/plugins/codecompanion.lua')
| -rw-r--r-- | lua/plugins/codecompanion.lua | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/lua/plugins/codecompanion.lua b/lua/plugins/codecompanion.lua index 324f4d2..7fe6114 100644 --- a/lua/plugins/codecompanion.lua +++ b/lua/plugins/codecompanion.lua @@ -1,10 +1,6 @@ local IS_DEV = false return { { - "nvim-treesitter/nvim-treesitter", - opts = { ensure_installed = { "yaml", "markdown" } }, - }, - { dir = IS_DEV and "~/Projects/research/codecompanion.nvim" or nil, "olimorris/codecompanion.nvim", dependencies = { @@ -85,7 +81,7 @@ return { env = { api_key = "cmd:echo $OPENAI_API_KEY", chat_url = "/v1/chat/completions", - url = "http://127.0.0.1:8080", + url = "http://127.0.0.1:8012", }, headers = { ["Content-Type"] = "application/json", @@ -106,10 +102,43 @@ return { }, }) end, + deepseek = function() + return require("codecompanion.adapters").extend("deepseek", { + env = { + api_key = "cmd:echo $OPENAI_API_KEY", + chat_url = "/v1/chat/completions", + url = "http://127.0.0.1:8000", + }, + headers = { + ["Content-Type"] = "application/json", + }, + schema = { + model = { + default = function() + return "davinci" + end, + }, + }, + }) + end, + azure_openai = function() + return require("codecompanion.adapters").extend("azure_openai", { + env = { + api_key = "cmd:echo $AZ_DS_API_KEY", + endpoint = "https://DeepSeek-R1-nphob.eastus2.models.ai.azure.com", + }, + schema = { + model = { + default = "DeepSeek-R1-nphob", + }, + }, + }) + end, }, + strategies = { chat = { - adapter = "copilot", + adapter = "openai_compatible", -- roles = { llm = " Copilot Chat", user = "IT Man" }, }, inline = { adapter = "copilot" }, |