return { "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", keys = { { "d", ":Mdelete", mode = "n" }, { "s", ":Mselect", mode = "n" }, { "", ":Mchat", 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, -- 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 }