]> git.sthu.org Git - vimconf.git/commitdiff
plugins: Add googleai and gemini to gp
authorStefan Huber <shuber@sthu.org>
Sun, 8 Dec 2024 14:29:07 +0000 (15:29 +0100)
committerStefan Huber <shuber@sthu.org>
Sun, 8 Dec 2024 14:29:07 +0000 (15:29 +0100)
plugins-full.vim.example

index 3fbb226e7cf62ea03668afbb429ba6e1d108426b..40e35a7e39c830487f4bfa88ca587e68410fb2fe 100644 (file)
@@ -189,8 +189,36 @@ function PluginsConfigFull()
                             "-c",
                             "cat ~/.config/github-copilot/apps.json | sed -e 's/.*oauth_token...//;s/\".*//'",
                         },
-                    }
-                }
+                    },
+                    googleai = {
+                        -- disable = true,
+                        endpoint = "https://generativelanguage.googleapis.com/v1beta/models/{{model}}:streamGenerateContent?key={{secret}}",
+                        secret = os.getenv("GOOGLEAI_API_KEY"),
+                    },
+                },
+                agents = {
+                    {
+                            provider = "copilot",
+                            name = "ChatCopilot",
+                            chat = true,
+                            command = false,
+                            -- string with model name or table with model name and parameters
+                            model = { model = "gpt-4o", temperature = 1.1, top_p = 1 },
+                            -- system prompt (use this to specify the persona/role of the AI)
+                            system_prompt = require("gp.defaults").chat_system_prompt,
+                    },
+                    {
+                            provider = "googleai",
+                            name = "ChatGemini",
+                            chat = true,
+                            command = false,
+                            -- string with model name or table with model name and parameters
+                            model = { model = "gemini-pro", temperature = 1.1, top_p = 1 },
+                            -- system prompt (use this to specify the persona/role of the AI)
+                            system_prompt = require("gp.defaults").chat_system_prompt,
+                    },
+
+                },
             })
 
             vim.api.nvim_create_user_command("Calculate", "lua require(\"calculator\").calculate()",