From 8aba6f8dc988b3588df99b78a297a9ea4f444813 Mon Sep 17 00:00:00 2001 From: Juliano Barbosa Date: Fri, 23 Aug 2024 08:51:14 -0300 Subject: [PATCH] chore(chatgpt): update chatgpt config to use azure api --- lua/custom/plugins/chatgpt.lua | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/lua/custom/plugins/chatgpt.lua b/lua/custom/plugins/chatgpt.lua index 35b4dd16..c77bb1c9 100644 --- a/lua/custom/plugins/chatgpt.lua +++ b/lua/custom/plugins/chatgpt.lua @@ -1,23 +1,25 @@ return { { - "jackMort/ChatGPT.nvim", - event = "VeryLazy", + 'jackMort/ChatGPT.nvim', + event = 'VeryLazy', config = function() - require("chatgpt").setup( - { - api_key_cmd = "pass show azure/hypera/oai/token", - api_host_cmd = "pass show azure/hypera/oai/url", - predefined_chat_gpt_prompts = - "https://raw.githubusercontent.com/julianobarbosa/custom-gpt-prompts/main/prompt.csv" - } - ) + require('chatgpt').setup { + api_key_cmd = 'pass show azure/hypera/oai/idg-dev/token', + api_host_cmd = 'echo -n ""', + api_type_cmd = 'echo azure', + azure_api_base_cmd = 'pass show azure/hypera/oai/idg-dev/base', + azure_api_engine_cmd = 'pass show azure/hypera/oai/idg-dev/engine', + azure_api_version_cmd = 'pass show azure/hypera/oai/idg-dev/api-version', + predefined_chat_gpt_prompts = 'https://raw.githubusercontent.com/julianobarbosa/custom-gpt-prompts/main/prompt.csv', + } end, dependencies = { - "MunifTanjim/nui.nvim", - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope.nvim" - } - } + 'MunifTanjim/nui.nvim', + 'nvim-lua/plenary.nvim', + 'nvim-telescope/telescope.nvim', + }, + }, } + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et