diff options
| author | ache <ache@ache.one> | 2026-02-19 18:44:33 +0100 |
|---|---|---|
| committer | ache <ache@ache.one> | 2026-02-19 18:44:33 +0100 |
| commit | 362b4a83c33f5ff30d3dbc3d3d0b996286fae444 (patch) | |
| tree | e4e1581d47dc04cb4e0081ee4c4dd16e3d4708fa /lua/ache/plugins/llm | |
| parent | exp: Experiment with treesitter fold (diff) | |
fix: LUA formatting
Diffstat (limited to 'lua/ache/plugins/llm')
| -rw-r--r-- | lua/ache/plugins/llm/cursortab.lua | 16 | ||||
| -rw-r--r-- | lua/ache/plugins/llm/model.lua | 148 |
2 files changed, 90 insertions, 74 deletions
diff --git a/lua/ache/plugins/llm/cursortab.lua b/lua/ache/plugins/llm/cursortab.lua new file mode 100644 index 0000000..45a1aac --- /dev/null +++ b/lua/ache/plugins/llm/cursortab.lua @@ -0,0 +1,16 @@ +return { + "leonardcser/cursortab.nvim", + build = "cd server && go build", + enabled = false, + config = function() + require("cursortab").setup({ + provider = "sweep", + provider_url = "http://192.168.1.11:8000", + provider_model = "sweep-next-edit-1.5b", + max_context_tokens = 0, -- Max tokens to send as context (0 = no limit) + provider_temperature = 0.0, + provider_max_tokens = 512, + provider_top_k = 10, + }) + end, +} diff --git a/lua/ache/plugins/llm/model.lua b/lua/ache/plugins/llm/model.lua index 20ccb10..bf67689 100644 --- a/lua/ache/plugins/llm/model.lua +++ b/lua/ache/plugins/llm/model.lua @@ -1,81 +1,81 @@ return { - "gsuuon/model.nvim", - enabled = true, + "gsuuon/model.nvim", + enabled = true, - -- Don't need these if lazy = false - cmd = { "M", "Model", "Mchat" }, - init = function() - vim.filetype.add({ - extension = { - mchat = "mchat", - }, - }) - end, - ft = "mchat", + -- Don't need these if lazy = false + cmd = { "M", "Model", "Mchat" }, + init = function() + vim.filetype.add({ + extension = { + mchat = "mchat", + }, + }) + end, + ft = "mchat", - keys = { - { "<C-m>d", ":Mdelete<cr>", mode = "n" }, - { "<C-m>s", ":Mselect<cr>", mode = "n" }, - { "<C-m><space>", ":Mchat<cr>", mode = "n" }, - }, - config = function(_, opts) - local ollama = require("model.providers.ollama") - local model = require("model") - local starters = require("model.prompts.chats") - local qflist = require("model.util.qflist") + keys = { + { "<C-m>d", ":Mdelete<cr>", mode = "n" }, + { "<C-m>s", ":Mselect<cr>", mode = "n" }, + { "<C-m><space>", ":Mchat<cr>", mode = "n" }, + }, + config = function(_, opts) + local ollama = require("model.providers.ollama") + local model = require("model") + local starters = require("model.prompts.chats") + local qflist = require("model.util.qflist") - model.setup({ - chats = { - ["codellama:qfix"] = vim.tbl_deep_extend("force", starters["together:codellama"], { - system = "You are an intelligent programming assistant", - create = function() - return qflist.get_text() - end, - }), - ["ollama:mistral"] = vim.tbl_deep_extend("force", starters["ollama:starling"], {}), - }, - prompts = { - ["ollama:starling"] = { - provider = ollama, - params = { - model = "starling-lm", - }, - builder = function(input) - return { - prompt = "GPT4 Correct User: " .. input .. "<|end_of_turn|>GPT4 Correct Assistant: ", - } - end, - }, - ["ollama:mistral"] = { - provider = ollama, - params = { - model = "mistral", - }, - builder = function(input) - return { - prompt = input, - params = { - model = "mistral", - }, - } - end, - }, - }, - }) - end, + model.setup({ + chats = { + ["codellama:qfix"] = vim.tbl_deep_extend("force", starters["together:codellama"], { + system = "You are an intelligent programming assistant", + create = function() + return qflist.get_text() + end, + }), + ["ollama:mistral"] = vim.tbl_deep_extend("force", starters["ollama:starling"], {}), + }, + prompts = { + ["ollama:starling"] = { + provider = ollama, + params = { + model = "starling-lm", + }, + builder = function(input) + return { + prompt = "GPT4 Correct User: " .. input .. "<|end_of_turn|>GPT4 Correct Assistant: ", + } + end, + }, + ["ollama:mistral"] = { + provider = ollama, + params = { + model = "mistral", + }, + builder = function(input) + return { + prompt = input, + params = { + model = "mistral", + }, + } + end, + }, + }, + }) + end, - -- To override defaults add a config field and call setup() + -- To override defaults add a config field and call setup() - -- config = function() - -- require('model').setup({ - -- prompts = {..}, - -- chats = {..}, - -- .. - -- }) - -- - -- require('model.providers.llamacpp').setup({ - -- binary = '~/path/to/server/binary', - -- models = '~/path/to/models/directory' - -- }) - --end + -- config = function() + -- require('model').setup({ + -- prompts = {..}, + -- chats = {..}, + -- .. + -- }) + -- + -- require('model.providers.llamacpp').setup({ + -- binary = '~/path/to/server/binary', + -- models = '~/path/to/models/directory' + -- }) + --end } |