kiddos / gemini.nvim

gemini bindings for Neovim
24 stars 3 forks source link

Unknown function: _gemini_api_stream_async #5

Open gmankab opened 3 months ago

gmankab commented 3 months ago

i pressed ctrl+o, selected code explain, and got following error:

Error executing vim.schedule lua callback: ....local/share/nvim/lazy/gemini.nvim/lua/gemini/prompt.lua:69: Vim:E117: Unknown function: _gemini_api_stream_async
stack traceback:
        [C]: in function 'nvim_call_function'
        ....local/share/nvim/lazy/gemini.nvim/lua/gemini/prompt.lua:69: in function ''
        vim/_editor.lua: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
Press ENTER or type command to continue
kiddos commented 3 months ago

Could you try to do :UpdateRemotePlugins again?

hkhrithik007 commented 2 months ago
Screenshot 2024-04-23 at 3 09 46 PM

this is giving me error like this i have done the UpdateRemotePlugins but not working and i have stored the api in .zshrc but still the same error

kiddos commented 1 month ago

What version of pynvim are you using?

vunguyen4920 commented 1 month ago

I am also having the same issue and have already done the UpdateRemotePlugins but the issue still remains

google-generativeai          0.5.3
pynvim                       0.5.0
hkhrithik007 commented 1 month ago

What version of pynvim are you using?

Latest version installed by the script

kiddos commented 1 month ago

Can you provide a minimum nvim config to replicate the issue?

That function is implemented in python, but somehow it's not registered in your setting. UpdateRemotePlugins should have registered it, but there might be something else interfering it.

piertoni commented 3 weeks ago

I have the same problem, I am just a user of lazynvim so I don't know how it works and all configuration files. But I noticed that nvim-data\rplugin.vim has no python3 plugin, in fact the file is almost empty (only comments). Don't know if this is related. Thanks

maximkulkin commented 3 weeks ago

I had similar problems and ithe thing that worked for me was the following. You need to run :UpdateRemotePlugins. But that call failed for me. And the reason it failed was because python3 provider was disabled in my Neovim config. I had this line in my config:

vim.g.loaded_python3_provider = 0

Also, I did ensured pynvim Python package is installed, not sure if it is needed, but I do have it.

So, to summarize:

  1. Ensure pynvim is installed by runnning pip3 install pynvim
  2. Ensure that Python3 provider is not disabled in Neovim config (check that :lua =vim.g.loaded_python3_provider outputs something other than 0. If so, check your configs and find where it is set to 0 and remove that.
  3. Run :UpdateRemotePlugins. This will install "gemini" remote provider.
piertoni commented 3 weeks ago

I had similar problems and ithe thing that worked for me was the following. You need to run :UpdateRemotePlugins. But that call failed for me. And the reason it failed was because python3 provider was disabled in my Neovim config. I had this line in my config:

vim.g.loaded_python3_provider = 0

Also, I did ensured pynvim Python package is installed, not sure if it is needed, but I do have it.

So, to summarize:

  1. Ensure pynvim is installed by runnning pip3 install pynvim
  2. Ensure that Python3 provider is not disabled in Neovim config (check that :lua =vim.g.loaded_python3_provider outputs something other than 0. If so, check your configs and find where it is set to 0 and remove that.
  3. Run :UpdateRemotePlugins. This will install "gemini" remote provider.

Thanks for suggestions, I followed all steps but unfortunately this did not work. This is the result of UpdateRemotePlugins, is it normal?:

remote/host: python3 host registered plugins []
remote/host: generated rplugin manifest: C:\Users\pnnp\AppData\Local\nvim-data/rplugin.vim

The rplugin.vim is empty (not considering comments) Thanks

mous16 commented 3 weeks ago
remote/host: python3 host registered plugins []
remote/host: generated rplugin manifest: C:\Users\pnnp\AppData\Local\nvim-data/rplugin.vim

The rplugin.vim is empty (not considering comments) Thanks

Same situation here