summaryrefslogtreecommitdiff
path: root/lua/ache/plugins/llm/model.lua
diff options
context:
space:
mode:
authorache <ache@ache.one>2026-02-19 18:44:33 +0100
committerache <ache@ache.one>2026-02-19 18:44:33 +0100
commit362b4a83c33f5ff30d3dbc3d3d0b996286fae444 (patch)
treee4e1581d47dc04cb4e0081ee4c4dd16e3d4708fa /lua/ache/plugins/llm/model.lua
parentexp: Experiment with treesitter fold (diff)
fix: LUA formatting
Diffstat (limited to 'lua/ache/plugins/llm/model.lua')
-rw-r--r--lua/ache/plugins/llm/model.lua148
1 files changed, 74 insertions, 74 deletions
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
}