ChatGPTは、OpenAI の GPT-3 言語モデルと対話できる Neovim プラグインです。 を使用すると、GPT-3からリアルタイムで質問したり回答を得たりできます。
ChatGPT
curl
$OPENAI_API_KEY
-- Packer
use({
"jackMort/ChatGPT.nvim",
config = function()
require("chatgpt").setup({
-- optional configuration
})
end,
requires = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim"
}
})
ChatGPT.nvim次のデフォルトが付属しています
{
welcome_message = WELCOME_MESSAGE, -- set to "" if you don't like the fancy robot
loading_text = "loading",
question_sign = "", -- you can use emoji if you want e.g. 🙂
answer_sign = "ﮧ", -- 🤖
max_line_length = 120,
yank_register = "+",
chat_layout = {
relative = "editor",
position = "50%",
size = {
height = "80%",
width = "80%",
},
},
chat_window = {
filetype = "chatgpt",
border = {
highlight = "FloatBorder",
style = "rounded",
text = {
top = " ChatGPT ",
},
},
},
chat_input = {
prompt = " ",
border = {
highlight = "FloatBorder",
style = "rounded",
text = {
top_align = "center",
top = " Prompt ",
},
},
win_options = {
winhighlight = "Normal:Normal",
},
},
openai_params = {
model = "text-davinci-003",
frequency_penalty = 0,
presence_penalty = 0,
max_tokens = 300,
temperature = 0,
top_p = 1,
n = 1,
},
openai_edit_params = {
model = "code-davinci-edit-001",
temperature = 0,
top_p = 1,
n = 1,
},
keymaps = {
close = "<C-c>",
yank_last = "<C-y>",
scroll_up = "<C-u>",
scroll_down = "<C-d>",
},
}
プラグイン公開」
ChatGPTインタラクティブウィンドウを開くコマンド。
ChatGPTActAsコマンドを実行すると、ChatGPTで使用する素晴らしいChatGPTプロンプトからプロンプト選択が開きます。
ChatGPTEditWithInstructions選択したテキストまたはウィンドウ全体を編集するインタラクティブウィンドウを開くコマンド-デモビデオ。
使用可能なキーバインドは次のとおりです。
<C-c>をクリックしてチャットウィンドウを閉じます。
<C-u>チャットウィンドウを上にスクロールします。
<C-d>チャットウィンドウを下にスクロールします。
<C-y>最後の答えをコピー/ヤンクします。
<C-i>[ウィンドウの編集]は、応答を入力として使用します。