FEAT: Adding Codellama as a nvim plugin using gen.nvim
This commit is contained in:
17
lua/barink/plugins/codellama.lua
Normal file
17
lua/barink/plugins/codellama.lua
Normal file
@ -0,0 +1,17 @@
|
||||
return {
|
||||
{
|
||||
'David-kunz/gen.nvim',
|
||||
opts = {
|
||||
model = "codellama:7b",
|
||||
host = "localhost",
|
||||
port = "11434",
|
||||
quit_mape = "q",
|
||||
init = function (options) pcall(io.popen("ollama serve > /dev/null 2>&1 &)")) end,
|
||||
display_mode = "split",
|
||||
command =function (options)
|
||||
local body = {model = options.model, stream=true}
|
||||
return "curl --silent --no-buffer -X POST http://" .. options.host .. ':' .. options.port .. "/api/chat -d $body"
|
||||
end,
|
||||
},
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user