feat(plugin): Use GPT-3.5 turbo because it's cheaper

This commit is contained in:
Simon Lasbrugnas 2023-11-21 10:02:18 +01:00
parent 09ce90a229
commit 0931bbe80c
Signed by untrusted user who does not match committer: simon
GPG key ID: 86039876BA6ED8DE

View file

@ -2,7 +2,7 @@ require('neoai').setup({
models = { models = {
{ {
name = "openai", name = "openai",
model = "gpt-4-1106-preview", model = "gpt-3.5-turbo-1106", -- "gpt-4-1106-preview",
params = nil, params = nil,
}, },
}, },
@ -17,12 +17,7 @@ require('neoai').setup({
}, },
prompts = { prompts = {
context_prompt = function(context) context_prompt = function(context)
return "You are a senior software developer." return context
.. "You always answer question with short, straight to the point answers."
.. "You only provide the code snippet and without the code block."
.. "Only provide explaination if the user asks for it"
.. "Here is the user's problem:"
.. context
end, end,
}, },
shortcuts = { shortcuts = {
@ -72,7 +67,7 @@ require('neoai').setup({
========================================= =========================================
Using the following git diff in order to generate Using the following git diff in order to generate
a consise and clear git commit message: a consise and clear git commit message:
]] .. vim.fn.system("git diff --cached") ]] .. vim.fn.system("git diff --cached --ignore-space-at-eol")
end, end,
modes = { "n" }, modes = { "n" },
strip_function = nil, strip_function = nil,