Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customize default chat tempalte #135

Open
ucl98 opened this issue May 8, 2024 · 2 comments
Open

customize default chat tempalte #135

ucl98 opened this issue May 8, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@ucl98
Copy link

ucl98 commented May 8, 2024

Hi,
Is it possible to customize the template of the default chat? I found that the default message with instructions is defined via chat_template but I failed to find a solution how I can customize the message.
I would prefer to have it removed if possible.

@argshook
Copy link
Contributor

Hey there! I submitted a PR which allows to customize chat_template here: #117

but it's not merged to this repo and so far is only available in my fork. Give it a spin if you'd like.

I use neovim with lazy plugin manager, and configure gp.nvim like this:

require("lazy").setup({
  {
    "argshook/gp.nvim",
        config = function()
          require("gp").setup({
            chat_template = "# topic: ?\n\n"
              .. "- file: %s\n"
              .. "---\n"
              .. "🗨: "
          })
        end
  }
})

you might not want to remove the default message entirely. I find it useful to include at least the chat_user_prefix symbol:

require("lazy").setup({
  {
    "argshook/gp.nvim",
        config = function()
          require("gp").setup({
            chat_template = "🗨: "
          })
        end
  }
})

Disclaimer: i don't really maintain my fork too much, just have few tweaks for my own needs!

@ucl98
Copy link
Author

ucl98 commented May 22, 2024

Thanks for your contribution. It's the feature I was hoping for :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants