Closed GustavoJCL closed 1 month ago
The Gemini API is currently not supported. I will add it later today, so please stay tuned.
I just added Gemini. You can check it out with this config:
local ai = require('ai')
ai.setup({
provider = "gemini",
gemini = {
model = "gemini-1.5-pro-latest" -- This is optional, the default config uses flash.
},
})
Remember to source your key or put it in your dotfile:
export GOOGLE_API_KEY=""
I tried this configuration, and the environment variable is set correctly, I also tried with gemini pro latest and the default, but I still get this error:
Error executing vim.schedule lua callback: ...ocal/share/nvim/lazy/nvim.ai/lua/ai/providers/gemini.lua:15: bad argument #1 to 'decode' (string expected, got nil)
stack traceback:
[C]: in function 'decode'
...ocal/share/nvim/lazy/nvim.ai/lua/ai/providers/gemini.lua:15: in function 'parse_response'
/home/gus/.local/share/nvim/lazy/nvim.ai/lua/ai/http.lua:48: in function </home/gus/.local/share/nvim/lazy/nvim.ai/lua/ai/http.lua:46>
Sorry about the bug :sob:. I didn't thoroughly test it. Please pull the new code, it should work now.
don't worry, thanks for making the plugin, it's very useful
Hi, how can I use Gemini experimental versions for autocompletion? it seems they provide an API key, but I'm not sure if I can use it with this plugin
aistudio.google.com