Replies: 1 comment 2 replies
-
return {
{
"olimorris/codecompanion.nvim",
lazy = false,
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"hrsh7th/nvim-cmp",
"nvim-telescope/telescope.nvim",
},
config = function()
require("codecompanion").setup({
adapters = {
llama3 = function()
return require("codecompanion.adapters").extend("ollama", {
name = "llama3", -- Give this adapter a different name to differentiate it from the default ollama adapter
schema = {
model = {
default = "phi3:3.8b-mini-4k-instruct-q6_K",
},
num_ctx = {
default = 4096,
},
num_predict = {
default = -1,
},
},
})
end,
},
strategies = {
chat = {
adapter = "llama3",
},
inline = {
adapter = "llama3",
},
agent = {
adapter = "llama3",
},
},
display = {
chat = {
window = {
layout = "vertical", -- float|vertical|horizontal|buffer
},
},
},
opts = {
---@param adapter CodeCompanion.Adapter
---@return string
system_prompt = function(adapter)
if adapter.schema.model.default == "llama3.1:latest" then
return "My custom system prompt"
end
return "My default system prompt"
end,
},
})
end,
init = function() end,
},
} Diff
I try to replicate your on my local machine. I run ollama on the default port. This setup works for me. Idk the cause of your issue. 🤔 |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
iacobucci
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It gets installed by lazy.nvim, but commands are not available in the palette.
This is the spec im using, and ive tried variations based on the threads in Issues and Discussions, but none got to work. Ive tried using @olimorris 's dotfiles and that works, but i cant get the thing to cope with my lazyvim-like configuration.
Beta Was this translation helpful? Give feedback.
All reactions