Ollama: use port forwarding
This commit is contained in:
parent
598cbb4750
commit
b66bbda19e
2 changed files with 13 additions and 14 deletions
|
|
@ -403,21 +403,13 @@ in
|
|||
plugin = vp.ollama-nvim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
function readAll(file)
|
||||
local f = assert(io.open(file, "rb"))
|
||||
local content = f:read("*all")
|
||||
f:close()
|
||||
return content
|
||||
end
|
||||
local url = readAll("${nixosConfig.age.secrets.ollama.path}")
|
||||
|
||||
print(vim.inspect(url))
|
||||
|
||||
local ollama = require("ollama")
|
||||
ollama:setup({
|
||||
url = url,
|
||||
local token = readAll("${nixosConfig.age.secrets.ollama.path}")
|
||||
local conf = {
|
||||
-- url = string.format("https://bertof:%s@ollama.ricerca.sesar.di.unimi.it/", token),
|
||||
model = "codegemma:7b"
|
||||
})
|
||||
}
|
||||
local ollama = require("ollama")
|
||||
ollama.setup(conf)
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
|
@ -428,6 +420,13 @@ in
|
|||
# let g:airline_powerline_fonts = 1
|
||||
# '';
|
||||
extraLuaConfig = ''
|
||||
function readAll(file)
|
||||
local f = assert(io.open(file, "rb"))
|
||||
local content = f:read("*all")
|
||||
f:close()
|
||||
return string.gsub(content, "%s+", "")
|
||||
end
|
||||
|
||||
-- Setup
|
||||
local o = vim.o
|
||||
local g = vim.g
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue